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

Commit 651dc744 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android Git Automerger
Browse files

am bef08b8d: Merge "Handle policy reloads within installd rather than restarting it."

* commit 'bef08b8d':
  Handle policy reloads within installd rather than restarting it.
parents f4325cee bef08b8d
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

#include <sys/capability.h>
#include <linux/prctl.h>
#include <selinux/android.h>
#include <selinux/avc.h>

#include "installd.h"

@@ -526,6 +528,7 @@ int main(const int argc, const char *argv[]) {
    struct sockaddr addr;
    socklen_t alen;
    int lsocket, s, count;
    int selinux_enabled = (is_selinux_enabled() > 0);

    ALOGI("installd firing up\n");

@@ -539,6 +542,11 @@ int main(const int argc, const char *argv[]) {
        exit(1);
    }

    if (selinux_enabled && selinux_status_open(true) < 0) {
        ALOGE("Could not open selinux status; exiting.\n");
        exit(1);
    }

    drop_privileges();

    lsocket = android_get_control_socket(SOCKET_PATH);
@@ -577,6 +585,9 @@ int main(const int argc, const char *argv[]) {
                break;
            }
            buf[count] = 0;
            if (selinux_enabled && selinux_status_updated() > 0) {
                selinux_android_seapp_context_reload();
            }
            if (execute(s, buf)) break;
        }
        ALOGI("closing connection\n");