Description : Add smack label(*) to loop device for security policy
authorwchang kim <wchang.kim@samsung.com>
Wed, 29 Jun 2016 23:38:55 +0000 (08:38 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 26 Jan 2024 16:49:49 +0000 (17:49 +0100)
Add smack label(*) to loop device for security policy

Change-Id: If9271c209b05f73c20c66f7e30a7d18e070c2b4a
Signed-off-by: Woochang Kim <wchang.kim@samsung.com>
rules/99-systemd.rules.in

index ca52cf1..3aac67c 100644 (file)
@@ -22,7 +22,7 @@ SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", TEST!="md/array_state",
 SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="md*", ATTR{md/array_state}=="|clear|inactive", ENV{SYSTEMD_READY}="0"
 
 # Ignore loop devices that don't have any file attached
-SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0"
+SUBSYSTEM=="block", KERNEL=="loop[0-9]*", ENV{DEVTYPE}=="disk", TEST!="loop/backing_file", ENV{SYSTEMD_READY}="0",SECLABEL{smack}="*"
 
 # Ignore nbd devices until the PID file exists (which signals a connected device)
 SUBSYSTEM=="block", KERNEL=="nbd*", ENV{DEVTYPE}=="disk", TEST!="pid", ENV{SYSTEMD_READY}="0"