diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-08-30 21:03:40 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2013-08-30 21:03:41 +0000 |
commit | 5835ac9e31aea910adb6b9d2de1d63df771df45b (patch) | |
tree | 14b376e9cb475d3aa24889d5568c79b16abd73f7 | |
parent | 5856fd8935b8aa499930daed29105f6419a96a5e (diff) | |
parent | 39ff0ae0f66d7bc1499b30c9f75e187d329382ec (diff) | |
download | system_core-5835ac9e31aea910adb6b9d2de1d63df771df45b.zip system_core-5835ac9e31aea910adb6b9d2de1d63df771df45b.tar.gz system_core-5835ac9e31aea910adb6b9d2de1d63df771df45b.tar.bz2 |
Merge "Only check caller when deriving permissions." into klp-dev
-rw-r--r-- | sdcard/sdcard.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c index 330d555..9a1dd17 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); } |