summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiogo Ferreira <diogo@underdev.org>2015-11-23 14:31:49 +0000
committerSteve Kondik <shade@chemlab.org>2015-11-27 05:26:17 -0800
commit3463bd0b789267cf23afdcd64ddb99ef2366ca7a (patch)
tree5c5ff30cfec15c6fadb111409bb52fea6b052345
parent140305db6d1a47e57df891a9aa5b04afca69ef6c (diff)
downloadvendor_replicant-3463bd0b789267cf23afdcd64ddb99ef2366ca7a.zip
vendor_replicant-3463bd0b789267cf23afdcd64ddb99ef2366ca7a.tar.gz
vendor_replicant-3463bd0b789267cf23afdcd64ddb99ef2366ca7a.tar.bz2
init: Remove world-writable permissions in BFQ hierarchy
Fixes android.permission.cts.FileSystemPermissionTest#testAllFilesInSysAreNotWritable Change-Id: Ia71a4ae246148ab8ea5333f8dbd39bfc330d2605
-rw-r--r--prebuilt/common/etc/init.local.rc4
1 files changed, 3 insertions, 1 deletions
diff --git a/prebuilt/common/etc/init.local.rc b/prebuilt/common/etc/init.local.rc
index 83a5cb1..3868785 100644
--- a/prebuilt/common/etc/init.local.rc
+++ b/prebuilt/common/etc/init.local.rc
@@ -10,7 +10,8 @@ on init
mkdir /sys/fs/cgroup/bfqio 0755 root system
mount cgroup none /sys/fs/cgroup/bfqio bfqio
chown root system /sys/fs/cgroup/bfqio/tasks
- chmod 0666 /sys/fs/cgroup/bfqio/tasks
+ chmod 0664 /sys/fs/cgroup/bfqio/tasks
+ chmod 0220 /sys/fs/cgroup/bfqio/cgroup.event_control
# Soft realtime class for display service
mkdir /sys/fs/cgroup/bfqio/rt-display 0755 root system
@@ -18,6 +19,7 @@ on init
write /sys/fs/cgroup/bfqio/rt-display/bfqio.ioprio 7
chown system system /sys/fs/cgroup/bfqio/rt-display/tasks
chmod 0664 /sys/fs/cgroup/bfqio/rt-display/tasks
+ chmod 0220 /sys/fs/cgroup/bfqio/rt-display/cgroup.event_control
on post-fs-data
mkdir /data/.ssh 0750 root shell