ANDROID: sdcardfs: Add sandbox
authorDaniel Rosenberg <drosen@google.com>
Thu, 25 Oct 2018 23:22:50 +0000 (16:22 -0700)
committerDaniel Rosenberg <drosen@google.com>
Wed, 28 Nov 2018 00:11:57 +0000 (00:11 +0000)
Android/sandbox is treated the same as Android/data

Bug: 27915347
Test: ls -l /sdcard/Android/sandbox/*somepackage* after
      creating the folder.
Signed-off-by: Daniel Rosenberg <drosen@google.com>
Change-Id: I7ef440a88df72198303c419e1f2f7c4657f9c170

fs/sdcardfs/derived_perm.c

index 0b3b22334e54a27c09eb4f3e6e3008c16701202a..ea0d9900eb6a41f9c8b27901a53e3deb7b840446 100644 (file)
@@ -62,6 +62,7 @@ void get_derived_permission_new(struct dentry *parent, struct dentry *dentry,
        int err;
        struct qstr q_Android = QSTR_LITERAL("Android");
        struct qstr q_data = QSTR_LITERAL("data");
+       struct qstr q_sandbox = QSTR_LITERAL("sandbox");
        struct qstr q_obb = QSTR_LITERAL("obb");
        struct qstr q_media = QSTR_LITERAL("media");
        struct qstr q_cache = QSTR_LITERAL("cache");
@@ -110,6 +111,9 @@ void get_derived_permission_new(struct dentry *parent, struct dentry *dentry,
                if (qstr_case_eq(name, &q_data)) {
                        /* App-specific directories inside; let anyone traverse */
                        info->data->perm = PERM_ANDROID_DATA;
+               } else if (qstr_case_eq(name, &q_sandbox)) {
+                       /* App-specific directories inside; let anyone traverse */
+                       info->data->perm = PERM_ANDROID_DATA;
                } else if (qstr_case_eq(name, &q_obb)) {
                        /* App-specific directories inside; let anyone traverse */
                        info->data->perm = PERM_ANDROID_OBB;