diff options
author | Jeff Sharkey <jsharkey@android.com> | 2013-07-03 17:08:29 -0700 |
---|---|---|
committer | Jeff Sharkey <jsharkey@android.com> | 2013-08-08 17:26:41 -0700 |
commit | dfe0cbab3f9039f34af1dc9e31faf8155737ec2d (patch) | |
tree | 5d76170d80704f3578f316401f4fbe6ea8dc0f1d /sdcard/Android.mk | |
parent | 9face5cad5b4ffb883b23e1c45aafac73c712fd6 (diff) | |
download | core-dfe0cbab3f9039f34af1dc9e31faf8155737ec2d.tar.gz core-dfe0cbab3f9039f34af1dc9e31faf8155737ec2d.tar.bz2 core-dfe0cbab3f9039f34af1dc9e31faf8155737ec2d.zip |
Richer SD card permissions through FUSE.
Changes the FUSE daemon to synthesize an Android-specific set of
filesystem permissions, even when the underlying media storage is
permissionless. This is designed to support several features:
First, apps can access their own files in /Android/data/com.example/
without requiring any external storage permissions. This is enabled
by allowing o+x on parent directories, and assigning the UID owner
based on the directory name (package name). The mapping from package
to appId is parsed from packages.list, which is updated when apps are
added/removed. Changes are observed through inotify. It creates
missing package name directories when requested and valid.
Second, support for separate permissions for photos and audio/video
content on the device through new GIDs which are assigned based on
top-level directory names.
Finally, support for multi-user separation on the same physical media
through new /Android/user/ directory, which will be bind-mounted
into place. It recursively applies the above rules to each secondary
user.
rwxrwx--x root:sdcard_rw /
rwxrwx--- root:sdcard_pics /Pictures
rwxrwx--- root:sdcard_av /Music
rwxrwx--x root:sdcard_rw /Android
rwxrwx--x root:sdcard_rw /Android/data
rwxrwx--- u0_a12:sdcard_rw /Android/data/com.example
rwxrwx--x root:sdcard_rw /Android/obb/
rwxrwx--- u0_a12:sdcard_rw /Android/obb/com.example
rwxrwx--- root:sdcard_all /Android/user
rwxrwx--x root:sdcard_rw /Android/user/10
rwxrwx--- u10_a12:sdcard_rw /Android/user/10/Android/data/com.example
These derived permissions are disabled by default. Switched option
parsing to getopt().
Change-Id: I21bf5d79d13f0f07a6a116122b16395f4f97505b
Diffstat (limited to 'sdcard/Android.mk')
-rw-r--r-- | sdcard/Android.mk | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sdcard/Android.mk b/sdcard/Android.mk index fb04d6d35..4630db97c 100644 --- a/sdcard/Android.mk +++ b/sdcard/Android.mk @@ -6,6 +6,6 @@ LOCAL_SRC_FILES:= sdcard.c LOCAL_MODULE:= sdcard LOCAL_CFLAGS := -Wall -Wno-unused-parameter -LOCAL_SHARED_LIBRARIES := libc +LOCAL_SHARED_LIBRARIES := libc libcutils include $(BUILD_EXECUTABLE) |