platform/upstream/systemd.git
9 years agotree-wide: remove spurious space
Thomas Hindoe Paaboel Andersen [Mon, 8 Jun 2015 18:53:16 +0000 (20:53 +0200)]
tree-wide: remove spurious space

9 years agoMerge pull request #106 from teg/man-mac-random
Lennart Poettering [Mon, 8 Jun 2015 20:44:39 +0000 (22:44 +0200)]
Merge pull request #106 from teg/man-mac-random

man: systemd.link - explain random MAC addresses

9 years agoman: systemd.link - explain random MAC addresses
Tom Gundersen [Mon, 8 Jun 2015 20:30:59 +0000 (22:30 +0200)]
man: systemd.link - explain random MAC addresses

Two of the bits in the MAC address are set unconditioanlly, and the rest is randomized,
make this clear in the documentation (as it currently read as if it was all random).

9 years agoMerge pull request #101 from zonque/kmod
Lennart Poettering [Mon, 8 Jun 2015 18:51:08 +0000 (20:51 +0200)]
Merge pull request #101 from zonque/kmod

kmod-setup: split warn flags

9 years agokmod-setup: split warn flags
Daniel Mack [Mon, 8 Jun 2015 16:52:25 +0000 (18:52 +0200)]
kmod-setup: split warn flags

