]> err.no Git - systemd/commitdiff
don't resolve OWNER, GROUP on precompile if string contains %, $
authorKay Sievers <kay.sievers@suse.de>
Wed, 6 Jul 2005 00:01:16 +0000 (02:01 +0200)
committerKay Sievers <kay.sievers@suse.de>
Wed, 6 Jul 2005 00:01:16 +0000 (02:01 +0200)
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
udev_rules_parse.c

index 2ec9348b01c55e342c1e8b20f11cdd3f32b23e90..c36fc8224c69772b9cefee303c922c823b13352a 100644 (file)
@@ -371,7 +371,7 @@ static int add_to_rules(struct udev_rules *rules, char *line)
 
                if (strcasecmp(key, "OWNER") == 0) {
                        valid = 1;
-                       if (rules->resolve_names) {
+                       if (rules->resolve_names && (!strchr(value, '$') && !strchr(value, '%'))) {
                                char *endptr;
                                strtoul(value, &endptr, 10);
                                if (endptr[0] != '\0') {
@@ -390,7 +390,7 @@ static int add_to_rules(struct udev_rules *rules, char *line)
 
                if (strcasecmp(key, "GROUP") == 0) {
                        valid = 1;
-                       if (rules->resolve_names) {
+                       if (rules->resolve_names && (!strchr(value, '$') && !strchr(value, '%'))) {
                                char *endptr;
                                strtoul(value, &endptr, 10);
                                if (endptr[0] != '\0') {