diff options
author | Colin Cross <ccross@android.com> | 2013-08-23 14:39:39 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2013-08-23 14:39:39 -0700 |
commit | 30caffc025aff450ebb354ee693174cc1732732b (patch) | |
tree | e08f6673d0d6b722d95735d2bf20367fdc977e1c /init | |
parent | 8ca2bf084209cf121f1d4b011ad4db3e35f35c82 (diff) | |
parent | a1af5cf6d1c008dbde2e40121940d65faa0816bf (diff) | |
download | system_core-30caffc025aff450ebb354ee693174cc1732732b.zip system_core-30caffc025aff450ebb354ee693174cc1732732b.tar.gz system_core-30caffc025aff450ebb354ee693174cc1732732b.tar.bz2 |
resolved conflicts for merge of a1af5cf6 to klp-dev-plus-aosp
Change-Id: I08e9898940f7cdd466469b76760807cc5d5c67e4
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! */ |