Traditionally, we used to warn about ipv6 being a module or being
unavailable. This was changed in b4aa82f16 ("kmod-setup: don't warn
when ipv6 can't be loaded") in a way that neither of the two conditions
will cause a log message.

Now, while running a setup without any IPv6 is completely fine and
shouldn't cause any warning, we should still warn about ipv6 being a
module instead of built-in.

To achieve this, split the boolean warn flag into two: one for a
feature not being built-in but shipped as a module, and one to
print an error when a module is entirely unavailable.

We will, however, still warn if kmod returns anything else than
-ENOENT in the attempt of loading the module, and at the very least,
turn the message into a debug log.

9 years agoMerge pull request #96 from haraldh/set_consume
Lennart Poettering [Mon, 8 Jun 2015 17:43:30 +0000 (19:43 +0200)]
Merge pull request #96 from haraldh/set_consume

util:bind_remount_recursive() fix "use after free"

9 years agoutil:bind_remount_recursive() fix "use after free"
Harald Hoyer [Mon, 8 Jun 2015 13:14:26 +0000 (15:14 +0200)]
util:bind_remount_recursive() fix "use after free"

set_consume(done, x) consumes x with free(x)
but
mount(…, x, …) uses it afterwards.

coverity CID 1299006

9 years agoMerge pull request #92 from zonque/README
Lennart Poettering [Mon, 8 Jun 2015 12:06:32 +0000 (14:06 +0200)]
Merge pull request #92 from zonque/README

README.md: add Coverity scan status badge

9 years agoREADME.md: add Coverity scan status badge
Daniel Mack [Mon, 8 Jun 2015 11:19:09 +0000 (13:19 +0200)]
README.md: add Coverity scan status badge

9 years agoMerge pull request #79 from zonque/fdo-87475
Kay Sievers [Fri, 5 Jun 2015 19:02:47 +0000 (21:02 +0200)]
Merge pull request #79 from zonque/fdo-87475

kmod-setup: don't warn when ipv6 can't be loaded (FDO bug #87475)

9 years agoMerge pull request #82 from gmacario/bootchart-fix-typo
Daniel Mack [Fri, 5 Jun 2015 19:00:41 +0000 (21:00 +0200)]
Merge pull request #82 from gmacario/bootchart-fix-typo

systemd-bootchart: Trivial typo fix in warning

9 years agosystemd-bootchart: Trivial typo fix in warning
Gianpaolo Macario [Fri, 5 Jun 2015 16:42:36 +0000 (18:42 +0200)]
systemd-bootchart: Trivial typo fix in warning

Signed-off-by: Gianpaolo Macario <gmacario@gmail.com>
9 years agoMerge pull request #80 from zonque/README.md
Harald Hoyer [Fri, 5 Jun 2015 14:09:45 +0000 (16:09 +0200)]
Merge pull request #80 from zonque/README.md

Add README.md

9 years agoAdd README.md
Daniel Mack [Fri, 5 Jun 2015 12:11:26 +0000 (14:11 +0200)]
Add README.md

A README.md allows us to include a badge for the current build status of
Semaphore CI. Keep other information in this file minimal, and avoid
information duplication but point readers to the official README.

9 years agobus: don't force send-masks on kdbus buses
David Herrmann [Fri, 5 Jun 2015 13:23:03 +0000 (15:23 +0200)]
bus: don't force send-masks on kdbus buses

Right now we always pass KDBUS_ITEM_ATTACH_FLAGS_RECV to
KDBUS_CMD_BUS_MAKE, effectively forcing every bus connection to do the
same during KDBUS_CMD_HELLO. This used to be a workaround to make sure all
metadata is always present. However, we refrained from that approach and
intend to make all metadata collection solely rely on /proc access
restrictions. Therefore, there is no need to force the send-flags mask on
newly created buses.

9 years agokmod-setup: don't warn when ipv6 can't be loaded
Daniel Mack [Fri, 5 Jun 2015 12:59:36 +0000 (14:59 +0200)]
kmod-setup: don't warn when ipv6 can't be loaded

Not having IPv6 is a valid setup. Let's not print a warning in that
case.

Addresses:

  https://bugs.freedesktop.org/show_bug.cgi?id=87475

9 years agologind: Fix user_elect_display() to be more stable
Philip Withnall [Fri, 29 May 2015 09:49:21 +0000 (10:49 +0100)]
logind: Fix user_elect_display() to be more stable

The previous implementation of user_elect_display() could easily end up
overwriting the user’s valid graphical session with a new TTY session.
For example, consider the situation where there is one session:
   c1, type = SESSION_X11, !stopping, class = SESSION_USER
it is initially elected as the user’s display (i.e. u->display = c1).

If another session is started, on a different VT, the sessions_by_user
list becomes:
   c1, type = SESSION_X11, !stopping, class = SESSION_USER
   c2, type = SESSION_TTY, !stopping, class = SESSION_USER

In the previous code, graphical = c1 and text = c2, as expected.
However, neither graphical nor text fulfil the conditions for setting
u->display = graphical (because neither is better than u->display), so
the code falls through to check the text variable. The conditions for
this match, as u->display->type != SESSION_TTY (it’s actually
SESSION_X11). Hence u->display is set to c2, which is incorrect, because
session c1 is still valid.

Refactor user_elect_display() to use a more explicit filter and
pre-order comparison over the sessions. This can be demonstrated to be
stable and only ever ‘upgrade’ the session to a more graphical one.

https://bugs.freedesktop.org/show_bug.cgi?id=90769

9 years agoMerge pull request #63 from arvidjaar/issue/50
Daniel Mack [Fri, 5 Jun 2015 07:41:27 +0000 (09:41 +0200)]
Merge pull request #63 from arvidjaar/issue/50

fstab-generator: cescape device name in root-fsck service

9 years agoMerge pull request #76 from crrodriguez/master
Daniel Mack [Fri, 5 Jun 2015 07:25:43 +0000 (09:25 +0200)]
Merge pull request #76 from crrodriguez/master

core: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER fails

9 years agocore: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER fails
Cristian Rodríguez [Fri, 5 Jun 2015 06:39:02 +0000 (03:39 -0300)]
core: Remove "old kernel" warning if PR_SET_CHILD_SUBREAPER fails

This made sense when systemd ran on older kernels, nowdays not so much.

9 years agoMerge pull request #74 from systemd-mailing-devs/1432753344-31461-1-git-send-email...
Daniel Mack [Thu, 4 Jun 2015 23:48:25 +0000 (01:48 +0200)]
Merge pull request #74 from systemd-mailing-devs/1432753344-31461-1-git-send-email-jonathan.boulle@coreos.com

fix extraneous space in equality check

9 years agobus: update kdbus.h
David Herrmann [Thu, 4 Jun 2015 18:26:03 +0000 (20:26 +0200)]
bus: update kdbus.h

Sync with upstream.

9 years agoMerge pull request #72 from teg/event-fork-unref
David Herrmann [Thu, 4 Jun 2015 17:21:17 +0000 (19:21 +0200)]
Merge pull request #72 from teg/event-fork-unref

sd-event: don't touch fd's accross forks

9 years agoMerge pull request #73 from zonque/mountinfo
David Herrmann [Thu, 4 Jun 2015 17:15:20 +0000 (19:15 +0200)]
Merge pull request #73 from zonque/mountinfo

core/mount: skip incomplete mountinfo entries

9 years agosd-event: don't touch fd's accross forks
Tom Gundersen [Thu, 4 Jun 2015 14:54:45 +0000 (16:54 +0200)]
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": 693d371d30fee

where the worker processes were disabling the inotify event source in the
main daemon.

9 years agocore/mount: skip incomplete mountinfo entries
Daniel Mack [Thu, 4 Jun 2015 13:39:49 +0000 (15:39 +0200)]
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.

9 years agoMerge pull request #71 from kloun/patch-1
Martin Pitt [Thu, 4 Jun 2015 16:50:03 +0000 (18:50 +0200)]
Merge pull request #71 from kloun/patch-1

small fix ru translation

9 years agoMerge pull request #58 from pwithnall/wip/pwithnall/user-active-on-vt-switch
David Herrmann [Thu, 4 Jun 2015 14:57:28 +0000 (16:57 +0200)]
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

9 years agosmall fix ru translation
kloun [Thu, 4 Jun 2015 14:56:59 +0000 (17:56 +0300)]
small fix ru translation

9 years agoMerge pull request #57 from pwithnall/wip/pwithnall/udev-virtualbox-rules
David Herrmann [Thu, 4 Jun 2015 14:17:24 +0000 (16:17 +0200)]
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

9 years agoPartially revert "ma-setup: simplify"
Zbigniew Jędrzejewski-Szmek [Mon, 1 Jun 2015 14:33:48 +0000 (10:33 -0400)]
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

9 years agoMerge pull request #68 from whot/hwdb-updates
Martin Pitt [Thu, 4 Jun 2015 06:45:11 +0000 (08:45 +0200)]
Merge pull request #68 from whot/hwdb-updates

hwdb: add Apple MagicMouse entry

9 years agohwdb: add Apple MagicMouse entry
Peter Hutterer [Thu, 4 Jun 2015 06:05:08 +0000 (16:05 +1000)]
hwdb: add Apple MagicMouse entry

9 years agoMerge pull request #59 from eswierk/master
Kay Sievers [Wed, 3 Jun 2015 21:13:40 +0000 (23:13 +0200)]
Merge pull request #59 from eswierk/master

Add /dev/xvd* to 60-persistent-storage whitelist

9 years agoMerge pull request #65 from teg/enumerate-accept-null
Kay Sievers [Wed, 3 Jun 2015 20:48:01 +0000 (22:48 +0200)]
Merge pull request #65 from teg/enumerate-accept-null

libudev: enumerate - accept NULL parameters in add_match()

9 years agoMerge pull request #52 from mbiebl/systemctl-edit-default-editor
Tom Gundersen [Wed, 3 Jun 2015 20:34:11 +0000 (22:34 +0200)]
Merge pull request #52 from mbiebl/systemctl-edit-default-editor

systemctl: Use /usr/bin/editor if available

9 years agokdbus: remove attach_flags_mask module parameter setting
Kay Sievers [Wed, 3 Jun 2015 20:24:16 +0000 (22:24 +0200)]
kdbus: remove attach_flags_mask module parameter setting

9 years agolibudev: enumerate - accept NULL parameters in add_match()
Tom Gundersen [Wed, 3 Jun 2015 20:08:46 +0000 (22:08 +0200)]
libudev: enumerate - accept NULL parameters in add_match()

This was a regression introduced when moving to sd-device.

9 years agofstab-generator: cescape device name in root-fsck service
Andrei Borzenkov [Wed, 3 Jun 2015 17:50:59 +0000 (20:50 +0300)]
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

9 years agotest-util: fix a memleak
Thomas Hindoe Paaboel Andersen [Wed, 3 Jun 2015 17:49:04 +0000 (19:49 +0200)]
test-util: fix a memleak

9 years agoMerge pull request #60 from Keruspe/master
Daniel Mack [Wed, 3 Jun 2015 16:02:18 +0000 (18:02 +0200)]
Merge pull request #60 from Keruspe/master

build-sys: drop references to gobject-introspection

9 years agoMerge pull request #55 from filbranden/rootprefix_empty1
Daniel Mack [Wed, 3 Jun 2015 16:01:21 +0000 (18:01 +0200)]
Merge pull request #55 from filbranden/rootprefix_empty1

Fix --with-rootprefix= (empty) with a workaround for now.

9 years agobuild-sys: disable gc-sections if optimization is disabled
Kay Sievers [Wed, 3 Jun 2015 15:17:08 +0000 (17:17 +0200)]
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.

9 years agobuild-sys: drop references to gobject-introspection
Marc-Antoine Perennou [Wed, 3 Jun 2015 15:24:23 +0000 (17:24 +0200)]
build-sys: drop references to gobject-introspection

It has been removed alongside gudev

9 years agoAdd /dev/xvd* to 60-persistent-storage whitelist
Ed Swierk [Wed, 3 Jun 2015 15:08:37 +0000 (08:08 -0700)]
Add /dev/xvd* to 60-persistent-storage whitelist
Without this, systemd-udevd does not create persistent storage symlinks
for xen block devices.

9 years agotest-unit-file.c: fixup the test for commit 3b51f8ddd5
Harald Hoyer [Wed, 3 Jun 2015 14:36:20 +0000 (16:36 +0200)]
test-unit-file.c: fixup the test for commit 3b51f8ddd5

9 years agobuild-sys: Work around --with-rootprefix= (empty) not producing /
Filipe Brandenburger [Wed, 3 Jun 2015 14:31:12 +0000 (07:31 -0700)]
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

9 years agobuild-sys: Recommend --with-rootprefix=/ for split-usr
Filipe Brandenburger [Wed, 3 Jun 2015 14:33:06 +0000 (07:33 -0700)]
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.

9 years agoMerge pull request #51 from zonque/unquote
Harald Hoyer [Wed, 3 Jun 2015 13:55:28 +0000 (15:55 +0200)]
Merge pull request #51 from zonque/unquote

util: fix another cunescape() regression

compiled and test-util exited with 0

9 years agoconfigure.ac: add missing komma
Kay Sievers [Wed, 3 Jun 2015 12:50:58 +0000 (14:50 +0200)]
configure.ac: add missing komma

9 years agopoint to github issues instead of freedesktop bugzilla
Kay Sievers [Wed, 3 Jun 2015 12:48:55 +0000 (14:48 +0200)]
point to github issues instead of freedesktop bugzilla

9 years agobuild-sys: split off libsystemd-machine convenience lib
Kay Sievers [Wed, 3 Jun 2015 12:46:11 +0000 (14:46 +0200)]
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/.

9 years agobuild-sys: merge libsystemd-label convenience lib
Kay Sievers [Wed, 3 Jun 2015 12:16:36 +0000 (14:16 +0200)]
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.

9 years agosystemctl: Use /usr/bin/editor if available
Michael Biebl [Wed, 3 Jun 2015 12:00:59 +0000 (14:00 +0200)]
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

9 years agoutil: fix another cunescape() regression
Daniel Mack [Wed, 3 Jun 2015 11:33:26 +0000 (13:33 +0200)]
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.

9 years agobuild-sys: disable gc-sections for distcheck
Kay Sievers [Wed, 3 Jun 2015 01:14:21 +0000 (03:14 +0200)]
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.

9 years agoMerge pull request #43 from teg/udev-forking-rework
Kay Sievers [Wed, 3 Jun 2015 00:39:07 +0000 (02:39 +0200)]
Merge pull request #43 from teg/udev-forking-rework

udev forking/socket-passing rework

9 years agobuild-sys: remove left-over gtk-doc
Kay Sievers [Wed, 3 Jun 2015 00:35:53 +0000 (02:35 +0200)]
build-sys: remove left-over gtk-doc

9 years agoudevd: merge manager_new() and manager_listen() again
Tom Gundersen [Tue, 2 Jun 2015 21:14:34 +0000 (23:14 +0200)]
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).

9 years agoudevd: make sd_notify independent of forknig/notify mode
Tom Gundersen [Tue, 2 Jun 2015 21:08:11 +0000 (23:08 +0200)]
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.

9 years agoudevd: manager - split listen_fds() out of manager_new()
Tom Gundersen [Tue, 2 Jun 2015 21:05:40 +0000 (23:05 +0200)]
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.

9 years agoudevd: unify fd handling in forking/notify modes
Tom Gundersen [Tue, 2 Jun 2015 19:03:36 +0000 (21:03 +0200)]
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.

9 years agolibudev: monitor - set nl_pid when reusing fd in udev_monitor_new_from_netlink_fd
Tom Gundersen [Tue, 2 Jun 2015 18:57:52 +0000 (20:57 +0200)]
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.

9 years agoudevd: make cgroup logic independent of socket passing
Tom Gundersen [Tue, 2 Jun 2015 23:53:20 +0000 (01:53 +0200)]
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).

