Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
sepolicy
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test
platform
system
sepolicy
Commits
b7f86a72
Commit
b7f86a72
authored
8 years ago
by
Treehugger Robot
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Allow ephemeral apps to read/write external storage"
parents
2796009e
3d348fd6
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
private/ephemeral_app.te
+7
-0
7 additions, 0 deletions
private/ephemeral_app.te
public/app.te
+2
-2
2 additions, 2 deletions
public/app.te
with
9 additions
and
2 deletions
private/ephemeral_app.te
+
7
−
0
View file @
b7f86a72
...
@@ -22,6 +22,9 @@ allow ephemeral_app ephemeral_data_file:{ file sock_file fifo_file } create_file
...
@@ -22,6 +22,9 @@ allow ephemeral_app ephemeral_data_file:{ file sock_file fifo_file } create_file
allow ephemeral_app ephemeral_apk_data_file:dir r_dir_perms;
allow ephemeral_app ephemeral_apk_data_file:dir r_dir_perms;
allow ephemeral_app ephemeral_apk_data_file:file { r_file_perms execute };
allow ephemeral_app ephemeral_apk_data_file:file { r_file_perms execute };
# Allow ephemeral apps to read/write files in visible storage if provided fds
allow ephemeral_app { sdcard_type media_rw_data_file }:file {read write getattr ioctl lock append};
# services
# services
allow ephemeral_app surfaceflinger_service:service_manager find;
allow ephemeral_app surfaceflinger_service:service_manager find;
allow ephemeral_app radio_service:service_manager find;
allow ephemeral_app radio_service:service_manager find;
...
@@ -54,3 +57,7 @@ neverallow ephemeral_app sysfs:file *;
...
@@ -54,3 +57,7 @@ neverallow ephemeral_app sysfs:file *;
# Avoid reads from generically labeled /proc files
# Avoid reads from generically labeled /proc files
# Create a more specific label if needed
# Create a more specific label if needed
neverallow ephemeral_app proc:file { no_rw_file_perms no_x_file_perms };
neverallow ephemeral_app proc:file { no_rw_file_perms no_x_file_perms };
# Directly access external storage
neverallow ephemeral_app { sdcard_type media_rw_data_file }:file {open create};
neverallow ephemeral_app { sdcard_type media_rw_data_file }:dir search;
This diff is collapsed.
Click to expand it.
public/app.te
+
2
−
2
View file @
b7f86a72
...
@@ -197,8 +197,8 @@ allow { appdomain -isolated_app -ephemeral_app } media_rw_data_file:file create_
...
@@ -197,8 +197,8 @@ allow { appdomain -isolated_app -ephemeral_app } media_rw_data_file:file create_
# Access OBBs (vfat images) mounted by vold (b/17633509)
# Access OBBs (vfat images) mounted by vold (b/17633509)
# File write access allowed for FDs returned through Storage Access Framework
# File write access allowed for FDs returned through Storage Access Framework
allow { appdomain -isolated_app } vfat:dir r_dir_perms;
allow { appdomain -isolated_app
-ephemeral_app
} vfat:dir r_dir_perms;
allow { appdomain -isolated_app } vfat:file rw_file_perms;
allow { appdomain -isolated_app
-ephemeral_app
} vfat:file rw_file_perms;
# Allow apps to use the USB Accessory interface.
# Allow apps to use the USB Accessory interface.
# http://developer.android.com/guide/topics/connectivity/usb/accessory.html
# http://developer.android.com/guide/topics/connectivity/usb/accessory.html
...
...
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