namespace: properly label device nodes we create

https://bugzilla.redhat.com/show_bug.cgi?id=1081429
This commit is contained in:
Lennart Poettering 2014-06-17 23:51:21 +02:00
parent 1554afae54
commit dd078a1ef8
1 changed files with 4 additions and 0 deletions

View 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;