9 years agoudevd: only bind ctrl and netlink sockets when we open them
Tom Gundersen [Tue, 2 Jun 2015 17:18:53 +0000 (19:18 +0200)]
udevd: only bind ctrl and netlink sockets when we open them

If they are passed from PID1 this is not necessary.

9 years agoudevd: rename systemd_fds to listen_fds
Tom Gundersen [Tue, 2 Jun 2015 17:04:38 +0000 (19:04 +0200)]
udevd: rename systemd_fds to listen_fds

9 years agoudevd: simplify signal mask handling
Tom Gundersen [Tue, 2 Jun 2015 15:07:21 +0000 (17:07 +0200)]
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.

9 years agoMerge pull request #42 from jonboulle/master
Tom Gundersen [Tue, 2 Jun 2015 23:03:54 +0000 (01:03 +0200)]
Merge pull request #42 from jonboulle/master

README: update links to reference new home (GitHub)

9 years agoMerge pull request #41 from mischief/ipforwarding
Tom Gundersen [Tue, 2 Jun 2015 23:02:51 +0000 (01:02 +0200)]
Merge pull request #41 from mischief/ipforwarding

networkd: create "kernel" setting for IPForwarding

9 years agoREADME: update links to reference new home (GitHub)
Jonathan Boulle [Tue, 2 Jun 2015 22:57:50 +0000 (15:57 -0700)]
README: update links to reference new home (GitHub)

9 years agoman: document IPForward=kernel option
Nick Owens [Tue, 2 Jun 2015 22:42:21 +0000 (15:42 -0700)]
man: document IPForward=kernel option

9 years agonetworkd: create "kernel" setting for IPForwarding
Nick Owens [Fri, 1 May 2015 18:48:08 +0000 (11:48 -0700)]
networkd: create "kernel" setting for IPForwarding

In 5a8bcb674f71a20e95df55319b34c556638378ce, 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.

9 years agoudev: input_id - use ABS_MT_SLOT{-1} to exclude non touch screen devices
Andreas Pokorny [Mon, 1 Jun 2015 20:43:39 +0000 (22:43 +0200)]
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.

9 years agoudev: input_id - use direct property and mt axis for touch screen detection
Andreas Pokorny [Fri, 29 May 2015 12:54:53 +0000 (14:54 +0200)]
udev: input_id - use direct property and mt axis for touch screen detection

A lot of touch screens use INPUT_PROP_DIRECT to indicate that touch input
maps directly to the underlying screen, while the BTN_TOUCH bit might not be
set.

9 years agoudev: input_id - refactor device detection
Andreas Pokorny [Fri, 29 May 2015 12:54:52 +0000 (14:54 +0200)]
udev: input_id - refactor device detection

