platform_system_core/rootdir
Eric Biggers 7a0611b006 Remove write permission from file mode of top-level user dirs
Due to the work done for b/156305599 ("Ensure no process except vold can
create directories like /data/system_ce/0"), the SELinux policy now
enforces that vold is the only process that can write to directories
that contain per-user encrypted subdirectories.  This is essential to
prevent bugs where directories that are supposed to be encrypted get
created too early so are not actually encrypted as intended.

However, this only works when SELinux is in enforcing mode.  When
SELinux is in permissive mode, only DAC is enforced, and the file modes
allow other processes to write to many of these directories.  That
allows system_server to break things once again.

Therefore, remove the write bit from the file modes so that write access
is always denied to processes that don't have CAP_DAC_OVERRIDE.  This is
not as strong a restriction as the SELinux policy, which still applies
independently, but it does keep out system_server by itself.

Also remove the sticky bit from /data/misc_ce and /data/misc_de, since
there is no reason for it.  (It probably was originally copied from
/data/misc, which might need it.  But misc_{ce,de} don't need it.)

Bug: 285239971
Test: Booted Cuttlefish
Change-Id: I1213a4d18c5f851acf213d786400d79d73777ed0
2023-06-08 21:29:19 +00:00
..
avb Remove unused rootdir/avb/*-gsi.avbpubkey modules 2022-01-10 14:25:42 +00:00
etc Expose hwasan runtime to Java apps 2023-04-06 15:56:33 -07:00
adb_debug.prop Adding adb_debug.prop into debug ramdisk 2019-04-23 11:13:46 +08:00
Android.bp Completely migrate init first stage to Soong 2021-06-18 14:26:55 +09:00
Android.mk [LSC] Add LOCAL_LICENSE_KINDS to system/core 2023-02-09 11:29:51 -08:00
asan.options
asan_extract.rc
asan_extract.sh
init-debug.rc Prevent debugfs unmount on debug builds with a persist property 2021-04-16 13:59:15 -07:00
init.environ.rc.in Export *CLASSPATH variables after apexes are configured. 2021-02-19 17:12:26 +00:00
init.no_zygote.rc Reland "Add a core configuration that disables the zygote." 2022-02-15 16:03:35 -08:00
init.rc Remove write permission from file mode of top-level user dirs 2023-06-08 21:29:19 +00:00
init.usb.configfs.rc
init.usb.rc init.usb.rc: specify user manually 2023-05-03 01:06:38 +00:00
init.zygote32.rc init: Take wakelock on zygote restart 2022-12-14 11:25:01 -08:00
init.zygote64.rc init: Take wakelock on zygote restart 2022-12-14 11:25:01 -08:00
init.zygote64_32.rc Resync zygote64 and zygote64_32 rc files. 2022-09-29 17:21:54 -07:00
OWNERS Add new owners to various sub-projects. 2020-12-11 12:45:45 -08:00
ramdisk_node_list ramdisk_node_list: Add urandom node 2023-04-28 09:51:05 +01:00
ueventd.rc Make /dev/{kvm,vhost-vsock} accessible to all UIDs 2022-12-20 08:20:26 +00:00