mirror of
https://github.com/clearlinux/systemd-stable.git
synced 2026-09-08 06:31:56 +00:00
namespace: properly label device nodes we create
https://bugzilla.redhat.com/show_bug.cgi?id=1081429
(cherry picked from commit dd078a1ef8)
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
4b700b54f5
commit
415796b702
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user