This change switches to bools and separates bit flag evaluation from
decision making and application of udev properties, while hopefully
keeping the same semantics. Apart from using BTN_LEFT instead of BTN_MOUSE
for mouse detection.

9 years agoremove gudev and gtk-doc
Kay Sievers [Tue, 2 Jun 2015 22:09:23 +0000 (00:09 +0200)]
remove gudev and gtk-doc

The library moved to:
  https://git.gnome.org/browse/libgudev/

9 years agofix double semicolon typo
Thomas Hindoe Paaboel Andersen [Tue, 2 Jun 2015 21:20:15 +0000 (23:20 +0200)]
fix double semicolon typo

9 years agohwdb: update
Kay Sievers [Tue, 2 Jun 2015 18:19:31 +0000 (20:19 +0200)]
hwdb: update

9 years agohwdb: Update database of Bluetooth company identifiers
Marcel Holtmann [Mon, 1 Jun 2015 19:11:40 +0000 (21:11 +0200)]
hwdb: Update database of Bluetooth company identifiers

9 years agoMerge pull request #12 from systemd-mailing-devs/1433236104-9967-1-git-send-email...
Tom Gundersen [Tue, 2 Jun 2015 16:45:16 +0000 (18:45 +0200)]
Merge pull request #12 from systemd-mailing-devs/1433236104-9967-1-git-send-email-m.olbrich@pengutronix.de

