summaryrefslogtreecommitdiff
path: root/sdcard
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2013-08-30 13:58:13 -0700
committerJeff Sharkey <jsharkey@android.com>2013-08-30 13:58:13 -0700
commit39ff0ae0f66d7bc1499b30c9f75e187d329382ec (patch)
tree4ceb66ca08186c3cfa59b61faee5162d99538a7f /sdcard
parentaa04e818a4904b193e00d603785c93e888eab174 (diff)
Only check caller when deriving permissions.
Bug: 10547597 Change-Id: Ied909f9047c2567e93dde0f4658d6e4b9ff161ab
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 330d555b5..9a1dd17b7 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -488,6 +488,11 @@ static void derive_permissions_locked(struct fuse* fuse, struct node *parent,
/* Return if the calling UID holds sdcard_rw. */
static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) {
+ /* No additional permissions enforcement */
+ if (fuse->derive == DERIVE_NONE) {
+ return true;
+ }
+
appid_t appid = multiuser_get_app_id(hdr->uid);
return hashmapContainsKey(fuse->appid_with_rw, (void*) appid);
}