Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemSEPolicy
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemSEPolicy
Commits
626edc75
Commit
626edc75
authored
8 years ago
by
Treehugger Robot
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "isolated_app: no sdcard access"
parents
2ff6b4da
ce4b5eea
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
public/app.te
+16
-16
16 additions, 16 deletions
public/app.te
public/isolated_app.te
+7
-0
7 additions, 0 deletions
public/isolated_app.te
with
23 additions
and
16 deletions
public/app.te
+
16
−
16
View file @
626edc75
...
...
@@ -37,8 +37,8 @@ allow appdomain dalvikcache_data_file:dir { search getattr };
allow appdomain dalvikcache_data_file:file r_file_perms;
# Read the /sdcard and /mnt/sdcard symlinks
allow appdomain rootfs:lnk_file r_file_perms;
allow appdomain tmpfs:lnk_file r_file_perms;
allow
{
appdomain
-isolated_app }
rootfs:lnk_file r_file_perms;
allow
{
appdomain
-isolated_app }
tmpfs:lnk_file r_file_perms;
# Search /storage/emulated tmpfs mount.
allow appdomain tmpfs:dir r_dir_perms;
...
...
@@ -174,36 +174,36 @@ allow appdomain system_data_file:lnk_file r_file_perms;
allow appdomain system_data_file:file { getattr read };
# Allow read/stat of /data/media files passed by Binder or local socket IPC.
allow appdomain media_rw_data_file:file { read getattr };
allow
{
appdomain
-isolated_app }
media_rw_data_file:file { read getattr };
# Read and write /data/data/com.android.providers.telephony files passed over Binder.
allow appdomain radio_data_file:file { read write getattr };
allow
{
appdomain
-isolated_app }
radio_data_file:file { read write getattr };
# Allow access to external storage; we have several visible mount points under /storage
# and symlinks to primary storage at places like /storage/sdcard0 and /mnt/user/0/primary
allow appdomain storage_file:dir r_dir_perms;
allow appdomain storage_file:lnk_file r_file_perms;
allow appdomain mnt_user_file:dir r_dir_perms;
allow appdomain mnt_user_file:lnk_file r_file_perms;
allow
{
appdomain
-isolated_app }
storage_file:dir r_dir_perms;
allow
{
appdomain
-isolated_app }
storage_file:lnk_file r_file_perms;
allow
{
appdomain
-isolated_app }
mnt_user_file:dir r_dir_perms;
allow
{
appdomain
-isolated_app }
mnt_user_file:lnk_file r_file_perms;
# Read/write visible storage
allow appdomain fuse:dir create_dir_perms;
allow appdomain fuse:file create_file_perms;
allow appdomain sdcardfs:dir create_dir_perms;
allow appdomain sdcardfs:file create_file_perms;
allow
{
appdomain
-isolated_app }
fuse:dir create_dir_perms;
allow
{
appdomain
-isolated_app }
fuse:file create_file_perms;
allow
{
appdomain
-isolated_app }
sdcardfs:dir create_dir_perms;
allow
{
appdomain
-isolated_app }
sdcardfs:file create_file_perms;
# Access OBBs (vfat images) mounted by vold (b/17633509)
# File write access allowed for FDs returned through Storage Access Framework
allow appdomain vfat:dir r_dir_perms;
allow appdomain vfat:file rw_file_perms;
allow
{
appdomain
-isolated_app }
vfat:dir r_dir_perms;
allow
{
appdomain
-isolated_app }
vfat:file rw_file_perms;
# Allow apps to use the USB Accessory interface.
# http://developer.android.com/guide/topics/connectivity/usb/accessory.html
#
# USB devices are first opened by the system server (USBDeviceManagerService)
# and the file descriptor is passed to the right Activity via binder.
allow appdomain usb_device:chr_file { read write getattr ioctl };
allow appdomain usbaccessory_device:chr_file { read write getattr };
allow
{
appdomain
-isolated_app }
usb_device:chr_file { read write getattr ioctl };
allow
{
appdomain
-isolated_app }
usbaccessory_device:chr_file { read write getattr };
# For art.
allow appdomain dalvikcache_data_file:file execute;
...
...
This diff is collapsed.
Click to expand it.
public/isolated_app.te
+
7
−
0
View file @
626edc75
...
...
@@ -76,3 +76,10 @@ neverallow isolated_app *:{
netlink_netfilter_socket netlink_generic_socket netlink_scsitransport_socket
netlink_rdma_socket netlink_crypto_socket
} *;
# Do not allow isolated_app to access external storage
neverallow isolated_app { storage_file mnt_user_file sdcard_type }:dir ~getattr;
neverallow isolated_app { storage_file mnt_user_file sdcard_type }:file_class_set *;
# Do not allow USB access
neverallow isolated_app { usb_device usbaccessory_device }:chr_file *;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment