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

Move unconfined domains out of permissive mode.

This change removes the permissive line from unconfined
domains. Unconfined domains can do (mostly) anything, so moving
these domains into enforcing should be a no-op.

The following domains were deliberately NOT changed:
1) kernel
2) init

In the future, this gives us the ability to tighten up the
rules in unconfined, and have those tightened rules actually
work.

When we're ready to tighten up the rules for these domains,
we can:

1) Remove unconfined_domain and re-add the permissive line.
2) Submit the domain in permissive but NOT unconfined.
3) Remove the permissive line
4) Wait a few days and submit the no-permissive change.

For instance, if we were ready to do this for adb, we'd identify
a list of possible rules which allow adbd to work, re-add
the permissive line, and then upload those changes to AOSP.
After sufficient testing, we'd then move adb to enforcing.
We'd repeat this for each domain until everything is enforcing
and out of unconfined.

Change-Id: If674190de3262969322fb2e93d9a0e734f8b9245
parent 610a4b1c
No related branches found
No related tags found
No related merge requests found
# adbd seclabel is specified in init.rc since # adbd 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 adbd, domain; type adbd, domain;
permissive adbd;
unconfined_domain(adbd) unconfined_domain(adbd)
domain_auto_trans(adbd, shell_exec, shell) domain_auto_trans(adbd, shell_exec, shell)
# this is an entrypoint # this is an entrypoint
......
# bluetooth subsystem # bluetooth subsystem
type bluetooth, domain; type bluetooth, domain;
permissive bluetooth;
app_domain(bluetooth) app_domain(bluetooth)
unconfined_domain(bluetooth) unconfined_domain(bluetooth)
# 464xlat daemon # 464xlat daemon
type clatd, domain; type clatd, domain;
permissive clatd;
type clatd_exec, exec_type, file_type; type clatd_exec, exec_type, file_type;
init_daemon_domain(clatd) init_daemon_domain(clatd)
......
# debugger interface # debugger interface
type debuggerd, domain; type debuggerd, domain;
permissive debuggerd;
type debuggerd_exec, exec_type, file_type; type debuggerd_exec, exec_type, file_type;
init_daemon_domain(debuggerd) init_daemon_domain(debuggerd)
......
type dhcp, domain; type dhcp, domain;
permissive dhcp;
type dhcp_exec, exec_type, file_type; type dhcp_exec, exec_type, file_type;
type dhcp_data_file, file_type, data_file_type; type dhcp_data_file, file_type, data_file_type;
type dhcp_system_file, file_type, data_file_type; type dhcp_system_file, file_type, data_file_type;
......
type dnsmasq, domain; type dnsmasq, domain;
permissive dnsmasq;
type dnsmasq_exec, exec_type, file_type; type dnsmasq_exec, exec_type, file_type;
init_daemon_domain(dnsmasq) init_daemon_domain(dnsmasq)
......
# drmserver - DRM service # drmserver - DRM service
type drmserver, domain; type drmserver, domain;
permissive drmserver;
type drmserver_exec, exec_type, file_type; type drmserver_exec, exec_type, file_type;
init_daemon_domain(drmserver) init_daemon_domain(drmserver)
......
# gpsd - GPS daemon # gpsd - GPS daemon
type gpsd, domain; type gpsd, domain;
permissive gpsd;
type gpsd_exec, exec_type, file_type; type gpsd_exec, exec_type, file_type;
init_daemon_domain(gpsd) init_daemon_domain(gpsd)
......
type hci_attach, domain; type hci_attach, domain;
permissive hci_attach;
type hci_attach_exec, exec_type, file_type; type hci_attach_exec, exec_type, file_type;
init_daemon_domain(hci_attach) init_daemon_domain(hci_attach)
......
# 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;
permissive healthd;
type healthd_exec, exec_type, file_type; type healthd_exec, exec_type, file_type;
init_daemon_domain(healthd) init_daemon_domain(healthd)
......
type hostapd, domain; type hostapd, domain;
permissive hostapd;
type hostapd_exec, exec_type, file_type; type hostapd_exec, exec_type, file_type;
init_daemon_domain(hostapd) init_daemon_domain(hostapd)
......
# Restricted domain for shell processes spawned by init # Restricted domain for shell processes spawned by init
type init_shell, domain; type init_shell, domain;
permissive init_shell;
domain_auto_trans(init, shell_exec, init_shell) domain_auto_trans(init, shell_exec, init_shell)
unconfined_domain(init_shell) unconfined_domain(init_shell)
type keystore, domain; type keystore, domain;
permissive keystore;
type keystore_exec, exec_type, file_type; type keystore_exec, exec_type, file_type;
# keystore daemon # keystore daemon
......
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
### ###
type media_app, domain; type media_app, domain;
permissive media_app;
app_domain(media_app) app_domain(media_app)
platform_app_domain(media_app) platform_app_domain(media_app)
# Access the network. # Access the network.
......
# mediaserver - multimedia daemon # mediaserver - multimedia daemon
type mediaserver, domain; type mediaserver, domain;
permissive mediaserver;
type mediaserver_exec, exec_type, file_type; type mediaserver_exec, exec_type, file_type;
net_domain(mediaserver) net_domain(mediaserver)
......
# vpn tunneling protocol manager # vpn tunneling protocol manager
type mtp, domain; type mtp, domain;
permissive mtp;
type mtp_exec, exec_type, file_type; type mtp_exec, exec_type, file_type;
init_daemon_domain(mtp) init_daemon_domain(mtp)
......
# nfc subsystem # nfc subsystem
type nfc, domain; type nfc, domain;
permissive nfc;
app_domain(nfc) app_domain(nfc)
unconfined_domain(nfc) unconfined_domain(nfc)
type ping, domain; type ping, domain;
permissive ping;
type ping_exec, exec_type, file_type; type ping_exec, exec_type, file_type;
domain_auto_trans(shell, ping_exec, ping) domain_auto_trans(shell, ping_exec, ping)
unconfined_domain(ping) unconfined_domain(ping)
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
### ###
type platform_app, domain; type platform_app, domain;
permissive platform_app;
app_domain(platform_app) app_domain(platform_app)
platform_app_domain(platform_app) platform_app_domain(platform_app)
# Access the network. # Access the network.
......
# Point to Point Protocol daemon # Point to Point Protocol daemon
type ppp, domain; type ppp, domain;
permissive ppp;
type ppp_device, dev_type; type ppp_device, dev_type;
type ppp_exec, exec_type, file_type; type ppp_exec, exec_type, file_type;
type ppp_system_file, file_type; type ppp_system_file, file_type;
......
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