Re: [PATCH] mdev - add SELinux support

2014-01-20 Thread Daniel J Walsh
-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. Pseuod code #if ENABLE_SELINUX security_context_t scontext = NULL;

Re: [PATCH] mdev - add SELinux support

2014-01-20 Thread Amadeusz Sławiński
On Mon, 20 Jan 2014 09:43:24 -0500 Daniel J Walsh dwa...@redhat.com 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. Pseuod

Re: [PATCH] mdev - add SELinux support

2014-01-20 Thread Daniel J Walsh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 01/20/2014 10:56 AM, Amadeusz Sławiński wrote: On Mon, 20 Jan 2014 09:43:24 -0500 Daniel J Walsh dwa...@redhat.com wrote: On 01/19/2014 11:23 AM, Amadeusz Sławiński wrote: A better patch would be to use setfscreatecon(scontext) before the

[PATCH] mdev - add SELinux support

2014-01-20 Thread Amadeusz Sławiński
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 am...@asmblr.net --- util-linux/mdev.c | 37

[PATCH] mdev - add SELinux support

2014-01-19 Thread Amadeusz Sławiński
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 +++