Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ac3ed1d authored by Nick Kralevich's avatar Nick Kralevich
Browse files

resist umask changes, make dirs 0711

Make sure /data/user directory permissions get explicitly set
regardless of the system umask.

Change directory permissions to 0711. No need for read permissions.

Bug: 3272072
Change-Id: Ida7f3c6656f4e0c9d0a9f7648491cc853c4e44ca
parent cbe55a1c
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -332,12 +332,15 @@ int initialize_directories() {
        ret = 0;
        // Make the /data/user directory if necessary
        if (access(user_data_dir, R_OK) < 0) {
            if (mkdir(user_data_dir, 0755) < 0) {
            if (mkdir(user_data_dir, 0711) < 0) {
                return -1;
            }
            if (chown(user_data_dir, AID_SYSTEM, AID_SYSTEM) < 0) {
                return -1;
            }
            if (chmod(user_data_dir, 0711) < 0) {
                return -1;
            }
        }
        // Make the /data/user/0 symlink to /data/data if necessary
        if (access(primary_data_dir, R_OK) < 0) {