]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
namespace: properly label device nodes we create
authorLennart Poettering <lennart@poettering.net>
Tue, 17 Jun 2014 21:51:21 +0000 (23:51 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 17 Jun 2014 22:09:46 +0000 (00:09 +0200)
https://bugzilla.redhat.com/show_bug.cgi?id=1081429

src/core/namespace.c

index 3b5402b7cd8c4851b087101e13859e1f32c48f41..d1513ce2ddea54da93b4a556cdca11e22f14081b 100644 (file)
@@ -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;