ANDROID: sdcardfs: Add sandbox
authorDaniel Rosenberg <drosen@google.com>
Thu, 25 Oct 2018 23:22:50 +0000 (16:22 -0700)
committerDanny Wood <danwood76@gmail.com>
Fri, 8 Nov 2019 12:04:15 +0000 (12:04 +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
Signed-off-by: Paul Keith <javelinanddart@gmail.com>
fs/sdcardfs/derived_perm.c

index 46af20db62c816587f55e0110f80d2c423ed568e..02e2ad40a7dcf77a1227a6e2bae2478045dc41ad 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;