summaryrefslogtreecommitdiff
path: root/src/udev/udev-node.c
AgeCommit message (Collapse)Author
2015-11-09treewide: apply errno.cocciMichal Schmidt
with small manual cleanups for style.
2015-10-27util-lib: move a number of fs operations into fs-util.[ch]Lennart Poettering
2015-10-24util-lib: split our string related calls from util.[ch] into its own file ↵Lennart Poettering
string-util.[ch] There are more than enough calls doing string manipulations to deserve its own files, hence do something about it. This patch also sorts the #include blocks of all files that needed to be updated, according to the sorting suggestions from CODING_STYLE. Since pretty much every file needs our string manipulation functions this effectively means that most files have sorted #include blocks now. Also touches a few unrelated include files.
2015-08-04smack-util: revise smack-util apis and add read smack attr apisWaLyong Cho
- Add smack xattr lookup table - Unify all of mac_smack_apply_xxx{_fd}() to mac_smack_apply() and mac_smack_apply_fd(). - Add smack xattr read apis similar with apply apis as mac_smack_read{_fd}().
2015-04-10shared: add formats-util.hRonny Chevalier
2015-02-23remove unused includesThomas Hindoe Paaboel Andersen
This patch removes includes that are not used. The removals were found with include-what-you-use which checks if any of the symbols from a header is in use.
2015-01-22Assorted format fixesZbigniew Jędrzejewski-Szmek
Types used for pids and uids in various interfaces are unpredictable. Too bad.
2014-12-28tmpfiles: add new line type 'v' for creating btrfs subvolumesLennart Poettering
2014-11-28treewide: 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.
2014-11-28treewide: no need to negate errno for log_*_errno()Michal Schmidt
It corrrectly handles both positive and negative errno values.
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().
2014-10-24udev: do NOT re-label smackWaLyong Cho
If selinux is disabled and smack is only enabled, smack label is relable-ed by label_fix. To avoid, make only be labeled for selinux.
2014-10-23selinux: clean up selinux label function namingLennart Poettering
2014-10-23smack: 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
2014-10-23mac: 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.
2014-10-23mac: rename apis with mac_{selinux/smack}_ prefixWaLyong Cho
2014-09-18udev: node - warn if chmod/chown failsTom Gundersen
No functional change, just log the warning. Fonud by Coverity. Fixes CID #1237544.
2014-09-16libudev: util - drop util_delete_path()Tom Gundersen
Use rmdir_parents() from src/shared instead.
2014-07-29udev: place opening { at the same line as the function declarationKay Sievers
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-10-11smack: minimize ifdef use, and move all labeling to smack-util.cKay Sievers
2013-10-10security: 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.
2013-10-09udev: add SECLABEL{selinux}= supportKay Sievers
2013-10-09udev: reset Linux Security Module labels if no custom rules are givenKay Sievers
2013-10-08udev: support custom Linux Security Module labels for device nodesKay Sievers
2013-02-13use streq instead of strcmpThomas Hindoe Paaboel Andersen
2013-02-12udev: use unique names for temporary files created in /devKay Sievers
On Tue, Feb 12, 2013 at 2:18 PM, Robert Milasan <rmilasan@suse.com> wrote: > Under some circumstances udev mixed with multipath fails: > > udevd-work[1376]: > symlink(../../sdk, /dev/disk/by-id/scsi-36005076305ffc0670000000000002842.udev-tmp) > failed: File exists udevd-work[1432]: > rename(/dev/disk/by-id/scsi-36005076305ffc0850000000000000a88.udev-tmp, /dev/disk/by-id/scsi-36005076305ffc0850000000000000a88) > failed: No such file or directory > > This is non-fatal, but there is no point of created the symlink or > renaming the symlink if it already exists. > > Reference: https://bugzilla.novell.com/show_bug.cgi?id=791503 It looke like this now: stat("/dev/disk/by-id", {st_mode=S_IFDIR|0755, st_size=80, ...}) = 0 symlink("../../sda", "/dev/disk/by-id/ata-INTEL...N.tmp-b8:0") = 0 rename("/dev/disk/by-id/ata-INTEL...N.tmp-b8:0", "/dev/disk/by-id/ata-INTEL...N") = 0
2013-01-27udev: set default rules permissions only at "add" eventsKay Sievers
2013-01-09udev: move string copy functions to shared/Kay Sievers
2013-01-04udev: set device node permissions only at "add" eventsKay Sievers
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