summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHyotaek Shim <hyotaek.shim@samsung.com>2018-09-19 19:23:03 +0900
committerHyotaek Shim <hyotaek.shim@samsung.com>2018-10-01 14:55:12 +0900
commitda39bbe42ffe3ad83032c284b48841159406f1b1 (patch)
tree994fa6750ab59cfbd1e74f5d8af7fea953083f74
parent4ec03906b38efe0a5570956c083bb55a51f3d70f (diff)
downloaddevice-mapper-accepted/tizen/6.0/unified/hotfix/20201103.000531.tar.gz
device-mapper-accepted/tizen/6.0/unified/hotfix/20201103.000531.tar.bz2
device-mapper-accepted/tizen/6.0/unified/hotfix/20201103.000531.zip
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 <hyotaek.shim@samsung.com>
-rw-r--r--udev/10-dm.rules.in3
1 files changed, 1 insertions, 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)