Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7480c007 authored by Colin Cross's avatar Colin Cross Committed by Android Git Automerger
Browse files

am b2639f40: Merge "Label sockets consistently with the seclabel value if specified."

# By Stephen Smalley
# Via Gerrit Code Review (1) and Stephen Smalley (1)
* commit 'b2639f40':
  Label sockets consistently with the seclabel value if specified.
parents 282caf3b b2639f40
Loading
Loading
Loading
Loading
+27 −19
Original line number Diff line number Diff line
@@ -198,6 +198,13 @@ void service_start(struct service *svc, const char *dynamic_args)
    }

    if (is_selinux_enabled() > 0) {
        if (svc->seclabel) {
            scon = strdup(svc->seclabel);
            if (!scon) {
                ERROR("Out of memory while starting '%s'\n", svc->name);
                return;
            }
        } else {
            char *mycon = NULL, *fcon = NULL;

            INFO("computing context for service '%s'\n", svc->args[0]);
@@ -222,6 +229,7 @@ void service_start(struct service *svc, const char *dynamic_args)
                return;
            }
        }
    }

    NOTICE("starting '%s'\n", svc->name);