Merge "Handle policy reloads within ueventd rather than restarting it."
This commit is contained in:
commit
d8d99c45b7
2 changed files with 11 additions and 4 deletions
|
|
@ -33,6 +33,7 @@
|
||||||
#include <selinux/selinux.h>
|
#include <selinux/selinux.h>
|
||||||
#include <selinux/label.h>
|
#include <selinux/label.h>
|
||||||
#include <selinux/android.h>
|
#include <selinux/android.h>
|
||||||
|
#include <selinux/avc.h>
|
||||||
|
|
||||||
#include <private/android_filesystem_config.h>
|
#include <private/android_filesystem_config.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
@ -830,6 +831,15 @@ void handle_device_fd()
|
||||||
struct uevent uevent;
|
struct uevent uevent;
|
||||||
parse_event(msg, &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_device_event(&uevent);
|
||||||
handle_firmware_event(&uevent);
|
handle_firmware_event(&uevent);
|
||||||
}
|
}
|
||||||
|
|
@ -896,6 +906,7 @@ void device_init(void)
|
||||||
sehandle = NULL;
|
sehandle = NULL;
|
||||||
if (is_selinux_enabled() > 0) {
|
if (is_selinux_enabled() > 0) {
|
||||||
sehandle = selinux_android_file_context_handle();
|
sehandle = selinux_android_file_context_handle();
|
||||||
|
selinux_status_open(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* is 256K enough? udev uses 16MB! */
|
/* is 256K enough? udev uses 16MB! */
|
||||||
|
|
|
||||||
|
|
@ -395,10 +395,6 @@ service ueventd /sbin/ueventd
|
||||||
critical
|
critical
|
||||||
seclabel u:r:ueventd:s0
|
seclabel u:r:ueventd:s0
|
||||||
|
|
||||||
on property:selinux.reload_policy=1
|
|
||||||
restart ueventd
|
|
||||||
restart installd
|
|
||||||
|
|
||||||
service console /system/bin/sh
|
service console /system/bin/sh
|
||||||
class core
|
class core
|
||||||
console
|
console
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue