From dd078a1ef844d2ab66b8fb1e58dd73522262fad6 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 17 Jun 2014 23:51:21 +0200 Subject: namespace: properly label device nodes we create https://bugzilla.redhat.com/show_bug.cgi?id=1081429 --- src/core/namespace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/namespace.c b/src/core/namespace.c index 3b5402b7cd..d1513ce2dd 100644 --- a/src/core/namespace.c +++ b/src/core/namespace.c @@ -42,6 +42,7 @@ #include "mkdir.h" #include "dev-setup.h" #include "def.h" +#include "label.h" typedef enum MountMode { /* This is ordered by priority! */ @@ -223,7 +224,10 @@ static int mount_dev(BindMount *m) { goto fail; } + label_context_set(d, st.st_mode); r = mknod(dn, st.st_mode, st.st_rdev); + label_context_clear(); + if (r < 0) { r = -errno; goto fail; -- cgit v1.2.3-54-g00ecf