Commit Graph

9804 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 6b6ed3e3eb shared/socket-util: kill gcc warning about uninitialized variable
The warning was invalid, but distracting.
2012-11-13 02:23:02 +01:00
Kay Sievers bf9d233f78 udev: properly handle symlink removal by 'change' event
If a 'change' event is supposed to remove created symlinks, we create
a new device structure from the sysfs device and fill it with the list
of links, to compute the delta of the old and new list of links to apply.
If the device is already 'remove'd by the kernel though, udev fails to
create the device structure, so the links are not removed properly.

> From: Neil Brown <nfbrown@suse.com>
> Date: Thu, 8 Nov 2012 10:39:06 +0100
> Subject: [PATCH] If a 'change' event does not get handled by udev until
> after the device has subsequently disappeared, udev mis-handles
> it. This can happen with 'md' devices which emit a change
> event and then a remove event when they are stopped. It is
> normally only noticed if udev is very busy (lots of arrays
> being stopped at once) or the machine is otherwise loaded
> and reponding slowly.
>
> There are two problems.
>
> 1/ udev_device_new_from_syspath() will refuse to create the device
>    structure if the device does not exist in /sys, and particularly if
>    the uevent file does not exist.
>    If a 'db' file does exist, that is sufficient evidence that the device
>    is genuine and should be created.  Equally if we have just received an
>    event from the kernel about the device, it must be real.
>
>    This patch just disabled the test for the 'uevent' file, it doesn't
>    try imposing any other tests - it isn't clear that they are really
>    needed.
>
> 2/ udev_event_execute_rules() calls udev_device_read_db() on a 'device'
>    structure that is largely uninitialised and in particular does not
>    have the 'subsystem' set.  udev_device_read_db() needs the subsystem
>    so it tries to read the 'subsystem' symlink out of sysfs.  If the
>    device is already deleted, this naturally fails.
>    udev_event_execute_rules() knows the subsystem (as it was in the
>    event message) so this patch simply sets the subsystem for the device
>    structure to be loaded to match the subsystem of the device structure
>    that is handling the event.
>
> With these two changes, deleted handling of change events will still
> correctly remove any symlinks that are not needed any more.

Use udev_device_new() instead of allowing udev_device_new_from_syspath()
to proceed without a sysfs device.
2012-11-13 02:14:17 +01:00
Mauro Dreissig cf2292f5ac libudev: avoid leak during realloc failure 2012-11-13 01:59:33 +01:00
Thomas Hindoe Paaboel Andersen 33b4055123 remove duplicate semicolons 2012-11-12 22:38:44 +01:00
Thomas Hindoe Paaboel Andersen 0c77310d39 systemd-delta.xml: document default value for --diff 2012-11-12 22:38:44 +01:00
Michal Schmidt 45a5ff0de7 util: nicer tree drawings
Draw trees more similar to pstree/findmnt/lsblk/...
2012-11-12 22:27:48 +01:00
Dave Reisner a9cdc94f7f enable localization for common *ctl commands 2012-11-12 14:16:07 -05:00
Kay Sievers 1298001ec5 use the same email address everywhere 2012-11-12 19:47:43 +01:00
Kay Sievers 88a6477ef3 libudev: update copyright headers 2012-11-12 17:50:33 +01:00
Kay Sievers 35ec16ea8a TODO: update 2012-11-12 01:03:14 +01:00
Kay Sievers 40fe8b11be udev: use usec_t and now() 2012-11-12 01:03:14 +01:00
Holger Hans Peter Freyther 1707b36c6d man/sd-id128.xml: typo fix 2012-11-11 21:36:21 +01:00
Kay Sievers 2311eb2ff0 timedatectl: properly print 30 minutes DST transitions 2012-11-11 16:55:25 +01:00
Dave Reisner ef216ca3d7 coredumpctl: add missing -F, --field option to help 2012-11-09 14:14:53 -05:00
Dave Reisner 253a87510b bash-completion: add 'gdb' verb for coredumpctl
This also fixes value completion for journal fields, as the completion
for the RHS of the '=' was missing when it was borrowed from journalctl.
2012-11-09 14:12:36 -05:00
Dave Reisner 584f587295 systemd-coredumpctl: add 'gdb' to usage output 2012-11-09 10:04:08 -05:00
Lennart Poettering bece1f5215 dbus: when verifying PK privs, bypass PK if uid=0 of client
This reduces the number of roundtrips when the client is privileged and
makes the PK dep optional for root clients.
2012-11-09 15:55:36 +01:00
Tom Gundersen 43f9cc65c2 hwdb: change pci.ids location
According to pciutils' TODO, the sourceforge location is scheduled for
removal, use the new one instead.
2012-11-09 15:36:25 +01:00
Kay Sievers 09d8f5d757 udev: hwdb - update usb class descriptions 2012-11-09 15:23:41 +01:00
Kay Sievers 8db6dcfd3c udev: hwdb - add usb class descriptions 2012-11-09 15:02:58 +01:00
Kay Sievers cf7ebcea78 udev: hwdb - add pci class descriptions 2012-11-09 14:29:10 +01:00
Kay Sievers a660c63c55 udev: net_id - add builtin to retrieve data for network devices 2012-11-09 13:05:19 +01:00
Kay Sievers 59803c380d udev: hwdb - search parents for 'modalias' and data 2012-11-09 13:05:11 +01:00
Kay Sievers c3cfed0d6c udev: update file headers 2012-11-09 12:39:27 +01:00
Kay Sievers 87281abdf3 hwdb: OUI - use ID_OUI_FROM_DATABASE= 2012-11-09 12:39:27 +01:00
Michal Schmidt 40b8acd039 fstab-generator: more specific error messages 2012-11-09 12:00:46 +01:00
Kay Sievers 448004c340 hwdb: add IEEE OUI data 2012-11-07 14:23:05 +01:00
Kay Sievers c67fbe4c71 hwdb: update pci data 2012-11-07 14:06:29 +01:00
Kay Sievers f6113d42d0 TODO: update 2012-11-07 14:06:29 +01:00
Thomas Hindoe Paaboel Andersen 5a5c72ca6e man: typo fixes for new files in 195 2012-11-06 20:27:38 +01:00
Dave Reisner 8db9d8c2a4 cryptsetup: fix inverted comparison in pass_volume_key 2012-11-06 10:18:10 -05:00
Dave Reisner e4f44e734c Revert "Implement SocketUser= and SocketGroup= for [Socket]"
This was never intended to be pushed.

