Skip to content
Snippets Groups Projects
Commit 825a11cd authored by Nathan Harold's avatar Nathan Harold Committed by android-build-merger
Browse files

Allow More Apps to Recv UDP Sockets from SystemServer am: ee268643

am: 0003e3d5

Change-Id: I9b40bf692885a09c7303ae22ba765a0098660e18
parents 7b271ce4 0003e3d5
No related branches found
No related tags found
No related merge requests found
# TODO: deal with tmpfs_domain pub/priv split properly # TODO: deal with tmpfs_domain pub/priv split properly
# Read system properties managed by zygote. # Read system properties managed by zygote.
allow appdomain zygote_tmpfs:file read; allow appdomain zygote_tmpfs:file read;
neverallow appdomain system_server:udp_socket {
accept append bind create getopt ioctl listen lock name_bind
relabelfrom relabelto setattr setopt shutdown };
...@@ -41,6 +41,10 @@ allow ephemeral_app traced:fd use; ...@@ -41,6 +41,10 @@ allow ephemeral_app traced:fd use;
allow ephemeral_app traced_tmpfs:file { read write getattr map }; allow ephemeral_app traced_tmpfs:file { read write getattr map };
unix_socket_connect(ephemeral_app, traced_producer, traced) unix_socket_connect(ephemeral_app, traced_producer, traced)
# allow ephemeral apps to use UDP sockets provided by the system server but not
# modify them other than to connect
allow ephemeral_app system_server:udp_socket { connect getattr read recvfrom sendto write };
### ###
### neverallow rules ### neverallow rules
### ###
......
...@@ -67,6 +67,10 @@ allow platform_app preloads_media_file:dir r_dir_perms; ...@@ -67,6 +67,10 @@ allow platform_app preloads_media_file:dir r_dir_perms;
read_runtime_log_tags(platform_app) read_runtime_log_tags(platform_app)
# allow platform apps to use UDP sockets provided by the system server but not
# modify them other than to connect
allow platform_app system_server:udp_socket { connect getattr read recvfrom sendto write };
### ###
### Neverallow rules ### Neverallow rules
### ###
......
...@@ -128,6 +128,10 @@ dontaudit priv_app device:dir read; ...@@ -128,6 +128,10 @@ dontaudit priv_app device:dir read;
dontaudit priv_app proc_interrupts:file read; dontaudit priv_app proc_interrupts:file read;
dontaudit priv_app proc_modules:file read; dontaudit priv_app proc_modules:file read;
# allow privileged apps to use UDP sockets provided by the system server but not
# modify them other than to connect
allow priv_app system_server:udp_socket { connect getattr read recvfrom sendto write };
### ###
### neverallow rules ### neverallow rules
### ###
......
...@@ -114,6 +114,10 @@ allow system_app { ...@@ -114,6 +114,10 @@ allow system_app {
control_logd(system_app) control_logd(system_app)
read_runtime_log_tags(system_app) read_runtime_log_tags(system_app)
# allow system apps to use UDP sockets provided by the system server but not
# modify them other than to connect
allow system_app system_server:udp_socket { connect getattr read recvfrom sendto write };
### ###
### Neverallow rules ### Neverallow rules
### ###
......
...@@ -24,14 +24,6 @@ untrusted_app_domain(untrusted_app) ...@@ -24,14 +24,6 @@ untrusted_app_domain(untrusted_app)
net_domain(untrusted_app) net_domain(untrusted_app)
bluetooth_domain(untrusted_app) bluetooth_domain(untrusted_app)
# allow untrusted apps to use UDP sockets provided by the system server but not
# modify them other than to connect
allow untrusted_app system_server:udp_socket { connect getattr read recvfrom sendto write };
# Allow the allocation and use of ptys # Allow the allocation and use of ptys
# Used by: https://play.google.com/store/apps/details?id=jackpal.androidterm # Used by: https://play.google.com/store/apps/details?id=jackpal.androidterm
create_pty(untrusted_app) create_pty(untrusted_app)
neverallow untrusted_app system_server:udp_socket {
accept append bind create getopt ioctl listen lock name_bind
relabelfrom relabelto setattr setopt shutdown };
...@@ -111,3 +111,7 @@ allow untrusted_app_all vendor_app_file:lnk_file { open getattr read }; ...@@ -111,3 +111,7 @@ allow untrusted_app_all vendor_app_file:lnk_file { open getattr read };
allow untrusted_app_all traced:fd use; allow untrusted_app_all traced:fd use;
allow untrusted_app_all traced_tmpfs:file { read write getattr map }; allow untrusted_app_all traced_tmpfs:file { read write getattr map };
unix_socket_connect(untrusted_app_all, traced_producer, traced) unix_socket_connect(untrusted_app_all, traced_producer, traced)
# allow untrusted apps to use UDP sockets provided by the system server but not
# modify them other than to connect
allow untrusted_app_all system_server:udp_socket { connect getattr read recvfrom sendto write };
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment