diff options
author | Stephen Smalley <sds@tycho.nsa.gov> | 2013-04-16 09:30:30 -0400 |
---|---|---|
committer | Stephen Smalley <sds@tycho.nsa.gov> | 2013-07-26 15:39:41 -0400 |
commit | e2eb69db6d818b41f5c0f2090cc643f7cff31734 (patch) | |
tree | 359a344215a31cc534d9830d823c11a36545b76c /init | |
parent | 5d8554323caddfa3ca02f31625ea72634312521f (diff) | |
download | system_core-e2eb69db6d818b41f5c0f2090cc643f7cff31734.zip system_core-e2eb69db6d818b41f5c0f2090cc643f7cff31734.tar.gz system_core-e2eb69db6d818b41f5c0f2090cc643f7cff31734.tar.bz2 |
Handle policy reloads within ueventd rather than restarting it.
Restarting ueventd upon policy reloads has reportedly created
stability problems for some users and could cause events to be lost.
Stop restarting ueventd and instead handle policy reloads within ueventd.
Also stops restarting installd upon policy reloads.
Change-Id: Ic7f310d69a7c420e48fbc974000cf4a5b9ab4a3b
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
Diffstat (limited to 'init')
-rw-r--r-- | init/devices.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/init/devices.c b/init/devices.c index 1893642..af88c5f 100644 --- a/init/devices.c +++ b/init/devices.c @@ -33,6 +33,7 @@ #include <selinux/selinux.h> #include <selinux/label.h> #include <selinux/android.h> +#include <selinux/avc.h> #include <private/android_filesystem_config.h> #include <sys/time.h> @@ -830,6 +831,15 @@ void handle_device_fd() struct uevent uevent; parse_event(msg, &uevent); + if (sehandle && selinux_status_updated() > 0) { + struct selabel_handle *sehandle2; + sehandle2 = selinux_android_file_context_handle(); + if (sehandle2) { + selabel_close(sehandle); + sehandle = sehandle2; + } + } + handle_device_event(&uevent); handle_firmware_event(&uevent); } @@ -896,6 +906,7 @@ void device_init(void) sehandle = NULL; if (is_selinux_enabled() > 0) { sehandle = selinux_android_file_context_handle(); + selinux_status_open(true); } /* is 256K enough? udev uses 16MB! */ |