chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix spelling error in debug string
[elogind.git]
/
udev_rules_parse.c
diff --git
a/udev_rules_parse.c
b/udev_rules_parse.c
index 4fcd6db08ee362bec4233683df6143956baa1364..6bb83ae12b9366a0837f649c4042f884500287e7 100644
(file)
--- a/
udev_rules_parse.c
+++ b/
udev_rules_parse.c
@@
-366,6
+366,16
@@
static int add_to_rules(struct udev_rules *rules, char *line)
pos = strchr(file, ' ');
if (pos)
pos[0] = '\0';
pos = strchr(file, ' ');
if (pos)
pos[0] = '\0';
+
+ /* allow programs in /lib/udev called without the path */
+ if (strchr(file, '/') == NULL) {
+ strlcpy(file, "/lib/udev/", sizeof(file));
+ strlcat(file, value, sizeof(file));
+ pos = strchr(file, ' ');
+ if (pos)
+ pos[0] = '\0';
+ }
+
dbg("IMPORT auto mode for '%s'", file);
if (!lstat(file, &stats) && (stats.st_mode & S_IXUSR)) {
dbg("IMPORT is executable, will be executed (autotype)");
dbg("IMPORT auto mode for '%s'", file);
if (!lstat(file, &stats) && (stats.st_mode & S_IXUSR)) {
dbg("IMPORT is executable, will be executed (autotype)");
@@
-411,7
+421,7
@@
static int add_to_rules(struct udev_rules *rules, char *line)
}
}
if (value[0] == '\0')
}
}
if (value[0] == '\0')
- dbg("name empty, no
t
creation supressed");
+ dbg("name empty, no
de
creation supressed");
add_rule_key(rule, &rule->name, operation, value);
continue;
}
add_rule_key(rule, &rule->name, operation, value);
continue;
}