Skip to content
Snippets Groups Projects
Commit 0f950ce9 authored by Nick Kralevich's avatar Nick Kralevich Committed by Android Git Automerger
Browse files

am d233350b: Merge "Support running adbd in the su domain."

* commit 'd233350b':
  Support running adbd in the su domain.
parents bd8adee9 d233350b
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ type adbd, domain;
userdebug_or_eng(`
permissive adbd;
allow adbd su:process dyntransition;
')
domain_auto_trans(adbd, shell_exec, shell)
......
......@@ -28,6 +28,20 @@ allow domain adbd:unix_stream_socket connectto;
allow domain adbd:fd use;
allow domain adbd:unix_stream_socket { getattr getopt read write shutdown };
userdebug_or_eng(`
# Same as adbd rules above, except allow su to do the same thing
allow domain su:unix_stream_socket connectto;
allow domain su:fd use;
allow domain su:unix_stream_socket { getattr getopt read write shutdown };
# Running something like "pm dump com.android.bluetooth" requires
# fifo writes
allow domain su:fifo_file { write getattr };
# allow "gdbserver --attach" to work for su.
allow domain su:process sigchld;
')
###
### Talk to debuggerd.
###
......
......@@ -12,6 +12,11 @@ userdebug_or_eng(`
# su is unconfined.
unconfined_domain(su)
allow su ashmem_device:chr_file execute;
allow su self:process execmem;
tmpfs_domain(su)
allow su su_tmpfs:file execute;
# su is also permissive to permit setenforce.
permissive su;
')
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