I'm booting in enforcing mode and init initializes SELinux, later
when mdev is started it needs to create files with correct permissions
for system to work correctly. Following patch allows for easy booting
of SELinux system with mdev as /dev manager.
added in v2 - first try to create node with p
Add support for relabeling files. Files created or modified by mdev
should now have correct SELinux labels.
It sets file creation context, however if it detects that file exists it
just restores context.
Signed-off-by: Amadeusz Sławiński
---
util-linux/mdev.c | 37
On Mon, 20 Jan 2014 09:43:24 -0500
Daniel J Walsh wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 01/19/2014 11:23 AM, Amadeusz Sławiński wrote:
>
> A better patch would be to use setfscreatecon(scontext) before the
> mknod. And setfscreatecon(NULL) after
Add support for relabeling files. Files created or modified by mdev
should now have correct SELinux labels.
---
util-linux/mdev.c | 13 +
1 file changed, 13 insertions(+)
diff --git a/util-linux/mdev.c b/util-linux/mdev.c
index e80b58f..c8ef48d 100644
--- a/util-linux/mdev.c
+++ b/uti
I'm booting in enforcing mode and init initializes SELinux, later
when mdev is started it needs to create files with correct permissions
for system to work correctly. Following patch allows for easy booting
of SELinux system with mdev as /dev manager.
Amadeusz
_
Hello,
Attached patch adds basic selinux support to mdev in what I think is
most efficient way. It relabels file not caring if it was just created
or existed before (for example devtmpfs mount).
Amadeusz Sławiński
diff -uNr a/util-linux/mdev.c b/util-linux/mdev.c
--- a/util-linux/mdev.c 2013-12