2012-08-05 01:02:51

by Guido Trentalancia

[permalink] [raw]
Subject: [refpolicy] [PATCH]: fix and extend mcelog file context definitions

Mcelog triggers' default location appears to be /etc/mcelog, as /etc/mcelog/triggers
is specific to Fedora.
Add support for "local" scripts at the same location.

Signed-off-by: Guido Trentalancia <[email protected]>
---
policy/modules/kernel/corecommands.fc | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)

--- refpolicy-20072012/policy/modules/kernel/corecommands.fc 2012-07-20 17:39:21.156919570 +0200
+++ refpolicy-20072012-mcelog-fc/policy/modules/kernel/corecommands.fc 2012-08-05 04:01:53.635993044 +0200
@@ -72,8 +72,16 @@ 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/cache-error-trigger -- gen_context(system_u:object_r:bin_t,s0)
+/etc/mcelog/dimm-error-trigger -- gen_context(system_u:object_r:bin_t,s0)
+/etc/mcelog/page-error-trigger -- gen_context(system_u:object_r:bin_t,s0)
+/etc/mcelog/socket-memory-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)