Skip to contentSkip to conversation

: extend mcelog file context definitions

PATCH New Guido Trentalancia 1 participant 1 message Aug 5, 2012

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 : extend mcelog file context definitions

Mcelog triggers' default location appears to be /etc/mcelog, as /etc/mcelog/triggers is specific to Fedora: try supporting such triggers in a more future-proof manner. Add support for "local" scripts at the same location.

---
 policy/modules/kernel/corecommands.fc |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
policy/modules/kernel/corecommands.fc +6 -1
@@ -72,8 +72,13 @@ ifdef(`distro_redhat',`
 /etc/kde/shutdown(/.*)?			gen_context(system_u:object_r:bin_t,s0)
 
 /etc/mail/make			--	gen_context(system_u:object_r:bin_t,s0)
-/etc/mcelog/cache-error-trigger	--	gen_context(system_u:object_r:bin_t,s0)
+/etc/mcelog/.*-error-trigger	--	gen_context(system_u:object_r:bin_t,s0)
+/etc/mcelog/.*.local		--	gen_context(system_u:object_r:bin_t,s0)
+
+ifdef(`distro_redhat',`
 /etc/mcelog/triggers(/.*)?		gen_context(system_u:object_r:bin_t,s0)
+')
+
 /etc/mgetty+sendfax/new_fax	--	gen_context(system_u:object_r:bin_t,s0)
 
 /etc/netplug.d(/.*)? 	 		gen_context(system_u:object_r:bin_t,s0)