Make /acct have 0555 permissions after mounting

This change adds a `chmod 0555 /acct` just after mounting the cgroup fs
on it. This makes it such that even on systems where the rootdir+system
partitions are shared, the permissions allow for the system user to open
files within /acct, which in turn makes libprocessgroup not complain
that it can never do anything with those files.

Bug: 111996377
Test: adb shell 'ls -ldZ /acct'  # Before and after, on an aosp_sailfish
      dr-xr-xr-x 48 root root u:object_r:cgroup:s0 0 1971-12-29 17:41 /acct

Change-Id: Iee6531126c6e81aa7794e44500555bd3c1cdf7b8
This commit is contained in:
Luis Hector Chavez 2018-07-30 13:06:46 -07:00
parent a8dcef2012
commit 0451fd6584
1 changed files with 1 additions and 0 deletions

View File

@ -26,6 +26,7 @@ on early-init
# Mount cgroup mount point for cpu accounting
mount cgroup none /acct nodev noexec nosuid cpuacct
chmod 0555 /acct
mkdir /acct/uid
# root memory control cgroup, used by lmkd