From: Hyotaek Shim Date: Wed, 19 Sep 2018 10:23:03 +0000 (+0900) Subject: Set the smack label of /dev/mapper and /dev/mapper/control as '*' X-Git-Tag: accepted/tizen/5.0/unified/20181102.025336^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_5.5_mobile_hotfix;p=platform%2Fupstream%2Fdevice-mapper.git 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 --- 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)