diff options
author | Adam Shih <adamshih@google.com> | 2018-12-06 15:22:53 +0800 |
---|---|---|
committer | Adam Shih <adamshih@google.com> | 2018-12-07 10:18:46 +0800 |
commit | 57db92bd8b443b71c048a0148a25d958a2776316 (patch) | |
tree | 91119036db5615ba718f3646f87bb39fd83c02b5 /init.hardware.rc | |
parent | b9f20161995d74ea6fc21636ba23cff4ebf38bc5 (diff) | |
download | bonito-57db92bd8b443b71c048a0148a25d958a2776316.tar.gz |
operate files on real path instead for persist
selinux has problems dealing with symlink, move operation to real path to
avoid unexpected behavior.
Bug: 117254180
Test: Modify display files gid, uid and reboot and find the settings
restored.
1. Modify folder's permission manually:
$ adb shell ls -Zl persist/
drwxrwxrwx 4 system system u:object_r:persist_data_file:s0 4096 2018-11-02 11:17 data
$ adb shell ls -Zl mnt/vendor/
drwxr-xr-x 13 root root u:object_r:persist_file:s0 4096 1970-02-09 03:43 persist
2. reboot and find setting corrected by init.sdm670.rc
$ adb shell ls -Zl persist/
...
drwx------ 4 system system u:object_r:persist_data_file:s0 4096 2018-11-02 11:17 data
$ adb shell ls -Zl mnt/vendor/
drwxrwx--x 13 root system u:object_r:persist_file:s0 4096 1970-02-09 03:43 persist
Change-Id: I7618a6f73c619965d5ab621b66462f287c9ef11d
Diffstat (limited to 'init.hardware.rc')
-rw-r--r-- | init.hardware.rc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/init.hardware.rc b/init.hardware.rc index f3e216d1..82e448f4 100644 --- a/init.hardware.rc +++ b/init.hardware.rc @@ -184,7 +184,7 @@ on fs mount_all /vendor/etc/fstab.${ro.boot.hardware.platform} --early mkdir /mnt/vendor/persist/audio 0770 media audio - mkdir /persist/data 0700 system system + mkdir /mnt/vendor/persist/data 0700 system system mkdir /mnt/vendor/persist/display 0770 system graphics mkdir /mnt/vendor/persist/rfs 0770 root system mkdir /mnt/vendor/persist/hlos_rfs 0770 root system @@ -293,9 +293,9 @@ on zygote-start mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi # Mounting of persist is moved to 'on emmc-fs' and 'on fs' sections - # We chown/chmod /persist again so because mount is run as root + defaults - chown root system /persist - chmod 0771 /persist + # We chown/chmod /mnt/vendor/persist/ again so because mount is run as root + defaults + chown root system /mnt/vendor/persist/ + chmod 0771 /mnt/vendor/persist/ # Trigger WLAN driver load write /sys/kernel/boot_wlan/boot_wlan 1 |