Commit Graph
20913 Commits
Author SHA1 Message Date
David Herrmann 5c9e74f738 Merge pull request #73 from zonque/mountinfo
core/mount: skip incomplete mountinfo entries
2015-06-04 19:15:20 +02:00
Tom Gundersen f68067348f sd-event: don't touch fd's accross forks
We protect most of the API from use accross forks, but we still allow both
sd_event and sd_event_source objects to be unref'ed. This would cause
problems as it would unregister sources from the underlying eventfd, hence
also affecting the original instance in the parent process.

This fixes the issue by not touching the fds on unref when done accross a fork,
but still free the memory.

This fixes a regression introduced by
        "udevd: move main-loop to sd-event": 693d371d30

where the worker processes were disabling the inotify event source in the
main daemon.
2015-06-04 19:04:26 +02:00
Daniel Mack c0a7f8d3cb core/mount: skip incomplete mountinfo entries
Skip /proc/mountinfo entries for which libmount returns a NULL pointer
for 'source' or 'target'. This happened on Semaphore CI's build servers
when the test suite is run.
2015-06-04 19:00:46 +02:00
Martin Pitt c9876eff9b Merge pull request #71 from kloun/patch-1
small fix ru translation
2015-06-04 18:50:03 +02:00
David Herrmann df9ae92ba2 Merge pull request #58 from pwithnall/wip/pwithnall/user-active-on-vt-switch
logind: Save the user’s state when a session enters SESSION_ACTIVE
2015-06-04 16:57:28 +02:00
kloun fcf3f5958e small fix ru translation 2015-06-04 17:56:59 +03:00
David Herrmann 8604f39cca Merge pull request #57 from pwithnall/wip/pwithnall/udev-virtualbox-rules
logind: Add a udev rule to tag all DRM cards with master-of-seat
2015-06-04 16:17:24 +02:00
Zbigniew Jędrzejewski-Szmek 116b6c8687 Partially revert "ma-setup: simplify"
copy_bytes() tries to do the write in chunks, but ima kernel code
needs every rule to be written in one write. Writing the whole file
at once avoids the issue.

http://lists.freedesktop.org/archives/systemd-devel/2015-June/032623.html
http://sourceforge.net/p/linux-ima/mailman/message/34145236/
https://bugzilla.redhat.com/show_bug.cgi?id=1226948
2015-06-04 09:20:46 -04:00
Martin Pitt 1cf548925d Merge pull request #68 from whot/hwdb-updates
hwdb: add Apple MagicMouse entry
2015-06-04 08:45:11 +02:00
Peter Hutterer 68a6ac91a1 hwdb: add Apple MagicMouse entry 2015-06-04 16:05:08 +10:00
Kay Sievers e2fa715943 Merge pull request #59 from eswierk/master
Add /dev/xvd* to 60-persistent-storage whitelist
2015-06-03 23:13:40 +02:00
Kay Sievers f9748d8148 Merge pull request #65 from teg/enumerate-accept-null
libudev: enumerate - accept NULL parameters in add_match()
2015-06-03 22:48:01 +02:00
Tom Gundersen 21ee915614 Merge pull request #52 from mbiebl/systemctl-edit-default-editor
systemctl: Use /usr/bin/editor if available
2015-06-03 22:34:11 +02:00
Kay Sievers 6517217d49 kdbus: remove attach_flags_mask module parameter setting 2015-06-03 22:24:16 +02:00
Tom Gundersen 54f0b4d9a3 libudev: enumerate - accept NULL parameters in add_match()
This was a regression introduced when moving to sd-device.
2015-06-03 22:08:46 +02:00
Andrei Borzenkov fa05e97257 fstab-generator: cescape device name in root-fsck service
We unescape ExecStart line when parsing it, so escape device name
before adding it to unit file.

