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

Commit 2139c7fa authored by Stephen Smalley's avatar Stephen Smalley Committed by Nick Kralevich
Browse files

Call selinux_status_open() prior to use of selinux_status_updated().



The selinux_status_*() interfaces require calling selinux_status_open()
first.  Since this was not being called by servicemanager, the
selinux_status_updated() call was always failing and servicemanager
was not reloading service_contexts upon a policy reload.

(cherrypicked from commit bea0746b)

Change-Id: I6ac62e114bbca99c5f0999feb918fcde15009274
Signed-off-by: default avatarStephen Smalley <sds@tycho.nsa.gov>
parent d910f3cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -361,6 +361,7 @@ int main(int argc, char **argv)


    selinux_enabled = is_selinux_enabled();
    selinux_enabled = is_selinux_enabled();
    sehandle = selinux_android_service_context_handle();
    sehandle = selinux_android_service_context_handle();
    selinux_status_open(true);


    if (selinux_enabled > 0) {
    if (selinux_enabled > 0) {
        if (sehandle == NULL) {
        if (sehandle == NULL) {