summaryrefslogtreecommitdiff
path: root/src/udev/udev-rules.c
AgeCommit message (Collapse)Author
2014-09-17udev: rules - close empty fileTom Gundersen
If the file is found to be empty, we exit early without closing the file first. Found by coverity. Fixes CID #1237759.
2014-09-16udev: rules - add missing whitespace to log messageTom Gundersen
2014-09-16libudev: drop util_lookup_{user,group}Tom Gundersen
Use shared versions instead. Difference is with overwriting of repeated user/group name, and lack of logging.
2014-09-11udev: timeout - warn after a third of the timeout before killingTom Gundersen
2014-09-11udev: allow removing tags via TAG-="foobar"David Herrmann
This extends the udev parser to support OP_REMOVE (-=) and adds support for TAG-= to remove previously set tags. We don't fail if the tag didn't exist. This is pretty handy if we ship default rules for seat-assignments and users want to exclude specific devices from that. They can easily add rules that drop any automatically added "seat" tags again.
2014-09-10udev: fix copy-paste error in log messageTom Gundersen
2014-08-01Revert "libudev: use get_*_creds from shared rather than util_lookup_*"Tom Gundersen
This reverts commit a56ba6158b9649e01226dfaf3ff7082c82571090. The commit was pushed in error.
2014-08-01libudev: use get_*_creds from shared rather than util_lookup_*Tom Gundersen
2014-07-30udev: fixup commit dd5eddd28a74a49607a8fffcaf960040dba98479Hannes Reinecke
Commit dd5eddd28a74a49607a8fffcaf960040dba98479 accidentally removed one line too many.
2014-07-29udev: place opening { at the same line as the function declarationKay Sievers
2014-07-29udev: unify event timeout handlingKay Sievers
2014-07-16Be more careful when checking for empty filesZbigniew Jędrzejewski-Szmek
If we want to avoid reading a totally empty file, it seems better to check after we have opened the file, not before.
2014-04-24udev: increase the size of RESULT bufferRobert Milasan
Under some conditions, in udev_rules_apply_to_event the fact that result is 1024 bytes, creates problems if the output of the running command/app is bigger then 1024 bytes.
2014-04-02udev: do not export "static node" tags for non-existing devicesKay Sievers
2014-03-16Use strlen even for constant stringsJosh Triplett
GCC optimizes strlen("string constant") to a constant, even with -O0. Thus, replace patterns like sizeof("string constant")-1 with strlen("string constant") where possible, for clarity. In particular, for expressions intended to add up the lengths of components going into a string, this often makes it clearer that the expression counts the trailing '\0' exactly once, by putting the +1 for the '\0' at the end of the expression, rather than hidden in a sizeof in the middle of the expression.
2014-02-17Remove unused variable and two function stubsZbigniew Jędrzejewski-Szmek
2014-02-13everywhere: make use of new0() and macro() macros, and stop using perror()Lennart Poettering
2014-01-31use memzero(foo, length); for all memset(foo, 0, length); callsGreg KH
In trying to track down a stupid linker bug, I noticed a bunch of memset() calls that should be using memzero() to make it more "obvious" that the options are correct (i.e. 0 is not the length, but the data to set). So fix up all current calls to memset(foo, 0, length) to memzero(foo, length).
2014-01-22udev: static_node - do not exit rule after first static_node itemKay Sievers
The nodes usually do not exist, so handle the next item instead of skipping the entire rule.
2014-01-08No need to canonicalize fixed pathsZbigniew Jędrzejewski-Szmek
2013-12-26systemctl: allow globbing in commands which take multiple unit namesZbigniew Jędrzejewski-Szmek
2013-12-24log: log_error() and friends add a newline after each line anyway, so avoid ↵Lennart Poettering
including it in the log strings
2013-12-03trivial coding style clean upsThomas Hindoe Paaboel Andersen
- Add space between if/for and the opening parentheses - Place the opening brace on same line as the function (not for udev) From the CODING_STYLE Try to use this: void foo() { } instead of this: void foo() { }
2013-11-26tree-wide usage of %m specifier instead of strerror(errno)Daniel Buch
Also for log_error() except where a specific error is specified e.g. errno ? strerror(errno) : "Some user specified message"
2013-11-04udev: udevd - rules can be NULL when reloadingKay Sievers
2013-10-30udev: rules - move parsing error to log_error()Kay Sievers
2013-10-30udev: do not allow to change the DEVPATH of a deviceKay Sievers
2013-10-29path_check_timestamp: only keep the most recent timestampTom Gundersen
There is no point in keeping one timestamp for each directory, as we only ever care about the most recent one.
2013-10-26udev: move udev_rules_check_timestamp to sharedTom Gundersen
I want to use this from a bulitin in a subsequent patch.
2013-10-08udev: support custom Linux Security Module labels for device nodesKay Sievers
2013-09-16udev-rules: avoid erroring on trailing whitespaceDave Reisner
https://bugs.archlinux.org/task/36950
2013-08-23udev: fix printf(3) type specifierShawn Landden
src/udev/udev-rules.c: In function 'add_rule': src/udev/udev-rules.c:1078:33: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'int' [-Wformat=] log_error("invalid key/value pair in file %s on line %u," ^
2013-08-20udev: when complaining about invalid characters, print them outZbigniew Jędrzejewski-Szmek
systemd-udevd[6260]: invalid key/value pair in file /usr/lib/udev/rules.d/60-ffado.rules on line 46,starting at character 84 ('#')
2013-07-29udev-rules: report rule parsing errors from get_keyDave Reisner
2013-07-24udev: static_node - don't touch permissions uneccessarilyTom Gundersen
Don't set default permissions if only TAGS were specified in a rule.
2013-07-24udev: log error if chmod/chown of static dev nodes failsTom Gundersen
2013-07-16udev: export tags of "dead" device nodes to /run/udev/static_node-tags/Tom Gundersen
Based on a patch by Kay Sievers. A tag is exported at boot as a symlinks to the device node in the folder /run/udev/static_node-tags/<tagname>/, if the device node exists. These tags are cleaned up by udevadm info --cleanup-db, but are otherwise never removed.
2013-06-24libudev: Use correct type for sizeofJan Janssen
2013-04-15Fix spelling errors using 'codespell' toolAnatol Pomozov
2013-02-13use strneq instead of strncmpThomas Hindoe Paaboel Andersen
2013-02-08shared: conf-files - add root parameterKay Sievers
2013-01-09udev: move string copy functions to shared/Kay Sievers
2012-12-31udev: in addition to DEVMODE, honor DEVUID, DEVGID from the ueventKay Sievers
2012-11-12use the same email address everywhereKay Sievers
2012-11-12udev: use usec_t and now()Kay Sievers
2012-10-28udev: get rid of SYSCONFDIRKay Sievers
2012-10-22udev: use strbuf to store rules stringsKay Sievers
2012-10-09udev: support multiple entries for ENV{SYSTEMD_ALIAS} and ENV{SYSTEM_WANTS}Kay Sievers
2012-10-08udev: remove SYMLINK "unique" optionKay Sievers
2012-09-23udev: free rule structure on errorVáclav Pavlín