From 3a27b93611af2c6dbed260e269118a1fd226ef27 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Wed, 24 Jul 2013 15:05:48 +0200
Subject: [PATCH] udev: static_node - don't touch permissions uneccessarily
Don't set default permissions if only TAGS were specified in a rule.
---
src/udev/udev-rules.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index fe4965f..769b670 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -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;