fixes #50
2015-06-03 21:03:41 +03:00
Thomas Hindoe Paaboel Andersen 602ee553e4 test-util: fix a memleak 2015-06-03 19:50:02 +02:00
Daniel Mack eb71a33158 Merge pull request #60 from Keruspe/master
build-sys: drop references to gobject-introspection
2015-06-03 18:02:18 +02:00
Daniel Mack 75db28c8f2 Merge pull request #55 from filbranden/rootprefix_empty1
Fix --with-rootprefix= (empty) with a workaround for now.
2015-06-03 18:01:21 +02:00
Kay Sievers 2b4919a68c build-sys: disable gc-sections if optimization is disabled
This way, development builds will not rely on gc-sections to
paper over cyclic link dependencies. Newly introduced broken
link requirements will immediatley fail.
2015-06-03 17:38:26 +02:00
Marc-Antoine Perennou c7b13c64b3 build-sys: drop references to gobject-introspection
It has been removed alongside gudev
2015-06-03 17:26:59 +02:00
Ed Swierk ff2aa01e61 Add /dev/xvd* to 60-persistent-storage whitelist
Without this, systemd-udevd does not create persistent storage symlinks
for xen block devices.
2015-06-03 08:08:37 -07:00
Harald Hoyer ce54255fa5 test-unit-file.c: fixup the test for commit 3b51f8ddd5 2015-06-03 16:36:20 +02:00
Filipe Brandenburger e013d21b62 build-sys: Work around --with-rootprefix= (empty) not producing /
Since we introduced AX_NORMALIZE_PATH, using --with-rootprefix=/ does
produce an empty string, but using --with-rootprefix= (empty) now
produces "." instead which is wrong.

Work around it until we can find a better solution for AX_NORMALIZE_PATH
upstream at autoconf-archive.

Bug: https://github.com/systemd/systemd/issues/54
2015-06-03 07:34:42 -07:00
Filipe Brandenburger 759b98c568 build-sys: Recommend --with-rootprefix=/ for split-usr
Since we started using AX_NORMALIZE_PATH, that is a valid supported
setup and is more explicit than --with-rootprefix= (empty) which is
actually currently broken.

Let's advocate for it in the ./configure suggestion from autogen.sh.
2015-06-03 07:34:42 -07:00
Harald Hoyer ea344aec10 Merge pull request #51 from zonque/unquote
util: fix another cunescape() regression



compiled and test-util exited with 0
2015-06-03 15:55:28 +02:00
Kay Sievers 1a435084b7 configure.ac: add missing komma 2015-06-03 14:50:58 +02:00
Kay Sievers 29d01b7064 point to github issues instead of freedesktop bugzilla 2015-06-03 14:48:55 +02:00
Kay Sievers 4142554fcd build-sys: split off libsystemd-machine convenience lib
Break the link order cycle by splitting off the machine parts which
use sd-bus but live in shared/.
2015-06-03 14:46:11 +02:00
Kay Sievers 42fcc4d258 build-sys: merge libsystemd-label convenience lib
Stop to pretend that we can split selinux related code from other.
We have too many cross-references and it breaks all the time and
I am no longer willing to maintain that mess for no real benefit.

We currently have cyclic dependencies which are only resolved on
machines with gc-sections toolchains. We need a simpler and at the
same time more strict model to manage our convenienc libraries and
linking.

The first thing to give up is the "optimization" of not linking
libselinux for a very few tools. If that is an issue, please fix
the mess that libselinux creates in selinux itself, and do not ask
consumers to work around it.
2015-06-03 14:23:03 +02:00
Michael Biebl 9391a1c3d6 systemctl: Use /usr/bin/editor if available
If the EDITOR environment variable is not set, the Debian policy
recommends to use the /usr/bin/editor program as default editor.
This file is managed via the dpkg alternatives mechanism and typically
used in Debian/Ubuntu and derivatives to configure the default editor.

See section 11.4 of the Debian policy [1].

Therefor prefer /usr/bin/editor over specific editors if available.