missing: add more btrfs defines

9 years agoudev-builtin: path_id - don't pass NULL to udev_device_get_parent()
Tom Gundersen [Tue, 2 Jun 2015 14:53:36 +0000 (16:53 +0200)]
udev-builtin: path_id - don't pass NULL to udev_device_get_parent()

Being explicit about this makes the code easier to follow IMHO.

9 years agoudev: add some asserts
Tom Gundersen [Tue, 2 Jun 2015 14:52:07 +0000 (16:52 +0200)]
udev: add some asserts

Mostly for documentation purposes.

9 years agosd-device: get_driver - remember if a device does not have a driver
Tom Gundersen [Mon, 1 Jun 2015 21:53:37 +0000 (23:53 +0200)]
sd-device: get_driver - remember if a device does not have a driver

Don't try to read it again.

9 years agosd-device: get_subsystem - don't complain if a device does not have a subsystem
Tom Gundersen [Mon, 1 Jun 2015 21:51:37 +0000 (23:51 +0200)]
sd-device: get_subsystem - don't complain if a device does not have a subsystem

9 years agoMerge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email...
Daniel Mack [Tue, 2 Jun 2015 15:57:43 +0000 (17:57 +0200)]
Merge pull request #5 from systemd-mailing-devs/1432910411-14517-1-git-send-email-llua@gmx.com

zsh-completion: a more style/tag aware _systemctl

9 years agoMerge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email...
Daniel Mack [Tue, 2 Jun 2015 15:43:29 +0000 (17:43 +0200)]
Merge pull request #4 from systemd-mailing-devs/1431989131-25145-1-git-send-email-llua@gmx.com

zsh-completion: fix completion of --user services

9 years agoMerge pull request #34 from systemd-mailing-devs/1432619328-32030-1-git-send-email...
Tom Gundersen [Tue, 2 Jun 2015 15:29:52 +0000 (17:29 +0200)]
Merge pull request #34 from systemd-mailing-devs/1432619328-32030-1-git-send-email-m.olbrich@pengutronix.de

