summaryrefslogtreecommitdiffstats
path: root/sepolicy
diff options
context:
space:
mode:
authorGeorg Veichtlbauer <georg.veichtlbauer@gmail.com>2015-02-04 18:17:31 +0100
committerAbhisek Devkota <ciwrl@cyanogenmod.com>2015-02-09 21:03:35 +0000
commit2ccd36c73f9baebf2749b33d43cafa8b016e633e (patch)
tree0e791fc05ed54ed4e111a7b7fc420af052e57f15 /sepolicy
parent5e9d050e18a054b39c5640c5af038173b65d2eb3 (diff)
downloadvendor_replicant-2ccd36c73f9baebf2749b33d43cafa8b016e633e.zip
vendor_replicant-2ccd36c73f9baebf2749b33d43cafa8b016e633e.tar.gz
vendor_replicant-2ccd36c73f9baebf2749b33d43cafa8b016e633e.tar.bz2
sepolicy: allow userinit to set its property
Change-Id: I9d8270d889566d169077a1b1fdaee43059d11ee1
Diffstat (limited to 'sepolicy')
-rw-r--r--sepolicy/file_contexts2
-rw-r--r--sepolicy/property.te1
-rw-r--r--sepolicy/property_contexts1
-rw-r--r--sepolicy/sepolicy.mk1
-rw-r--r--sepolicy/userinit.te3
5 files changed, 8 insertions, 0 deletions
diff --git a/sepolicy/file_contexts b/sepolicy/file_contexts
index ad1c404..7ca945a 100644
--- a/sepolicy/file_contexts
+++ b/sepolicy/file_contexts
@@ -9,6 +9,8 @@
/system/bin/sysinit u:object_r:sysinit_exec:s0
+/system/etc/init.d/90userinit u:object_r:userinit_exec:s0
+
# For minivold in recovery
/sbin/minivold u:object_r:vold_exec:s0
diff --git a/sepolicy/property.te b/sepolicy/property.te
index fe7d9b2..1e6b220 100644
--- a/sepolicy/property.te
+++ b/sepolicy/property.te
@@ -1,2 +1,3 @@
type adbtcp_prop, property_type;
type recovery_prop, property_type;
+type userinit_prop, property_type;
diff --git a/sepolicy/property_contexts b/sepolicy/property_contexts
index b3a3540..d6beeb2 100644
--- a/sepolicy/property_contexts
+++ b/sepolicy/property_contexts
@@ -1,3 +1,4 @@
service.adb.tcp.port u:object_r:adbtcp_prop:s0
recovery.perf.mode u:object_r:recovery_prop:s0
adb.secure u:object_r:recovery_prop:s0
+cm.userinit.active u:object_r:userinit_prop:s0
diff --git a/sepolicy/sepolicy.mk b/sepolicy/sepolicy.mk
index 6cd5064..194fd9a 100644
--- a/sepolicy/sepolicy.mk
+++ b/sepolicy/sepolicy.mk
@@ -32,6 +32,7 @@ BOARD_SEPOLICY_UNION += \
system_app.te \
ueventd.te \
uncrypt.te \
+ userinit.te \
vold.te \
zygote.te \
mac_permissions.xml
diff --git a/sepolicy/userinit.te b/sepolicy/userinit.te
new file mode 100644
index 0000000..caddb08
--- /dev/null
+++ b/sepolicy/userinit.te
@@ -0,0 +1,3 @@
+type userinit_exec, exec_type, file_type;
+
+allow userinit_exec userinit_prop:property_service set;