[1] https://www.debian.org/doc/debian-policy/ch-customized-programs.html
2015-06-03 14:14:42 +02:00
Daniel Mack 3b51f8ddd5 util: fix another cunescape() regression
Fix a regression caused by 4034a06d ("util: rework word parsing and c
unescaping code") which broke octal escape sequences.

The reason for this breakage is that cunescape_one() expects 4 characters
in an octal encoding, which is a stray left-over from the old code which
operated on different variables to make the length check.

While at it, add a test case to prevent the same thing from happening
again.
2015-06-03 13:54:21 +02:00
Kay Sievers 36f5e964de build-sys: disable gc-sections for distcheck
We cannot rely on gc-sections to fix dependency cycles in our linking
setup. Disable it for distcheck to let it fail and find these bugs
earlier.
2015-06-03 03:17:01 +02:00
Kay Sievers 1635b34e15 Merge pull request #43 from teg/udev-forking-rework
udev forking/socket-passing rework
2015-06-03 02:39:07 +02:00
Kay Sievers 7a17c2cc40 build-sys: remove left-over gtk-doc 2015-06-03 02:36:40 +02:00
Tom Gundersen 11b1dd8cec udevd: merge manager_new() and manager_listen() again
Now that listen_fds() have been split out, we can safely move the allocation
of the manager object after doing the forking (the fork is done to notify legcay
init-systems that the fds are ready).

Subsequently, we can merge manager_listen() back into managre_new().

This entails a minor behaviour change: the application of permissions to
static device nodes now happens after the fork (but still before notifying
systemd about being ready).
2015-06-03 02:10:58 +02:00
Tom Gundersen 7500cd5e96 udevd: make sd_notify independent of forknig/notify mode
This will simply silently fail on non-systemd systems, so there is no reason
to make it conditional.

Also make it clear that we notify systemd about being ready as the last step
before starting the event loop, whereas the forking might need to happen
earlier.
2015-06-03 02:03:17 +02:00
Tom Gundersen b7f74dd48f udevd: manager - split listen_fds() out of manager_new()
This will allow us in a follow-up commit to listen to fds before forking and
still allocate the manager only after the fork.
2015-06-03 02:03:15 +02:00
Tom Gundersen f59118ec79 udevd: unify fd handling in forking/notify modes
Hide the differenec in listen_fds, by simply opening the fds
here in case they are not passed in.
2015-06-03 02:01:46 +02:00
Tom Gundersen 44daf75d98 libudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd
This allows a fd to be created and configured as part of one monitor, to be passed in
to create a second monitor without having to redo any of the configuration.
2015-06-03 01:54:16 +02:00
Tom Gundersen c26d1879c7 udevd: make cgroup logic independent of socket passing
This should have no behavioural change, but it is odd to tie the cgroup cleaning to
whether or not we are passed sockets.

The point really is if we are guaranteed to be in a dedicated cgroup, so instead
check for our parent being PID1 (we already implicitly only do this on systemd
systems).
2015-06-03 01:53:26 +02:00
Tom Gundersen bf6871639e udevd: only bind ctrl and netlink sockets when we open them
If they are passed from PID1 this is not necessary.
2015-06-03 01:41:35 +02:00
Tom Gundersen fcff1e7241 udevd: rename systemd_fds to listen_fds 2015-06-03 01:41:35 +02:00
Tom Gundersen 8314de1d81 udevd: simplify signal mask handling
We used to block all signals, and restore the original signal mask before exec'ing
external processes.

Now we just block the signals we care about and unconditionally unblock all signals
before exec'ing.
2015-06-03 01:41:34 +02:00
Tom Gundersen a39423c2ef Merge pull request #42 from jonboulle/master
README: update links to reference new home (GitHub)
2015-06-03 01:03:54 +02:00
Tom Gundersen cfe907ab6e Merge pull request #41 from mischief/ipforwarding
networkd: create "kernel" setting for IPForwarding
2015-06-03 01:02:51 +02:00
Jonathan Boulle eb0914fc85 README: update links to reference new home (GitHub) 2015-06-02 15:57:50 -07:00
Nick Owens 3ed7e9c735 man: document IPForward=kernel option 2015-06-02 15:42:21 -07:00
Nick Owens a70ec7f19f networkd: create "kernel" setting for IPForwarding
In 5a8bcb674f, IPForwarding was introduced
to set forwarding flags on interfaces in .network files. networkd sets
forwarding options regardless of the previous setting, even if it was
set by e.g. sysctl. This commit creates a new option for IPForwarding,
"kernel", that preserves the sysctl settings rather than always setting
them.

See https://bugs.freedesktop.org/show_bug.cgi?id=89509 for the initial
bug report.
2015-06-02 15:31:48 -07:00
Andreas Pokorny 495968cf4e udev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devices
Peek at the ABS_MT_SLOT-1 axis. Expect that touch screens only
have axes inside the MT range.
2015-06-03 08:31:02 +10:00