[systemd-devel] [PATCH 2/2] udev: do NOT re-label smack

WaLyong Cho walyong.cho at gmail.com
Thu Oct 23 21:51:09 PDT 2014


From: WaLyong Cho <walyong.cho at samsung.com>

If selinux is disabled and smack is only enabled, smack label is
relable-ed by label_fix. To avoid, make only be labeled for selinux.
---
 src/udev/udev-node.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c
index 4ac6f71..030e459 100644
--- a/src/udev/udev-node.c
+++ b/src/udev/udev-node.c
@@ -323,7 +323,7 @@ static int node_permissions_apply(struct udev_device *dev, bool apply,
 
                 /* set the defaults */
                 if (!selinux)
-                        label_fix(devnode, true, false);
+                        mac_selinux_fix(devnode, true, false);
                 if (!smack)
                         mac_smack_apply(devnode, NULL);
         }
-- 
2.1.2



More information about the systemd-devel mailing list