This reverts commit aea54018a5.
2012-11-06 09:54:17 -05:00
Dave Reisner 65343c7494 cryptsetup: hash=plain means don't use a hash
"plain" is a semantic value that cryptsetup(8) uses to describe a plain
dm-crypt volume that does not use a hash. Catch this value earlier and
ensure that a NULL params.hash is passed to crypt_format to avoid
passing an invalid hash type to the libcryptsetup backend.

FDO bug #56593.
2012-11-06 09:53:00 -05:00
Dave Reisner aea54018a5 Implement SocketUser= and SocketGroup= for [Socket]
Since we already allow defining the mode of AF_UNIX sockets and FIFO, it
makes sense to also allow specific user/group ownership of the socket
file for restricting access.
2012-11-05 21:17:55 -05:00
Thomas Hindoe Paaboel Andersen edca2e2348 README,TODO: typo fixes 2012-11-05 21:13:28 +01:00
Dave Reisner 7277f5a9d9 systemd.socket.xml: fix typo 2012-11-05 08:32:44 -05:00
Daniel Wallace 553b932366 add zsh completion for all the commands
Most of the completion for systemctl and loginctl provided by Foudil Brétel
2012-11-05 10:56:28 +01:00
Kay Sievers 7a43e910ce TODO: fix typo 2012-11-05 02:17:23 +01:00
Kay Sievers 6aa220e019 mount-setup: try mounting 'efivarfs' only if the system bootet with EFI 2012-11-04 17:03:48 +01:00
Kay Sievers 3dfb265083 kmod-setup: mounting efivarfs, *after* we tried to mount it, is pointless
The mount() system call, which we issue before loading modules, will trigger
a modprobe by the kernel and block until it returns. Trying to load it again
later, will have exactly the same result as the first time.
2012-11-04 17:00:57 +01:00
Kay Sievers 1022373284 kmod-setup: add conditional module loading callback 2012-11-04 16:54:19 +01:00
Kay Sievers c1e5704657 shared: add is_efiboot() 2012-11-04 16:06:27 +01:00
Kay Sievers d2e83c23f5 TODO: update RTC, DST stuff 2012-11-04 15:47:08 +01:00
Kay Sievers 39cff5961a TODO: add efi check 2012-11-04 12:17:28 +01:00
Dave Reisner 075ff6863d drop Arch Linux support for reading /etc/rc.conf 2012-11-03 20:11:52 -04:00
Dave Reisner 53d05b44f1 drop Arch Linux support for reading /etc/rc.conf 2012-11-03 19:59:42 -04:00
Kay Sievers bd49c40537 bash-completion > shell-completion 2012-11-03 22:10:32 +01:00
Kay Sievers 924ee2cb0c docs: gtk-doc warnings are annoying 2012-11-03 22:04:06 +01:00
Miklos Vajna da974c2ff2 vconsole: remove Frugalware legacy file support 2012-11-03 21:23:37 +01:00
Michal Schmidt c339d9775d util : fallback to plain ASCII drawing if locale is not UTF-8
When printing cgroup and sysfs hierarchies, avoid using UTF-8 box drawing
characters if the locale is not UTF-8.

https://bugzilla.redhat.com/show_bug.cgi?id=871153
2012-11-02 17:39:52 +01:00