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
f3b587ca
Commit
f3b587ca
authored
12 years ago
by
Stephen Smalley
Browse files
Options
Downloads
Patches
Plain Diff
Rewrite app domains and seapp_contexts to leverage new seinfo tags.
parent
92495b38
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
app.te
+50
-17
50 additions, 17 deletions
app.te
seapp_contexts
+5
-2
5 additions, 2 deletions
seapp_contexts
with
55 additions
and
19 deletions
app.te
+
50
−
17
View file @
f3b587ca
...
...
@@ -4,31 +4,64 @@
#
#
#
Trusted apps
.
#
Apps signed with the platform key
.
#
type
trusted
_app, domain;
app_domain(
trusted
_app)
type
platform
_app, domain;
app_domain(
platform
_app)
# Access the network.
net_domain(
trusted
_app)
net_domain(
platform
_app)
# Access bluetooth.
bluetooth_domain(
trusted
_app)
bluetooth_domain(
platform
_app)
# Read logs.
allow trusted_app log_device:chr_file read;
# Access /dev/mtp_usb.
# XXX Split android.process.media into a separate domain?
allow trusted_app mtp_device:chr_file rw_file_perms;
allow platform_app log_device:chr_file read;
# Write to /cache.
allow
trusted
_app cache_file:dir rw_dir_perms;
allow
trusted
_app cache_file:file create_file_perms;
allow
platform
_app cache_file:dir rw_dir_perms;
allow
platform
_app cache_file:file create_file_perms;
# Read from /data/local.
allow
trusted
_app shell_data_file:dir search;
allow
trusted
_app shell_data_file:file { open getattr read };
allow
trusted
_app shell_data_file:lnk_file read;
allow
platform
_app shell_data_file:dir search;
allow
platform
_app shell_data_file:file { open getattr read };
allow
platform
_app shell_data_file:lnk_file read;
# Access the sdcard.
allow
trusted
_app sdcard:dir create_dir_perms;
allow
trusted
_app sdcard:file create_file_perms;
allow
platform
_app sdcard:dir create_dir_perms;
allow
platform
_app sdcard:file create_file_perms;
# Populate /data/app/vmdl*.tmp file created by system server.
allow trusted_app apk_tmp_file:file rw_file_perms;
allow platform_app apk_tmp_file:file rw_file_perms;
# Apps signed with the media key.
type media_app, domain;
app_domain(media_app)
# Access the network.
net_domain(media_app)
# Read logs.
allow media_app log_device:chr_file read;
# Access /dev/mtp_usb.
allow media_app mtp_device:chr_file rw_file_perms;
# Write to /cache.
allow media_app cache_file:dir rw_dir_perms;
allow media_app cache_file:file create_file_perms;
# Access sdcard.
allow media_app sdcard:dir r_dir_perms;
allow media_app sdcard:file r_file_perms;
# Apps signed with the shared key.
type shared_app, domain;
app_domain(shared_app)
# Access the network.
net_domain(shared_app)
# Access bluetooth.
bluetooth_domain(shared_app)
# Read logs.
allow shared_app log_device:chr_file read;
# Apps signed with the release key (testkey in AOSP).
type release_app, domain;
app_domain(release_app)
# Access the network.
net_domain(release_app)
# Access bluetooth.
bluetooth_domain(release_app)
# Read logs.
allow release_app log_device:chr_file read;
#
# An example of a specific domain for a specific app
...
...
This diff is collapsed.
Click to expand it.
seapp_contexts
+
5
−
2
View file @
f3b587ca
...
...
@@ -33,5 +33,8 @@ user=system domain=system_app type=system_data_file
user=nfc domain=nfc type=nfc_data_file
user=radio domain=radio type=radio_data_file
user=app_* domain=untrusted_app type=app_data_file levelFromUid=true
user=app_* seinfo=systemApp domain=trusted_app levelFromUid=true
user=app_* seinfo=systemApp name=com.android.browser domain=browser_app levelFromUid=true
user=app_* seinfo=platform domain=platform_app levelFromUid=true
user=app_* seinfo=shared domain=shared_app levelFromUid=true
user=app_* seinfo=media domain=media_app levelFromUid=true
user=app_* seinfo=release domain=release_app levelFromUid=true
user=app_* seinfo=release name=com.android.browser domain=browser_app levelFromUid=true
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