summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@suse.de>2005-07-06 02:01:16 +0200
committerKay Sievers <kay.sievers@suse.de>2005-07-06 02:01:16 +0200
commit2858b86c6a2cabe809088c545e39de76ae906ee7 (patch)
treebc2090ac381b157ea3a8a1f5f7d2c647ab6e037d
parentf41951c8407ab39f4c514e8751457857a7fb5722 (diff)
don't resolve OWNER, GROUP on precompile if string contains %, $
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
-rw-r--r--udev_rules_parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/udev_rules_parse.c b/udev_rules_parse.c
index 2ec9348b01..c36fc8224c 100644
--- a/udev_rules_parse.c
+++ b/udev_rules_parse.c
@@ -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') {