chiark / gitweb /
udev: static_node - don't touch permissions uneccessarily
authorTom Gundersen <teg@jklm.no>
Wed, 24 Jul 2013 13:05:48 +0000 (15:05 +0200)
committerTom Gundersen <teg@jklm.no>
Wed, 24 Jul 2013 13:13:00 +0000 (15:13 +0200)
Don't set default permissions if only TAGS were specified in a rule.

src/udev/udev-rules.c

index fe4965f..769b670 100644 (file)
@@ -2586,6 +2586,10 @@ int udev_rules_apply_static_dev_perms(struct udev_rules *rules)
                                 }
                         }
 
+                        /* don't touch the permissions if only the tags were set */
+                        if (mode == 0 && uid == 0 && gid == 0)
+                                goto next;
+
                         if (mode == 0) {
                                 if (gid > 0)
                                         mode = 0660;