From da39bbe42ffe3ad83032c284b48841159406f1b1 Mon Sep 17 00:00:00 2001 From: Hyotaek Shim Date: Wed, 19 Sep 2018 19:23:03 +0900 Subject: [PATCH] Set the smack label of /dev/mapper and /dev/mapper/control as '*' Normally, /dev/mapper and /dev/mapper/control are created by the in-kernel dm driver and the smack label is set by Systemd as '*'. When the dm driver is loaded as a module (dm-mod.ko), however, /dev/mapper's label cannot be initialized by Systemd. drwxr-xr-x root root * /dev/mapper crw------- root root * /dev/mapper/control Change-Id: I74f7b58cbfb80294bb19bd5cff683359d26c1b22 Signed-off-by: Hyotaek Shim --- udev/10-dm.rules.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/udev/10-dm.rules.in b/udev/10-dm.rules.in index 29af467..943afa6 100644 --- a/udev/10-dm.rules.in +++ b/udev/10-dm.rules.in @@ -14,8 +14,7 @@ # DM_SUSPENDED - suspended state of DM device (0 or 1) # DM_UDEV_RULES_VSN - DM udev rules version -KERNEL=="device-mapper", NAME="(DM_DIR)/control" - +KERNEL=="device-mapper", NAME="(DM_DIR)/control", SECLABEL{smack}="*", RUN+="/bin/chsmack -a * /dev/mapper" SUBSYSTEM!="block", GOTO="dm_end" KERNEL!="dm-[0-9]*", GOTO="dm_end" (DM_EXEC_RULE) -- 2.7.4