aboutsummaryrefslogtreecommitdiffstats
path: root/dnsmasq.te
diff options
context:
space:
mode:
authorNick Kralevich <nnk@google.com>2013-06-27 15:11:02 -0700
committerNick Kralevich <nnk@google.com>2013-06-28 08:24:30 -0700
commitdbd28d91d3c6d970f1704df8350b0333b51758b1 (patch)
treed96f3856bea8e0de482ba8cb861e1483632b343b /dnsmasq.te
parent59444368da2fbe79ebc1b346eea9797f67c66566 (diff)
downloadandroid_external_sepolicy-dbd28d91d3c6d970f1704df8350b0333b51758b1.tar.gz
android_external_sepolicy-dbd28d91d3c6d970f1704df8350b0333b51758b1.tar.bz2
android_external_sepolicy-dbd28d91d3c6d970f1704df8350b0333b51758b1.zip
Enable SELinux protections for netd.
This change does several things: 1) Restore domain.te to the version present at cd516a32663b4eb11b2e3356b86450020e59e279 . This is the version currently being distributed in AOSP. 2) Add "allow domain properties_device:file r_file_perms;" to domain.te, to allow all domains to read /dev/__properties__ . This change was missing from AOSP. 3) Restore netd.te to the version present at 80c9ba5267f1a6ceffcf979471d101948b520ad6 . This is the version currently being distributed in AOSP. 4) Remove anything involving module loading from netd.te. CTS enforces that Android kernels can't have module loading enabled. 5) Add several new capabilities, plus data file rules, to netd.te, since netd needs to write to files owned by wifi. 6) Add a new unconfined domain called dnsmasq.te, and allow transitions from netd to that domain. Over time, we'll tighten up the dnsmasq.te domain. 7) Add a new unconfined domain called hostapd.te, and allow transitions from netd to that domain. Over time, we'll tighten up the hostapd.te domain. The net effect of these changes is to re-enable SELinux protections for netd. The policy is FAR from perfect, and allows a lot of wiggle room, but we can improve it over time. Testing: as much as possible, I've exercised networking related functionality, including turning on and off wifi, entering airplane mode, and enabling tethering and portable wifi hotspots. It's quite possible I've missed something, and if we experience problems, I can roll back this change. Bug: 9618347 Change-Id: I23ff3eebcef629bc7baabcf6962f25f116c4a3c0
Diffstat (limited to 'dnsmasq.te')
-rw-r--r--dnsmasq.te7
1 files changed, 7 insertions, 0 deletions
diff --git a/dnsmasq.te b/dnsmasq.te
new file mode 100644
index 0000000..ff81367
--- /dev/null
+++ b/dnsmasq.te
@@ -0,0 +1,7 @@
+type dnsmasq, domain;
+permissive dnsmasq;
+type dnsmasq_exec, exec_type, file_type;
+
+init_daemon_domain(dnsmasq)
+net_domain(dnsmasq)
+unconfined_domain(dnsmasq)