udev: do NOT re-label smack
authorWaLyong Cho <walyong.cho@samsung.com>
Fri, 24 Oct 2014 04:51:09 +0000 (13:51 +0900)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 Oct 2014 11:56:24 +0000 (13:56 +0200)
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

index 4ac6f71..030e459 100644 (file)
@@ -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);
         }