diff options
author | Kay Sievers <kay@vrfy.org> | 2012-05-04 02:26:08 +0200 |
---|---|---|
committer | Kay Sievers <kay@vrfy.org> | 2012-05-04 02:29:36 +0200 |
commit | 395ea97815f0ca2352caeccf3027d026dd9e58a7 (patch) | |
tree | a4d64d2f7d73563ca2caade1bb9fca12e6873a36 /src/udev/udev-rules.c | |
parent | 59ddae9f9c0992fe193fa371a5d114227b35785c (diff) |
udev: fix the ENV{} blacklist logic
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r-- | src/udev/udev-rules.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c index a800ccdc9f..e73b1561cb 100644 --- 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; - 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; - } + 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; } |