Fix a few restorecon calls.
restorecon /proc does not work; /proc does not support the xattr API
but is internally labeled based on genfs_contexts in policy.
fdAlbum is a file not a directory so we only need a regular restorecon,
and move it to the same location as in other device init*.rc files.
Change-Id: I0cbde680fa284e74977158a2d71f7c2e28a5e4ea
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
diff --git a/init.hammerhead.rc b/init.hammerhead.rc
index b4bdcab..60bd84f 100644
--- a/init.hammerhead.rc
+++ b/init.hammerhead.rc
@@ -60,9 +60,7 @@
# bluetooth LPM
chown bluetooth net_bt_stack /proc/bluetooth/sleep/lpm
- restorecon /proc/bluetooth/sleep/lpm
chown bluetooth net_bt_stack /proc/bluetooth/sleep/btwrite
- restorecon /proc/bluetooth/sleep/btwrite
#bluetooth UART dev
chown bluetooth net_bt_stack /sys/devices/platform/msm_serial_hs.0/clock
@@ -136,8 +134,6 @@
chown system system /sys/class/leds/red/rgb_start
on post-fs-data
- restorecon_recursive /data/fdAlbum
-
mkdir /data/media 0770 media_rw media_rw
restorecon_recursive /data/media
@@ -173,6 +169,9 @@
mkdir /persist/sensors
chmod 775 /persist/sensors
+ # Label in case file already exists
+ restorecon /data/fdAlbum
+
# Create the directories used by the Wireless subsystem
mkdir /data/misc/wifi 0770 wifi wifi
mkdir /data/misc/wifi/sockets 0770 wifi wifi