continue;
}
+ if (strcasecmp(key, "WAIT_FOR_SYSFS") == 0) {
+ add_rule_key(rule, &rule->wait_for_sysfs, operation, value);
+ valid = 1;
+ continue;
+ }
+
if (strncasecmp(key, "ENV", sizeof("ENV")-1) == 0) {
attr = get_key_attribute(key + sizeof("ENV")-1);
if (attr == NULL) {
rule->ignore_remove = 1;
}
}
- add_rule_key(rule, &rule->name, operation, value);
+ if (value[0] == '\0') {
+ dbg("name empty device should be ignored");
+ rule->name.operation = operation;
+ rule->ignore_device = 1;
+ } else
+ add_rule_key(rule, &rule->name, operation, value);
continue;
}
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') {
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') {
gid_t gid = lookup_group(value);
dbg("replacing groupname='%s' by id=%i", value, gid);
sprintf(group, "%li", gid);
- add_rule_key(rule, &rule->owner, operation, group);
+ add_rule_key(rule, &rule->group, operation, group);
continue;
}
}