From: guido@trentalancia.com (Guido Trentalancia)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] PATCH: allow mount to write to all of its runtime files
Date: Fri, 15 Jun 2012 18:35:57 +0200 [thread overview]
Message-ID: <201206151635.q5FGZvOD021663@vivaldi13.register.it> (raw)
Allow mount to write not only to /etc/mtab but also to the /etc/mtab~[0-9]{0,20}
lock files (the number corresponds to the PID). Such files are still mistakenly
being labelled as etc_t instead of etc_runtime_t (thus preventing the successful
completion of the write operation and the accumulation of unremovable stale lock
files over several operation attempts as in normal system reboots, for example).
Do the same with the standard mount temporary file /etc/mtab.tmp.
The above refers to mount from util-linux-2.21.2 from kernel.org. See mount -vvv
for the location of such files.
Signed-off-by: Guido Trentalancia <guido@trentalancia.com>
---
policy/modules/kernel/files.fc | 3 +++
1 file changed, 3 insertions(+)
--- refpolicy-04062012/policy/modules/kernel/files.fc 2012-06-15 19:33:36.615158614 +0200
+++ refpolicy-file-contexts/policy/modules/kernel/files.fc 2012-06-15 19:32:42.001703874 +0200
@@ -54,6 +54,9 @@ ifdef(`distro_suse',`
/etc/killpower -- gen_context(system_u:object_r:etc_runtime_t,s0)
/etc/localtime -l gen_context(system_u:object_r:etc_t,s0)
/etc/mtab -- gen_context(system_u:object_r:etc_runtime_t,s0)
+/etc/mtab~ -- gen_context(system_u:object_r:etc_runtime_t,s0)
+/etc/mtab~[0-9]+ -- gen_context(system_u:object_r:etc_runtime_t,s0)
+/etc/mtab.tmp -- gen_context(system_u:object_r:etc_runtime_t,s0)
/etc/mtab.fuselock -- gen_context(system_u:object_r:etc_runtime_t,s0)
/etc/nohotplug -- gen_context(system_u:object_r:etc_runtime_t,s0)
/etc/nologin.* -- gen_context(system_u:object_r:etc_runtime_t,s0)
next reply other threads:[~2012-06-15 16:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-15 16:35 Guido Trentalancia [this message]
2012-06-20 14:14 ` [refpolicy] PATCH: allow mount to write to all of its runtime files Christopher J. PeBenito
2012-06-20 15:29 ` [refpolicy] [PATCH v2]: " Guido Trentalancia
2012-06-20 15:46 ` Dominick Grift
2012-06-20 21:22 ` Guido Trentalancia
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201206151635.q5FGZvOD021663@vivaldi13.register.it \
--to=guido@trentalancia.com \
--cc=refpolicy@oss.tresys.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.