From: Lennart Poettering Date: Tue, 17 Jun 2014 21:51:21 +0000 (+0200) Subject: namespace: properly label device nodes we create X-Git-Tag: v215~358 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dd078a1ef844d2ab66b8fb1e58dd73522262fad6;p=elogind.git namespace: properly label device nodes we create https://bugzilla.redhat.com/show_bug.cgi?id=1081429 --- diff --git a/src/core/namespace.c b/src/core/namespace.c index 3b5402b7c..d1513ce2d 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;