Skip to content
Snippets Groups Projects
Commit fed8a2a4 authored by Nick Kralevich's avatar Nick Kralevich
Browse files

Remove transition / dyntransition from unconfined

Require all domain transitions or dyntransitions to be
explicitly specified in SELinux policy.

healthd: Remove healthd_exec / init_daemon_domain().
Healthd lives on the rootfs and has no unique file type.
It should be treated consistent with other similar domains.

Change-Id: Ief3c1167379cfb5383073fa33c9a95710a883b29
parent 76d14766
No related branches found
No related tags found
No related merge requests found
# healthd seclabel is specified in init.rc since # healthd seclabel is specified in init.rc since
# it lives in the rootfs and has no unique file type. # it lives in the rootfs and has no unique file type.
type healthd, domain; type healthd, domain;
type healthd_exec, exec_type, file_type;
init_daemon_domain(healthd)
allow healthd rootfs:file { read entrypoint }; allow healthd rootfs:file { read entrypoint };
write_klog(healthd) write_klog(healthd)
# /dev/__null__ created by init prior to policy load, # /dev/__null__ created by init prior to policy load,
......
...@@ -11,3 +11,11 @@ allow init {fs_type dev_type file_type}:dir_file_class_set relabelto; ...@@ -11,3 +11,11 @@ allow init {fs_type dev_type file_type}:dir_file_class_set relabelto;
allow init kernel:security load_policy; allow init kernel:security load_policy;
allow init usermodehelper:file rw_file_perms; allow init usermodehelper:file rw_file_perms;
allow init proc_security:file rw_file_perms; allow init proc_security:file rw_file_perms;
# Transitions to seclabel processes in init.rc
allow init adbd:process transition;
allow init healthd:process transition;
allow init recovery:process transition;
allow init shell:process transition;
allow init ueventd:process transition;
allow init watchdogd:process transition;
# Life begins with the kernel. # Life begins with the kernel.
type kernel, domain; type kernel, domain;
allow kernel init:process dyntransition;
# The kernel is unconfined. # The kernel is unconfined.
unconfined_domain(kernel) unconfined_domain(kernel)
relabelto_domain(kernel) relabelto_domain(kernel)
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
allow unconfineddomain self:capability_class_set *; allow unconfineddomain self:capability_class_set *;
allow unconfineddomain kernel:security ~{ load_policy setenforce setcheckreqprot }; allow unconfineddomain kernel:security ~{ load_policy setenforce setcheckreqprot };
allow unconfineddomain kernel:system *; allow unconfineddomain kernel:system *;
allow unconfineddomain domain:process ~{ execmem execstack execheap ptrace }; allow unconfineddomain domain:process ~{ execmem execstack execheap ptrace transition dyntransition };
allow unconfineddomain domain:fd *; allow unconfineddomain domain:fd *;
allow unconfineddomain domain:dir r_dir_perms; allow unconfineddomain domain:dir r_dir_perms;
allow unconfineddomain domain:lnk_file r_file_perms; allow unconfineddomain domain:lnk_file r_file_perms;
......
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