* [PATCH v2 1/2] dnsmasq: Require log files to have .log suffix
@ 2018-11-12 6:42 Petr Vorel
2018-11-12 6:42 ` [PATCH v2 2/2] dnsmasq: Add support for lxc-net, lxd-bridge, NetworkManager Petr Vorel
0 siblings, 1 reply; 2+ messages in thread
From: Petr Vorel @ 2018-11-12 6:42 UTC (permalink / raw)
To: selinux-refpolicy; +Cc: Petr Vorel, Chris PeBenito, Dan Walsh
+ allow log rotate as well.
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2
* support log rotate patterns (requested by Chris PeBenito)
---
policy/modules/services/dnsmasq.fc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/policy/modules/services/dnsmasq.fc b/policy/modules/services/dnsmasq.fc
index 29d71c91..f7e83d3c 100644
--- a/policy/modules/services/dnsmasq.fc
+++ b/policy/modules/services/dnsmasq.fc
@@ -13,7 +13,7 @@
/var/lib/misc/dnsmasq\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0)
/var/lib/dnsmasq(/.*)? gen_context(system_u:object_r:dnsmasq_lease_t,s0)
-/var/log/dnsmasq.* -- gen_context(system_u:object_r:dnsmasq_var_log_t,s0)
+/var/log/dnsmasq(.*)?\.log(\..+) -- gen_context(system_u:object_r:dnsmasq_var_log_t,s0)
/run/dnsmasq.* -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
/run/libvirt/network(/.*)? gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH v2 2/2] dnsmasq: Add support for lxc-net, lxd-bridge, NetworkManager
2018-11-12 6:42 [PATCH v2 1/2] dnsmasq: Require log files to have .log suffix Petr Vorel
@ 2018-11-12 6:42 ` Petr Vorel
0 siblings, 0 replies; 2+ messages in thread
From: Petr Vorel @ 2018-11-12 6:42 UTC (permalink / raw)
To: selinux-refpolicy; +Cc: Petr Vorel, Chris PeBenito, Dan Walsh
* lxc-net pid and lease files:
/var/run/lxc/dnsmasq.pid
/var/lib/misc/dnsmasq.*.leases
* lxd-bridge pid and lease files:
/var/run/lxd-bridge/dnsmasq.pid
/var/lib/lxd-bridge/dnsmasq.*.leases
/var/lib/lxd/networks/*/dnsmasq.leases
/var/lib/lxd/networks/*/dnsmasq.pid
* NetworkManager pid, lease and configuration files:
/var/lib/NetworkManager/dnsmasq-*.leases
/run/nm-dns-dnsmasq.conf
/run/nm-dnsmasq-*.pid
/run/sendsigs.omit.d/*dnsmasq.pid
/run/NetworkManager/dnsmasq.conf
/run/NetworkManager/dnsmasq.pid
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
Changes v1->v2
* fix sorting (requested by Chris PeBenito)
* fix missing dot escapes (requested by Chris PeBenito)
* change some stars to plus
---
policy/modules/services/dnsmasq.fc | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/policy/modules/services/dnsmasq.fc b/policy/modules/services/dnsmasq.fc
index f7e83d3c..3b4bae43 100644
--- a/policy/modules/services/dnsmasq.fc
+++ b/policy/modules/services/dnsmasq.fc
@@ -10,10 +10,19 @@
/usr/sbin/dnsmasq -- gen_context(system_u:object_r:dnsmasq_exec_t,s0)
-/var/lib/misc/dnsmasq\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0)
/var/lib/dnsmasq(/.*)? gen_context(system_u:object_r:dnsmasq_lease_t,s0)
+/var/lib/misc/dnsmasq(\..+)?\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0)
+/var/lib/lxd-bridge/dnsmasq\..+\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0)
+/var/lib/lxd/networks/\.*/dnsmasq\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0)
+/var/lib/lxd/networks/\.+/dnsmasq\.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
+/var/lib/NetworkManager/dnsmasq-.*\.leases -- gen_context(system_u:object_r:dnsmasq_lease_t,s0)
/var/log/dnsmasq(.*)?\.log(\..+) -- gen_context(system_u:object_r:dnsmasq_var_log_t,s0)
/run/dnsmasq.* -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
/run/libvirt/network(/.*)? gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
+/run/(lxc|lxd-bridge|NetworkManager)/dnsmasq\.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
+/run/NetworkManager/dnsmasq\.conf gen_context(system_u:object_r:dnsmasq_etc_t,s0)
+/run/nm-dns-dnsmasq\.conf gen_context(system_u:object_r:dnsmasq_etc_t,s0)
+/run/nm-dnsmasq-.+\.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
+/run/sendsigs\.omit\.d/.*dnsmasq\.pid -- gen_context(system_u:object_r:dnsmasq_var_run_t,s0)
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-11-12 6:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-12 6:42 [PATCH v2 1/2] dnsmasq: Require log files to have .log suffix Petr Vorel
2018-11-12 6:42 ` [PATCH v2 2/2] dnsmasq: Add support for lxc-net, lxd-bridge, NetworkManager Petr Vorel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).