summaryrefslogtreecommitdiffstats
path: root/sdcard
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2015-08-06 11:39:44 -0700
committerJeff Sharkey <jsharkey@android.com>2015-08-06 11:45:31 -0700
commitb9f438ff841f87c8ffbca85b13a533718a18e15f (patch)
tree7705d99d1e1bcb8573f53c9f0adebbf5df125564 /sdcard
parentd57125af1a81f34b162ecd5de81e6f1365aff588 (diff)
downloadsystem_core-b9f438ff841f87c8ffbca85b13a533718a18e15f.zip
system_core-b9f438ff841f87c8ffbca85b13a533718a18e15f.tar.gz
system_core-b9f438ff841f87c8ffbca85b13a533718a18e15f.tar.bz2
Protect runtime storage mount points.
We have a bunch of magic that mounts the correct view of storage access based on the runtime permissions of an app, but we forgot to protect the real underlying data sources; oops. This series of changes just bumps the directory heirarchy one level to give us /mnt/runtime which we can mask off as 0700 to prevent people from jumping to the exposed internals. Also add CTS tests to verify that we're protecting access to internal mount points like this. Bug: 22964288 Change-Id: I32068e63a3362b37e8ebca1418f900bb8537b498
Diffstat (limited to 'sdcard')
-rw-r--r--sdcard/sdcard.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sdcard/sdcard.c b/sdcard/sdcard.c
index 41bf045..a79e2dd 100644
--- a/sdcard/sdcard.c
+++ b/sdcard/sdcard.c
@@ -1735,7 +1735,7 @@ static int usage() {
" -g: specify GID to run as\n"
" -U: specify user ID that owns device\n"
" -m: source_path is multi-user\n"
- " -w: runtime_write mount has full write access\n"
+ " -w: runtime write mount has full write access\n"
"\n");
return 1;
}
@@ -1822,9 +1822,9 @@ static void run(const char* source_path, const char* label, uid_t uid,
global.fuse_read = &fuse_read;
global.fuse_write = &fuse_write;
- snprintf(fuse_default.dest_path, PATH_MAX, "/mnt/runtime_default/%s", label);
- snprintf(fuse_read.dest_path, PATH_MAX, "/mnt/runtime_read/%s", label);
- snprintf(fuse_write.dest_path, PATH_MAX, "/mnt/runtime_write/%s", label);
+ snprintf(fuse_default.dest_path, PATH_MAX, "/mnt/runtime/default/%s", label);
+ snprintf(fuse_read.dest_path, PATH_MAX, "/mnt/runtime/read/%s", label);
+ snprintf(fuse_write.dest_path, PATH_MAX, "/mnt/runtime/write/%s", label);
handler_default.fuse = &fuse_default;
handler_read.fuse = &fuse_read;