diff options
author | Jeff Sharkey | 2013-08-30 15:58:13 -0500 |
---|---|---|
committer | The Android Automerger | 2013-08-30 16:13:23 -0500 |
commit | c6480909e5819e7e9eae4b3c9864cc5bef704d21 (patch) | |
tree | 14b376e9cb475d3aa24889d5568c79b16abd73f7 | |
parent | ec0639a58a8c018dd8742762f1c4899e013ffc65 (diff) | |
download | platform-system-core-c6480909e5819e7e9eae4b3c9864cc5bef704d21.tar.gz platform-system-core-c6480909e5819e7e9eae4b3c9864cc5bef704d21.tar.xz platform-system-core-c6480909e5819e7e9eae4b3c9864cc5bef704d21.zip |
Only check caller when deriving permissions.
Bug: 10547597
Change-Id: Ied909f9047c2567e93dde0f4658d6e4b9ff161ab
-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 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, | |||
488 | 488 | ||
489 | /* Return if the calling UID holds sdcard_rw. */ | 489 | /* Return if the calling UID holds sdcard_rw. */ |
490 | static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) { | 490 | static bool get_caller_has_rw_locked(struct fuse* fuse, const struct fuse_in_header *hdr) { |
491 | /* No additional permissions enforcement */ | ||
492 | if (fuse->derive == DERIVE_NONE) { | ||
493 | return true; | ||
494 | } | ||
495 | |||
491 | appid_t appid = multiuser_get_app_id(hdr->uid); | 496 | appid_t appid = multiuser_get_app_id(hdr->uid); |
492 | return hashmapContainsKey(fuse->appid_with_rw, (void*) appid); | 497 | return hashmapContainsKey(fuse->appid_with_rw, (void*) appid); |
493 | } | 498 | } |