summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-08-11 18:12:03 +0200
committerDaniel Hillenbrand <codeworkx@cyanogenmod.org>2013-08-11 18:12:03 +0200
commit4ce796517d80a1877bb2766c8b3403327db745c0 (patch)
treebea43907be218a12542a61911f85157cc54407cd
parent279859988403de649091978b0bff52bce153fd29 (diff)
downloaddevice_samsung_galaxys2-common-4ce796517d80a1877bb2766c8b3403327db745c0.zip
device_samsung_galaxys2-common-4ce796517d80a1877bb2766c8b3403327db745c0.tar.gz
device_samsung_galaxys2-common-4ce796517d80a1877bb2766c8b3403327db745c0.tar.bz2
galaxys2: refine sepolicies
Change-Id: Ifa7e56537af87f14a59e5c9b5f254073eea22a8f
-rw-r--r--rootdir/init.smdk4210.rc15
-rw-r--r--selinux/file_contexts5
-rw-r--r--selinux/rild.te5
3 files changed, 16 insertions, 9 deletions
diff --git a/rootdir/init.smdk4210.rc b/rootdir/init.smdk4210.rc
index a3dca0e..301e608 100644
--- a/rootdir/init.smdk4210.rc
+++ b/rootdir/init.smdk4210.rc
@@ -38,6 +38,21 @@ on fs
mkdir /data/misc/radio 0775 radio system
chmod 0770 /data/misc/wifi
+# Restorecon
+ restorecon /efs/nv_data.bin
+ restorecon /efs/nv_data.bin.md5
+ restorecon /efs/.nv_core.bak
+ restorecon /efs/.nv_core.bak.md5
+ restorecon /efs/.nv_data.bak
+ restorecon /efs/.nv_data.bak.md5
+ restorecon /efs/.nv_state
+ restorecon /efs/bluetooth/bt_addr
+ restorecon /efs/FactoryApp/factorymode
+ restorecon /efs/FactoryApp/hw_ver
+ restorecon /efs/FactoryApp/keystr
+ restorecon /efs/FactoryApp/serial_no
+ restorecon /efs/imei/mps_code.dat
+
on post-fs-data
# insmod kernel modules
insmod /system/lib/modules/j4fs.ko
diff --git a/selinux/file_contexts b/selinux/file_contexts
index 36fb414..98fdd8f 100644
--- a/selinux/file_contexts
+++ b/selinux/file_contexts
@@ -15,11 +15,6 @@
/dev/block/mmcblk0p7 u:object_r:efs_block_device:s0
-/efs/imei/mps_code.dat u:object_r:radio_data_file:s0
-/efs/nv_data.bin u:object_r:radio_data_file:s0
-/efs/nv_data.bin.md5 u:object_r:radio_data_file:s0
-/efs/upgaddr u:object_r:efs_file:s0
-
# Bluetooth
/dev/ttySAC0 u:object_r:hci_attach_dev:s0
/efs/bluetooth(/.*)? u:object_r:bluetooth_data_file:s0
diff --git a/selinux/rild.te b/selinux/rild.te
index 5711ef0..40406e3 100644
--- a/selinux/rild.te
+++ b/selinux/rild.te
@@ -3,8 +3,5 @@ allow rild self:netlink_route_socket { write };
allow rild self:netlink_kobject_uevent_socket { create bind read write };
allow rild radio_device:chr_file rw_file_perms;
-
allow rild efs_block_device:blk_file rw_file_perms;
-
-allow rild radio_data_file:file { read open write setattr };
-allow rild efs_file:file { read open write getattr };
+allow rild efs_file:file { read open write setattr };