summaryrefslogtreecommitdiff
path: root/src/udev/udev-node.c
AgeCommit message (Collapse)Author
2015-03-27Remove hardcoded path /run and configure using --with-rootrundir=David Cortarello
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2015-01-25Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-12-01treewide: use log_*_errno whenever %m is in the format stringMichal Schmidt
If the format string contains %m, clearly errno must have a meaningful value, so we might as well use log_*_errno to have ERRNO= logged. Using: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\((".*%m.*")/log_\1_errno(errno, \2/' Plus some whitespace, linewrap, and indent adjustments. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-11-28treewide: auto-convert the simple cases to log_*_errno()Michal Schmidt
As a followup to 086891e5c1 "log: add an "error" parameter to all low-level logging calls and intrdouce log_error_errno() as log calls that take error numbers", use sed to convert the simple cases to use the new macros: find . -name '*.[ch]' | xargs sed -r -i -e \ 's/log_(debug|info|notice|warning|error|emergency)\("(.*)%s"(.*), strerror\(-([a-zA-Z_]+)\)\);/log_\1_errno(-\4, "\2%m"\3);/' Multi-line log_*() invocations are not covered. And we also should add log_unit_*_errno(). Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-31src/udev/udev-node.c: fix selinux labelAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-25selinux: clean up selinux label function namingLennart Poettering
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-25smack: rework smack APIs a bitLennart Poettering
a) always return negative errno error codes b) always become a noop if smack is off c) always take a NULL label as a request to remove it Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-25mac: rename all calls that apply a label mac_{selinux|smack}_apply_xyz(), ↵Lennart Poettering
and all that reset it to defaults mac_{selinux|smack}_fix() Let's clean up the naming schemes a bit and use the same one for SMACK and for SELINUX. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-10-25mac: rename apis with mac_{selinux/smack}_ prefixWaLyong Cho
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-09-18src/udev/udev-node.c: replace our error handling with upstreamsAnthony G. Basile
eudev has had this error handling for a while. upstream finally added it with the following commit 543afdc63c02a5af3cf6bd2a264162f23474346a by Tom Gundersen <teg@jklm.no>. Both methods are equivalent, but we adopt upstreams for easier maintenance. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-09-17libudev: util - drop util_delete_path()Tom Gundersen
Use rmdir_parents() from src/shared instead. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-07-30udev: place opening { at the same line as the function declarationKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-04-24src/udev: code cleanupAnthony G. Basile
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-03-21fixed gcc warnings that call returns not checkedlhb-jr
modified: src/collect/collect.c modified: src/udev/udev-node.c modified: src/udev/udevadm-settle.c modified: src/udev/udevd.c
2014-01-13src/udev: bring up to date with upstream.Anthony G. Basile
These commits were authored by Zbigniew Jędrzejewski-Szmek Tom Gundersen Kay Sievers Lennart Poettering Shawn Landden Daniel Buch Martin Pitt Karel Zak Yang Zhiyong Note: udev_builtin_net_setup_link has *not* been imported. Also still missing from udev-builtin is udev_builtin_uaccess. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09smack: minimize ifdef use, and move all labeling to smack-util.cKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09security: rework selinux, smack, ima, apparmor detection logicLennart Poettering
Always cache the results, and bypass low-level security calls when the respective subsystem is not enabled. Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09udev: add SECLABEL{selinux}= supportKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09udev: reset Linux Security Module labels if no custom rules are givenKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2014-01-09udev: support custom Linux Security Module labels for device nodesKay Sievers
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-07-07Import strxcpyx from upstreamAnthony G. Basile
This commit imports strxcpyx from upstream. This is upstream commit d5a89d7dc17a5ba5cf4fc71f82963c5c94a31c3d Note: there were also some very minor code cleanups to accelerometer.c: line 187 collect.c: lines 35, 140 libudev-device.c: line 780 libudev-hwdb.c: line 300 These are part of upstream commits: 507f22bd0172bff5e5d98145b1419bd472a2c57f 3cf7b686e6b29f78de0af5929602cae4482f6d49 67410e9f73a6cdd8453c78b966451b5151def14a Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2013-04-02udev: updateAnthony G. Basile
This updates the daemon codebase to upstream. Authors: Zbigniew Jędrzejewski-Szmek Lennart Poettering Václav Pavlín Kay Sievers Harald Hoyer Rob Clark Zeeshan Ali (Khattak) See http://cgit.freedesktop.org/systemd/systemd/log/src/udev Ian is signing off but has some concerns on a few of the changes that he may fix in future commits. Signed-off-by: Anthony G. Basile <blueness@gentoo.org> Signed-off-by: Ian Stakenvicius <axs@gentoo.org>
2013-01-28Set device node permissions only at "add" eventsIan Stakenvicius
New behavioural change -- has potential to fix bugs..? systemd commit 48a849ee17fb25e0001bfcc0f28a4aa633d016a1 Author: Kay Sievers <kay@vrfy.org> Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-18Fix unused result warningsKacper Kowalik (Xarthisius)
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
2012-11-12use the same email address everywhereKay Sievers
2012-10-08udev: remove SYMLINK "unique" optionKay Sievers
2012-08-10udev: export udev_device_new_from_device_id()Kay Sievers
2012-07-15udev: get rid of TEST_PREFIX and use unshare() to fake /sys, /dev, /runKay Sievers
2012-07-09udev: never touch device nodes with symlink requestsKay Sievers
2012-07-03mount-setup: don't complain if we try to fix the label of a dir beneath a ↵Lennart Poettering
mount but can't due to EROFS
2012-06-05udev: remove remaining selinux labeling for file in /runKay Sievers
2012-05-31mkdir: append _label to all mkdir() calls that explicitly set the selinux ↵Kay Sievers
context
2012-04-17selinux: unify systemd and udev codeKay Sievers
2012-04-17udev: replace util_create_path() with mkdir_parents()Kay Sievers
2012-04-16udev: remove configuration options for /dev, /sys, /run directoriesKay Sievers
2012-04-10udev: fix gcc warnings showing up after adding $(AM_CFLAGS)Kay Sievers
2012-04-08udev: switch to systemd logging functionsKay Sievers
2012-04-04move imported udev into placeKay Sievers