chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
59ddae9
)
udev: fix the ENV{} blacklist logic
author
Kay Sievers
<kay@vrfy.org>
Fri, 4 May 2012 00:26:08 +0000
(
02:26
+0200)
committer
Kay Sievers
<kay@vrfy.org>
Fri, 4 May 2012 00:29:36 +0000
(
02:29
+0200)
src/udev/udev-rules.c
patch
|
blob
|
history
diff --git
a/src/udev/udev-rules.c
b/src/udev/udev-rules.c
index a800ccdc9f3ab1527a45740a8e2380ce5de150f5..e73b1561cba48c9288ab4997cd342b8ecf63d6f4 100644
(file)
--- a/
src/udev/udev-rules.c
+++ b/
src/udev/udev-rules.c
@@
-1349,11
+1349,12
@@
static int add_rule(struct udev_rules *rules, char *line,
};
unsigned int i;
};
unsigned int i;
- for (i = 0; i < ELEMENTSOF(blacklist); i++)
- if (streq(attr, blacklist[i])) {
- log_error("invalid ENV attribute, '%s' can not be set %s:%u\n", attr, filename, lineno);
+ for (i = 0; i < ELEMENTSOF(blacklist); i++) {
+ if (!streq(attr, blacklist[i]))
continue;
continue;
- }
+ log_error("invalid ENV attribute, '%s' can not be set %s:%u\n", attr, filename, lineno);
+ goto invalid;
+ }
if (rule_add_key(&rule_tmp, TK_A_ENV, op, value, attr) != 0)
goto invalid;
}
if (rule_add_key(&rule_tmp, TK_A_ENV, op, value, attr) != 0)
goto invalid;
}