missing: add more IFLA_VXLAN_* defines

9 years agoMerge pull request #8 from systemd-mailing-devs/1433236059-9824-1-git-send-email...
Martin Pitt [Tue, 2 Jun 2015 15:24:34 +0000 (17:24 +0200)]
Merge pull request #8 from systemd-mailing-devs/1433236059-9824-1-git-send-email-m.olbrich@pengutronix.de

random-util: guard including sys/auxv.h with the corresponding ifdef …

9 years agoMerge pull request #39 from filbranden/manpages_rootprefix
Daniel Mack [Tue, 2 Jun 2015 15:22:06 +0000 (17:22 +0200)]
Merge pull request #39 from filbranden/manpages_rootprefix

Manpages rootprefix

9 years agobuild-sys: Normalize paths of configure options
Michael Biebl [Sat, 30 May 2015 01:04:55 +0000 (03:04 +0200)]
build-sys: Normalize paths of configure options

Strip trailing slashes from options such as --with-rootprefix, so that building
with rootprefix="/" results in paths like "/lib" instead of "//lib".

Also handle paths such as "/usr/" gracefully.

Use m4/ax_normalize_path.m4 from the autoconf-archive project, which is now
included in our tree as per usual practices in using autoconf-archive macros.

Tested with the following configure options:
  ./configure \
        --with-rootprefix=/ \
        --with-rootlibdir=/lib64/ \
        --prefix=/usr/ \
        --libdir=/lib/ \
        --with-bashcompletiondir=/bash-completion/completions/

(The "prefix" and "libdir" are already automatically normalized by Autoconf,
this command is testing the others.)

Compared the config.log and resulting trees (in particular man pages) to
confirm double slashes were not present in the latter.

Also tested that a configuration using default options is not affected and that
`make distcheck` still works as expected.

9 years agoman: replace hard-coded /usr/lib
Daniel Mack [Sat, 30 May 2015 00:05:33 +0000 (02:05 +0200)]
man: replace hard-coded /usr/lib

Replace some /usr/lib occurences in man/ with &rootprefix;/lib.

9 years agologind: Add a udev rule to tag all DRM cards with master-of-seat
Philip Withnall [Tue, 2 Jun 2015 14:24:48 +0000 (15:24 +0100)]
logind: Add a udev rule to tag all DRM cards with master-of-seat

This is needed for generic DRM devices like the VirtualBox vboxvideo
driver, which exposes itself as a generic, ID-less DRM device at
/dev/dri/card0 (after applying this commit):
   $ udevadm info --query=all --path \
      /sys/devices/pci0000:00/0000:00:02.0/drm/card0
   P: /devices/pci0000:00/0000:00:02.0/drm/card0
   N: dri/card0
   E: DEVNAME=/dev/dri/card0
   E: DEVPATH=/devices/pci0000:00/0000:00:02.0/drm/card0
   E: DEVTYPE=drm_minor
   E: ID_FOR_SEAT=drm-pci-0000_00_02_0
   E: ID_PATH=pci-0000:00:02.0
   E: ID_PATH_TAG=pci-0000_00_02_0
   E: MAJOR=226
   E: MINOR=0
   E: SUBSYSTEM=drm
   E: TAGS=:master-of-seat:seat:uaccess:
   E: USEC_INITIALIZED=59893

Without this patch, the capabilities for a seat on a VirtualBox
installation of systemd v219 incorrectly show it as non-graphical, even
though I can type these commands from an xterm:
   $ loginctl show-seat seat0
   Id=seat0
   CanMultiSession=yes
   CanTTY=yes
   CanGraphical=no
   …

https://bugs.freedesktop.org/show_bug.cgi?id=90822

9 years agoMerge pull request #37 from haraldh/boot-options
Kay Sievers [Tue, 2 Jun 2015 14:28:28 +0000 (16:28 +0200)]
Merge pull request #37 from haraldh/boot-options

