summaryrefslogtreecommitdiff
path: root/src/udev/udevd.c
AgeCommit message (Collapse)Author
2014-08-30udev: bump event timeout to 60 secondsKay Sievers
2014-08-30udev: remove userspace firmware loading supportKay Sievers
2014-07-31Reject invalid quoted stringsZbigniew Jędrzejewski-Szmek
String which ended in an unfinished quote were accepted, potentially with bad memory accesses. Reject anything which ends in a unfished quote, or contains non-whitespace characters right after the closing quote. _FOREACH_WORD now returns the invalid character in *state. But this return value is not checked anywhere yet. Also, make 'word' and 'state' variables const pointers, and rename 'w' to 'word' in various places. Things are easier to read if the same name is used consistently. mbiebl_> am I correct that something like this doesn't work mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-passwd "Unlock EncFS"' mbiebl_> systemd seems to strip of the quotes mbiebl_> systemctl status shows mbiebl_> ExecStart=/usr/bin/encfs --extpass='/bin/systemd-ask-password Unlock EncFS $RootDir $MountPoint mbiebl_> which is pretty weird
2014-07-29udev: place opening { at the same line as the function declarationKay Sievers
2014-07-29udev: unify event timeout handlingKay Sievers
2014-07-29udevd: add --event-timeout commandline optionHannes Reinecke
Some events take longer than the default 30 seconds. Killing those events will leave the machine halfway configured. Add a commandline option '--event-timeout' to handle these cases.
2014-07-24udev: exclude MD from block device ownership event lockingKay Sievers
MD instantiates devices at open(). This is incomptible with the locking logic, as the "change" event emitted when stopping a device will bring it back.
2014-06-10udev: check the return value from udev_enumerate_scan_devicesThomas Hindoe Paaboel Andersen
The return value from udev_enumerate_scan_devices was stored but never used. I assume this was meant to be checked.
2014-06-10udev: really exclude device-mapper from block device ownership event lockingChristian Hesse
Arguments were wrong order, no? This fixes commits: e918a1b5a94f270186dca59156354acd2a596494 3d06f4183470d42361303086ed9dedd29c0ffc1b
2014-06-04udev: guard REREADPT by exclusive lock instead of O_EXCLKay Sievers
2014-06-04udev: make sure we always get "change" for the diskKay Sievers
The kernel will return 0 for REREADPT when no partition table is found, we have to send out "change" ourselves.
2014-06-04udev: guard REREADP logic with open(O_ECXL)Kay Sievers
2014-06-04udev: try first re-reading the partition tableKay Sievers
mounted partitions: # dd if=/dev/zero of=/dev/sda bs=1 count=1 UDEV [4157.369250] change .../0:0:0:0/block/sda (block) UDEV [4157.375059] change .../0:0:0:0/block/sda/sda1 (block) UDEV [4157.397088] change .../0:0:0:0/block/sda/sda2 (block) UDEV [4157.404842] change .../0:0:0:0/block/sda/sda4 (block) unmounted partitions: # dd if=/dev/zero of=/dev/sdb bs=1 count=1 UDEV [4163.450217] remove .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block) UDEV [4163.593167] change .../target6:0:0/6:0:0:0/block/sdb (block) UDEV [4163.713982] add .../target6:0:0/6:0:0:0/block/sdb/sdb1 (block)
2014-06-04udev: synthesize "change' events for partitions when tools change the diskKay Sievers
This should make sure that fdisk-like programs will automatically cause an update of all partitions, just like mkfs-like programs cause an update of the partition.
2014-06-04udevd: inotify - modernizationsKay Sievers
2014-06-03udev: exclude device-mapper from block device ownership event lockingKay Sievers
2014-06-03udev: always close lock file descriptorKay Sievers
https://bugs.freedesktop.org/show_bug.cgi?id=79576
2014-05-17udev: avoid use of uninitialized errThomas Hindoe Paaboel Andersen
After 1ea972174baba40dbc80c51cbfc4edc49764b59b err is no longer set unless we hit a special case. Initialize it to 0 and remove a check that will never fail.
2014-05-15udev: do not skip the execution of RUN when renaming a network device failsKay Sievers
2014-04-13udev: serialize/synchronize block device event handling with file locksKay Sievers
2014-04-13udev: remove seqnum API and all assumptions about seqnumsKay Sievers
The way the kernel namespaces have been implemented breaks assumptions udev made regarding uevent sequence numbers. Creating devices in a namespace "steals" uevents and its sequence numbers from the host. It confuses the "udevadmin settle" logic, which might block until util a timeout is reached, even when no uevent is pending. Remove any assumptions about sequence numbers and deprecate libudev's API exposing these numbers; none of that can reliably be used anymore when namespaces are involved.
2014-02-13everywhere: always use O_CLOEXEC where it makes senseLennart Poettering
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).
2013-12-29udev: LOG_PRIORITY -> LOG_LEVELKay 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-11-12udev: declare some symbols staticKay Sievers
2013-11-06util: unify reading of /proc/cmdlineLennart Poettering
Instead of individually checking for containers in each user do this once in a new call proc_cmdline() that read the file only if we are not in a container.
2013-10-13udev: use initialization instead of zeroing in one placeZbigniew Jędrzejewski-Szmek
2013-08-22Revert "udevd: simplify sigterm check"Colin Walters
This reverts commit 47e737dc13bf4251ae5a2249ec29b34503ed92e1 - it introduced a use-after-free. The only way the code would get simpler is with a cleanup function, but eh, not worth it for just this one bit. Reviewed by kay on IRC.
2013-08-15udevd: simplify sigterm checkKay Sievers
2013-08-09udevd: respect the log-level set in /etc/udev/udev.confTom Gundersen
A regression introduced when we moved to systemd's logging is that the only way to adjust the log-level of the udev daemon is via the env var, kernel commandline or the commandline. This reintroduces support for specifying this in the configuration file.
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-07-08static-nodes: move creation of static nodes from udevd to tmpfilesTom Gundersen
As of kmod v14, it is possible to export the static node information from /lib/modules/`uname -r`/modules.devname in tmpfiles.d(5) format. Use this functionality to let systemd-tmpfilesd create the static device nodes at boot, and drop the functionality from systemd-udevd. As an effect of this we can move from systemd-udevd to systemd-tmpfiles-setup-dev: * the conditional CAP_MKNOD (replaced by checking if /sys is mounted rw) * ordering before local-fs-pre.target (see 89d09e1b5c65a2d97840f682e0932c8bb499f166)
2013-04-16nspawn: introduce the new /machine/ tree in the cgroup tree and move ↵Lennart Poettering
containers there Containers will now carry a label (normally derived from the root directory name, but configurable by the user), and the container's root cgroup is /machine/<label>. This label is called "machine name", and can cover both containers and VMs (as soon as libvirt also makes use of /machine/). libsystemd-login can be used to query the machine name from a process. This patch also includes numerous clean-ups for the cgroup code.
2013-04-03util: rename write_one_line_file() to write_string_file()Lennart Poettering
You can write much more than just one line with this call (and we frequently do), so let's correct the naming.
2013-03-28udev: check return value of uname.Václav Pavlín
2013-03-28build-sys: fix HAVE/ENABLE_FIRMWAREKay Sievers
https://bugs.freedesktop.org/show_bug.cgi?id=62864
2013-03-25udevd.c: set udev children_max according to CPU countHarald Hoyer
Setting children_max according to RAM leads to too much concurrent I/O.
2013-03-18udev: ifdef all firmware special handlingKay Sievers
2013-03-03udev: remove database conversion codeKay Sievers
2013-02-14honor SELinux labels, when creating and writing config filesHarald Hoyer
Also split out some fileio functions to fileio.c and provide a SELinux aware pendant in fileio-label.c see https://bugzilla.redhat.com/show_bug.cgi?id=881577
2013-02-13use streq instead of strcmpThomas Hindoe Paaboel Andersen
2013-01-09udev: move string copy functions to shared/Kay Sievers
2012-12-22udevd: add missing ':' to getopt_long 'e'Lukas Nykryn
Parameter -e is set without additional argument in getopt and this leads to segfault when calling 'systemd-udevd -e'.
2012-11-12use the same email address everywhereKay Sievers
2012-11-12udev: use usec_t and now()Kay Sievers
2012-10-07udev: allow firmware requests to bypass the dependency trackingKay Sievers
The removal of the TIMEOUT= handling in udevd put firmware requests into the devpath parent/child dependency tracking. Drivers which block in module_init() asking userspace for firmware ran into a 30 sec device timeout. The whole firmware loading willl hopefully move into the kernel and the fragile-since-day-one fake async driver-core device dance involving udev can be retired: http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=abb139e75c2cdbb955e840d6331cb5863e409d0e
2012-09-13man: fix a bunch of typos in docsThomas Hindoe Paaboel Andersen
https://bugs.freedesktop.org/show_bug.cgi?id=54501
2012-08-21dev-setup: make NULL as parameter for dev_setup() equivalent to ""Lennart Poettering