summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-17 23:51:21 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-18 00:09:46 +0200
commitdd078a1ef844d2ab66b8fb1e58dd73522262fad6 (patch)
treee3c7b2af909c093c64c07a6d2064ffe0a54e68fa /src/core
parent1554afae546f6cfb8ac85e36300d7bf608886780 (diff)
namespace: properly label device nodes we create
https://bugzilla.redhat.com/show_bug.cgi?id=1081429
Diffstat (limited to 'src/core')
-rw-r--r--src/core/namespace.c4
1 files changed, 4 insertions, 0 deletions
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;