90-loaderentry.install: fixup BOOT_OPTIONS

9 years ago90-loaderentry.install: fixup BOOT_OPTIONS
Harald Hoyer [Mon, 1 Jun 2015 09:28:03 +0000 (11:28 +0200)]
90-loaderentry.install: fixup BOOT_OPTIONS

better use "read -r -d '' -a" to read in the array. It handles multiple
lines and missing newline at the EOF.

9 years agologind: Save the user’s state when a session enters SESSION_ACTIVE
Philip Withnall [Tue, 2 Jun 2015 13:17:10 +0000 (14:17 +0100)]
logind: Save the user’s state when a session enters SESSION_ACTIVE

When (for example) switching from X11 to a new VT and logging in there,
creating a new session, the user state file (/run/systemd/users/$uid) is
not updated after the session becomes active. The latest time it is
saved is when the session is in SESSION_OPENING.

This results in a /run/systemd/users/$uid file which contains
STATE=online for the current user on the current active VT, which is
obviously wrong.

As functions like sd_uid_get_state() use this file to get the user’s
state, this could result in things like PolicyKit making incorrect
decisions about the user’s state. (See
https://bugs.freedesktop.org/show_bug.cgi?id=76358.)

Fix this by re-saving the state for a session’s user after completing
the state_job for that session.

https://bugs.freedesktop.org/show_bug.cgi?id=90818

9 years agoSeparate the % sign from the number
Pablo Lezaeta Reyes [pˈaβ̞lo lˌe̞θaˈeta rˈejɛ] [Tue, 31 Mar 2015 05:47:39 +0000 (02:47 -0300)]
Separate the % sign from the number

In spanish the % sign is supposed to be separated from the number [1 and 2 both in spanish] so I separated the %% that draw the percentage sign from the number.

[1] http://www.fundeu.es/recomendacion/el-se-escribe-separado-de-la-cifra-a-la-que-acompana-802/
[2] http://aplica.rae.es/orweb/cgi-bin/v.cgi?i=QGkHLBzKcEgZrQyD

PD: I know that probably this is not the propper place but I don't know where submit the fix or if I do it right

9 years agorandom-util: guard including sys/auxv.h with the corresponding ifdef check
Michael Olbrich [Tue, 2 Jun 2015 09:07:39 +0000 (11:07 +0200)]
random-util: guard including sys/auxv.h with the corresponding ifdef check

9 years agomissing: add more btrfs defines
Michael Olbrich [Tue, 2 Jun 2015 09:08:24 +0000 (11:08 +0200)]
missing: add more btrfs defines

9 years agotest-unit-file: add test for improperly escaped exec string
Daniel Mack [Mon, 1 Jun 2015 16:05:02 +0000 (18:05 +0200)]
test-unit-file: add test for improperly escaped exec string

Add a regression test for the recent breakage of handling improperly
escaped exec strings in unit files.

Code contributed by Martin Pitt:

  https://bugs.freedesktop.org/show_bug.cgi?id=90794

9 years agoload-fragment: use UNESCAPE_RELAX flag to parse exec directives
Daniel Mack [Mon, 1 Jun 2015 15:49:04 +0000 (17:49 +0200)]
load-fragment: use UNESCAPE_RELAX flag to parse exec directives

The cunescape() helper function used to handle unknown escaping sequences
gracefully by copying them over verbatim.

Commit 527b7a42 ("util: rework cunescape(), improve error handling") added
a flag to make that behavior optional, and changed to default to error out
with -EINVAL otherwise.

However, config_parse_exec(), which is used to parse the
Exec{Start,Stop}{Post,Pre,} directives of unit files, was not changed along
with that commit, which means that directives with improperly escaped
command line strings are no longer parsed.

Relevant bugreports include:

  https://bugs.freedesktop.org/show_bug.cgi?id=90794
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787256

Fix this by passing UNESCAPE_RELAX to config_parse_exec() in order to
restore the original behavior.