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
6766cc9e
Commit
6766cc9e
authored
12 years ago
by
Kenny Root
Committed by
Gerrit Code Review
12 years ago
Browse files
Options
Downloads
Plain Diff
Merge "allow apps access to the keystore, dhcp/pptp fixes, wifi fixes and isolated_app access"
parents
91c12e3c
f26d8130
No related branches found
No related tags found
No related merge requests found
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
app.te
+22
-6
22 additions, 6 deletions
app.te
dhcp.te
+3
-1
3 additions, 1 deletion
dhcp.te
mtp.te
+2
-0
2 additions, 0 deletions
mtp.te
seapp_contexts
+1
-1
1 addition, 1 deletion
seapp_contexts
system.te
+4
-1
4 additions, 1 deletion
system.te
with
32 additions
and
9 deletions
app.te
+
22
−
6
View file @
6766cc9e
...
...
@@ -24,8 +24,7 @@ allow platform_app shell_data_file:file { open getattr read };
allow platform_app shell_data_file:lnk_file read;
# Populate /data/app/vmdl*.tmp file created by system server.
allow platform_app apk_tmp_file:file rw_file_perms;
# Read/[open] to /proc/net/xt_qtaguid/ctrl and /dev/xt_qtaguid
allow platform_app qtaguid_proc:file { open };
# Read /dev/xt_qtaguid
allow platform_app qtaguid_device:chr_file r_file_perms;
# Apps signed with the media key.
...
...
@@ -41,8 +40,7 @@ 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;
# Read/[write] to /proc/net/xt_qtaguid/ctrl and /dev/xt_qtaguid
allow media_app qtaguid_proc:file rw_file_perms;
# Read /dev/xt_qtaguid
allow media_app qtaguid_device:chr_file r_file_perms;
# Apps signed with the shared key.
...
...
@@ -66,9 +64,13 @@ net_domain(release_app)
bluetooth_domain(release_app)
# Read logs.
allow release_app log_device:chr_file read;
# Read /dev/xt_qtaguid
allow release_app qtaguid_device:chr_file r_file_perms;
# Services with isolatedProcess=true in their manifest.
type isolated_app, domain;
# In order for isolated_apps to interact with apps that have levelFromUid=true
# set it must be an mlstrustedsubject.
type isolated_app, domain, mlstrustedsubject;
app_domain(isolated_app)
#
...
...
@@ -128,6 +130,7 @@ allow untrusted_app sdcard:file create_file_perms;
bool app_ndk false;
if (app_ndk or android_cts) {
allow untrusted_app system_data_file:file { execute open };
allow isolated_app system_data_file:file { open execute };
}
# Read Logs
bool app_read_logs false;
...
...
@@ -139,6 +142,9 @@ allow untrusted_app log_device:chr_file read;
# Rules for all app domains.
#
# Allow apps to connect to the keystore
unix_socket_connect(appdomain, keystore, keystore)
# Receive and use open file descriptors inherited from zygote.
allow appdomain zygote:fd use;
...
...
@@ -173,7 +179,7 @@ allow appdomain anr_data_file:dir search;
allow appdomain anr_data_file:file { open append };
# Write to /proc/net/xt_qtaguid/ctrl file.
allow appdomain qtaguid_proc:file
write
;
allow appdomain qtaguid_proc:file
rw_file_perms
;
# Use the Binder.
binder_use(appdomain)
...
...
@@ -183,3 +189,13 @@ binder_transfer(appdomain, binderservicedomain)
# Perform binder IPC to other apps.
binder_call(appdomain, appdomain)
binder_transfer(appdomain, appdomain)
# Appdomain interaction with isolated apps
r_dir_file(appdomain, isolated_app)
# Already connected, unnamed sockets being passed over some other IPC
# hence no sock_file or connectto permission. This appears to be how
# Chrome works, may need to be updated as more apps using isolated services
# are examined.
allow appdomain isolated_app:unix_stream_socket { read write };
allow isolated_app appdomain:unix_stream_socket { read write };
This diff is collapsed.
Click to expand it.
dhcp.te
+
3
−
1
View file @
6766cc9e
...
...
@@ -11,6 +11,7 @@ allow dhcp self:packet_socket { create setopt bind write read };
allow dhcp self:netlink_route_socket { write nlmsg_write read create bind };
allow dhcp self:udp_socket { create ioctl };
allow dhcp shell_exec:file { read open execute };
allow dhcp system_file:file execute_no_trans;
allow dhcp proc:file write;
allow dhcp property_socket:sock_file write ;
allow dhcp system_prop:property_service set ;
...
...
@@ -19,4 +20,5 @@ allow dhcp dhcp_system_file:dir r_dir_perms;
unix_socket_connect(dhcp, property, init)
type_transition dhcp system_data_file:{ dir file } dhcp_data_file;
allow dhcp dhcp_data_file:dir { write add_name search };
allow dhcp dhcp_data_file:dir create_dir_perms;
allow dhcp dhcp_data_file:file create_file_perms;
This diff is collapsed.
Click to expand it.
mtp.te
+
2
−
0
View file @
6766cc9e
...
...
@@ -3,6 +3,7 @@ type mtp, domain;
type mtp_exec, exec_type, file_type;
init_daemon_domain(mtp)
net_domain(mtp)
# pptp policy
allow mtp self:tcp_socket { create setopt connect write read };
...
...
@@ -11,3 +12,4 @@ allow mtp self:rawip_socket create;
allow mtp self:capability net_raw;
allow mtp ppp:process signal;
allow mtp port:tcp_socket name_connect;
allow mtp vpn_data_file:dir search;
This diff is collapsed.
Click to expand it.
seapp_contexts
+
1
−
1
View file @
6766cc9e
...
...
@@ -41,4 +41,4 @@ user=_app seinfo=shared domain=shared_app type=platform_app_data_file
user=_app seinfo=media domain=media_app type=platform_app_data_file
user=_app seinfo=release domain=release_app type=platform_app_data_file
user=_app seinfo=release name=com.android.browser domain=browser_app type=platform_app_data_file
user=_isolated domain=isolated_app
levelFromUid=true
user=_isolated domain=isolated_app
This diff is collapsed.
Click to expand it.
system.te
+
4
−
1
View file @
6766cc9e
...
...
@@ -89,10 +89,13 @@ allow system mediaserver:process setsched;
allow system appdomain:dir r_dir_perms;
allow system appdomain:{ file lnk_file } rw_file_perms;
# Write to /proc/net/xt_qtaguid/ctrl.
#
Read/
Write to /proc/net/xt_qtaguid/ctrl
and and /dev/xt_qtaguid
.
allow system qtaguid_proc:file rw_file_perms;
allow system qtaguid_device:chr_file rw_file_perms;
# WifiWatchdog uses a packet_socket
allow system self:packet_socket *;
# Notify init of death.
allow system init:process sigchld;
...
...
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