summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRom Lemarchand <romlem@google.com>2013-09-10 17:39:30 -0700
committerRom Lemarchand <romlem@google.com>2013-09-10 17:41:21 -0700
commit67b00d8b2d96e8133c249bcbc0fb63c49e10e022 (patch)
tree77c52e893936a2d20533ce4469c64564a7b0c684
parentff9ec2d9990fbf9a707df063f3d43e9169bdde16 (diff)
downloadsystem_core-67b00d8b2d96e8133c249bcbc0fb63c49e10e022.zip
system_core-67b00d8b2d96e8133c249bcbc0fb63c49e10e022.tar.gz
system_core-67b00d8b2d96e8133c249bcbc0fb63c49e10e022.tar.bz2
init.rc: change mem cgroups permissions
Changing mem cgroups permissions to only be accessible by root and system. Bug: 10210529 Bug: 10210900 Change-Id: Ib4fff6f49b33013b3629d40ae98a5e2464571b2d
-rw-r--r--rootdir/init.rc6
1 files changed, 3 insertions, 3 deletions
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 6140ba1..19ab6cc 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -42,13 +42,13 @@ loglevel 3
mkdir /acct/uid
# Create cgroup mount point for memory
- mount tmpfs none /sys/fs/cgroup
- mkdir /sys/fs/cgroup/memory
+ mount tmpfs none /sys/fs/cgroup mode=0750,uid=0,gid=1000
+ mkdir /sys/fs/cgroup/memory 0750 root system
mount cgroup none /sys/fs/cgroup/memory memory
write /sys/fs/cgroup/memory/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/tasks
chmod 0660 /sys/fs/cgroup/memory/tasks
- mkdir /sys/fs/cgroup/memory/sw
+ mkdir /sys/fs/cgroup/memory/sw 0750 root system
write /sys/fs/cgroup/memory/sw/memory.swappiness 100
write /sys/fs/cgroup/memory/sw/memory.move_charge_at_immigrate 1
chown root system /sys/fs/cgroup/memory/sw/tasks