platform/upstream/systemd.git
9 years agoMerge pull request #314 from geertj/missing-exports
Lennart Poettering [Mon, 22 Jun 2015 20:47:42 +0000 (22:47 +0200)]
Merge pull request #314 from geertj/missing-exports

export sd_bus_object_added() / _removed()

9 years agoMerge pull request #319 from teg/udev-cgroup-warning
Lennart Poettering [Mon, 22 Jun 2015 20:32:26 +0000 (22:32 +0200)]
Merge pull request #319 from teg/udev-cgroup-warning

udevd: suppress warning if we don't find cgroup

9 years agoMerge pull request #322 from kaysievers/wip
Kay Sievers [Mon, 22 Jun 2015 18:22:57 +0000 (20:22 +0200)]
Merge pull request #322 from kaysievers/wip

man: remove outdated links and stray character

9 years agoman: remove stray · from header
Kay Sievers [Mon, 22 Jun 2015 17:54:52 +0000 (19:54 +0200)]
man: remove stray · from header

9 years agoman: remove links to outdated kdbus development repository
Kay Sievers [Mon, 22 Jun 2015 17:54:09 +0000 (19:54 +0200)]
man: remove links to outdated kdbus development repository

9 years agoudevd: suppress warning if we don't find cgroup
Tom Gundersen [Mon, 22 Jun 2015 14:53:54 +0000 (16:53 +0200)]
udevd: suppress warning if we don't find cgroup

This is expected on non-systemd systems, so just log it at debug level.

This fixes issue #309.

9 years agoMerge pull request #315 from llua/zsh-completion
Daniel Mack [Mon, 22 Jun 2015 08:30:22 +0000 (10:30 +0200)]
Merge pull request #315 from llua/zsh-completion

zsh-completion: _systemd-nspawn - add more argument completion

9 years agoexport sd_bus_object_added() / _removed()
Geert Jansen [Sun, 21 Jun 2015 11:44:35 +0000 (07:44 -0400)]
export sd_bus_object_added() / _removed()

Fixes #306.

9 years agozsh-completion: _systemd-nspawn - add more argument completion
Eric Cook [Mon, 22 Jun 2015 01:59:26 +0000 (21:59 -0400)]
zsh-completion: _systemd-nspawn - add more argument completion

filenames will be completed for --image/-i/--bind/--bind-ro/--tmpfs
network interfaces for --network-(interface|macvlan|ipvlan|bridge)
users for --user/-u, yes & no for --register, x86 * x86-64 for
--personality

display a message of the expected argument for --machine/-M/--uuid
--slice/-S/--port/-p/--selinux-*/-Z/-L/--setenv

Allow completing commands(and their options) of the host system for COMMAND

9 years agoMerge pull request #304 from mknjc/master
Daniel Mack [Sun, 21 Jun 2015 09:32:12 +0000 (11:32 +0200)]
Merge pull request #304 from mknjc/master

fix machinectl bind man entry

9 years agopam_systemd: Properly check kdbus availability
Jan Alexander Steffens (heftig) [Sun, 21 Jun 2015 03:59:34 +0000 (05:59 +0200)]
pam_systemd: Properly check kdbus availability

This properly avoids setting DBUS_SESSION_BUS_ADDRESS if kdbus
is loaded (or built into the kernel) but not wanted.

9 years agofix machinectl bind man entry
Markus Knetschke [Sat, 20 Jun 2015 15:05:48 +0000 (17:05 +0200)]
fix machinectl bind man entry

9 years agoMerge pull request #303 from zonque/man
David Herrmann [Sat, 20 Jun 2015 12:43:45 +0000 (14:43 +0200)]
Merge pull request #303 from zonque/man

man: rename systemd-bus-proxyd@.service.xml → systemd-bus-proxyd.…

9 years agoman: rename systemd-bus-proxyd@.service.xml → systemd-bus-proxyd.service.xml
Daniel Mack [Sat, 20 Jun 2015 12:25:27 +0000 (14:25 +0200)]
man: rename systemd-bus-proxyd@.service.xml → systemd-bus-proxyd.service.xml

The bus proxy is multi-threaded now. Reflect that in the man pages.

9 years agoMerge pull request #301 from daurnimator/master
Daniel Mack [Sat, 20 Jun 2015 12:00:28 +0000 (14:00 +0200)]
Merge pull request #301 from daurnimator/master

man: sd-bus: it's 'machine' not 'container'

9 years agoman: sd-bus: it's 'machine' not 'container'
daurnimator [Sat, 20 Jun 2015 08:57:53 +0000 (18:57 +1000)]
man: sd-bus: it's 'machine' not 'container'

9 years agoman: be more careful with the wording in busctl(1)
Lennart Poettering [Fri, 19 Jun 2015 20:29:29 +0000 (22:29 +0200)]
man: be more careful with the wording in busctl(1)

9 years agoman: various documentation improvements for sd-bus
Lennart Poettering [Fri, 19 Jun 2015 20:18:36 +0000 (22:18 +0200)]
man: various documentation improvements for sd-bus

9 years agopo: run make update-po v221
Lennart Poettering [Fri, 19 Jun 2015 00:13:03 +0000 (02:13 +0200)]
po: run make update-po

9 years agoMerge pull request #298 from zonque/intltool
Lennart Poettering [Fri, 19 Jun 2015 10:47:21 +0000 (12:47 +0200)]
Merge pull request #298 from zonque/intltool

build-sys: bring back an intltool-update workaround

9 years agobuild-sys: bring back an intltool-update workaround
Daniel Mack [Fri, 19 Jun 2015 08:22:06 +0000 (10:22 +0200)]
build-sys: bring back an intltool-update workaround

Currently, 'make distcheck' fails with an error such as this:

    srcdir=../../po /usr/bin/intltool-update -m
    The following files contain translations and are currently not in use.
    Please consider adding these to the POTFILES.in file, located in the po/ directory.

    build2/src/core/org.freedesktop.systemd1.policy.in
    build3/src/core/org.freedesktop.systemd1.policy.in

    [...]

This is caused by a new behavior of autmake 1.15 which changed the
location of the build tree during 'make distcheck', and the fact that
intltool doesn't yet ignore that paths.

We used to have a workaround in configure.ac that makes the failing call
a no-op, but it was accidentially removed in 23756070
("remove gudev and gtk-doc").

Bring back that snipet for now, until intltool and automake sorted out
their issues and like each other again.

Also see

  https://bugs.launchpad.net/intltool/+bug/1117944

9 years agoMerge pull request #297 from ssahani/net
Ronny Chevalier [Fri, 19 Jun 2015 08:24:13 +0000 (10:24 +0200)]
Merge pull request #297 from ssahani/net

networkd: vlan improve logging

9 years agonetworkd: vlan improve logging
Susant Sahani [Mon, 15 Jun 2015 03:34:28 +0000 (09:04 +0530)]
networkd: vlan improve logging

Replaces strerror() usage with log_netdev_error_errno()

9 years agoupdate TODO
Lennart Poettering [Thu, 18 Jun 2015 23:12:54 +0000 (01:12 +0200)]
update TODO

9 years agoNEWS: update contributors list and date
Lennart Poettering [Thu, 18 Jun 2015 23:12:28 +0000 (01:12 +0200)]
NEWS: update contributors list and date

9 years agoMerge pull request #293 from teg/man-revert
Kay Sievers [Thu, 18 Jun 2015 20:27:50 +0000 (22:27 +0200)]
Merge pull request #293 from teg/man-revert

man: revert dynamic paths for split-usr setups

9 years agoMerge pull request #294 from teg/hashmap-debug-locking-2
David Herrmann [Thu, 18 Jun 2015 20:05:09 +0000 (22:05 +0200)]
Merge pull request #294 from teg/hashmap-debug-locking-2

hashmap: debug - lock access to the global hashmap list

9 years agoMerge pull request #292 from teg/man-udev-2
David Herrmann [Thu, 18 Jun 2015 19:42:08 +0000 (21:42 +0200)]
Merge pull request #292 from teg/man-udev-2

man: udev_device - finish new_* man page

9 years agoMerge pull request #291 from poettering/nspawn-suppress-eloop
David Herrmann [Thu, 18 Jun 2015 19:38:09 +0000 (21:38 +0200)]
Merge pull request #291 from poettering/nspawn-suppress-eloop

nspawn: suppress warning when /etc/resolv.conf is a valid symlink

9 years agohashmap: debug - lock access to the global hashmap list
Tom Gundersen [Thu, 18 Jun 2015 09:31:10 +0000 (11:31 +0200)]
hashmap: debug - lock access to the global hashmap list

This may be used from multi-threaded programs (say through nss-resolve),
so we must protect the global list.

This is still only relevant for debug builds, so we do not try to handle
cases where the locking fail, but simply assert.

9 years agoupdate TODO
Lennart Poettering [Thu, 18 Jun 2015 18:08:01 +0000 (20:08 +0200)]
update TODO

9 years agoupdate TODO
Lennart Poettering [Thu, 18 Jun 2015 18:03:11 +0000 (20:03 +0200)]
update TODO

9 years agoman: revert dynamic paths for split-usr setups
Tom Gundersen [Thu, 18 Jun 2015 17:47:44 +0000 (19:47 +0200)]
man: revert dynamic paths for split-usr setups

This did not really work out as we had hoped. Trying to do this upstream
introduced several problems that probably makes it better suited as a
downstream patch after all. At any rate, it is not releaseable in the
current state, so we at least need to revert this before the release.

 * by adjusting the path to binaries, but not do the same thing to the
   search path we end up with inconsistent man-pages. Adjusting the search
   path too would be quite messy, and it is not at all obvious that this is
   worth the effort, but at any rate it would have to be done before we
   could ship this.

 * this means that distributed man-pages does not make sense as they depend
   on config options, and for better or worse we are still distributing
   man pages, so that is something that definitely needs sorting out before
   we could ship with this patch.

 * we have long held that split-usr is only minimally supported in order
   to boot, and something we hope will eventually go away. So before we start
   adding even more magic/effort in order to make this work nicely, we should
   probably question if it makes sense at all.

9 years agonspawn: suppress warning when /etc/resolv.conf is a valid symlink
Lennart Poettering [Thu, 18 Jun 2015 17:42:59 +0000 (19:42 +0200)]
nspawn: suppress warning when /etc/resolv.conf is a valid symlink

In such a case let's suppress the warning (downgrade to LOG_DEBUG),
under the assumption that the user has no config file to update in its
place, but a symlink that points to something like resolved's
automatically managed resolve.conf file.

While we are at it, also stop complaining if we cannot write /etc/resolv.conf
due to a read-only disk, given that there's little we could do about it.

9 years agoupdate TODO
Lennart Poettering [Thu, 18 Jun 2015 17:40:47 +0000 (19:40 +0200)]
update TODO

9 years agoman: udev_device - finish new_* man page
Tom Gundersen [Thu, 18 Jun 2015 17:15:59 +0000 (19:15 +0200)]
man: udev_device - finish new_* man page

A description of device_id lacked. We still need to do the other
udev_device_* man pages.

9 years agoMerge pull request #288 from phomes/cgroup-util
Lennart Poettering [Thu, 18 Jun 2015 16:57:16 +0000 (18:57 +0200)]
Merge pull request #288 from phomes/cgroup-util

cgroup-util: actually use the path callback

9 years agoMerge pull request #285 from poettering/audit-table-fix
Tom Gundersen [Thu, 18 Jun 2015 16:38:40 +0000 (18:38 +0200)]
Merge pull request #285 from poettering/audit-table-fix

Audit table fix

9 years agoMerge pull request #286 from jsynacek/fix-edit-v3
Lennart Poettering [Thu, 18 Jun 2015 16:30:31 +0000 (18:30 +0200)]
Merge pull request #286 from jsynacek/fix-edit-v3

systemctl: fix edit when EDITOR contains arguments

9 years agoMerge pull request #289 from michich/hashmap-small-cleanup
Lennart Poettering [Thu, 18 Jun 2015 16:29:11 +0000 (18:29 +0200)]
Merge pull request #289 from michich/hashmap-small-cleanup

a tiny hashmap cleanup

9 years agocgroup-util: actually use the path callback
Thomas Hindoe Paaboel Andersen [Thu, 18 Jun 2015 15:21:21 +0000 (17:21 +0200)]
cgroup-util: actually use the path callback

We allow to specify a callback but then ignore the result. Looks like a trivial typo.
From 7b3fd6313c4b07b6f822a9f979d0c22350a401d9#diff-f010fa21ba7b659b519c122743e55604

9 years agoMerge pull request #287 from phomes/master
Lennart Poettering [Thu, 18 Jun 2015 15:22:59 +0000 (17:22 +0200)]
Merge pull request #287 from phomes/master

NEWS: typo fixes

9 years agoNEWS: typo fixes
Thomas Hindoe Paaboel Andersen [Thu, 18 Jun 2015 15:10:59 +0000 (17:10 +0200)]
NEWS: typo fixes

9 years agoNEWS: fix typo
Ronny Chevalier [Thu, 18 Jun 2015 14:23:28 +0000 (16:23 +0200)]
NEWS: fix typo

9 years agoMerge pull request #282 from martinpitt/master
Daniel Mack [Thu, 18 Jun 2015 14:01:58 +0000 (16:01 +0200)]
Merge pull request #282 from martinpitt/master

Fix out-of-tree builds and distcheck

9 years agosystemctl: fix edit when EDITOR contains arguments
Jan Synacek [Wed, 17 Jun 2015 11:53:04 +0000 (13:53 +0200)]
systemctl: fix edit when EDITOR contains arguments

Correctly support cases when the EDITOR environment variable and friends
also contain arguments. For example, to run emacs in terminal only, one
can say:

EDITOR="emacs -nw" systemctl edit myservice

9 years agoaudit: make sure to include libaudit-defined audit events in table
Lennart Poettering [Thu, 18 Jun 2015 11:41:09 +0000 (13:41 +0200)]
audit: make sure to include libaudit-defined audit events in table

This change hooks up $(audit_list_includes) that was already
defined since the beginning of the audit type list, but never actually
made use of.

It thus completes 4733607eec54034d2083534ebff2dad89c28574e.

9 years agoupdate TODO
Lennart Poettering [Thu, 18 Jun 2015 11:32:18 +0000 (13:32 +0200)]
update TODO

9 years agoMerge pull request #247 from shaded-enmity/origin/pullfix
Lennart Poettering [Thu, 18 Jun 2015 11:02:57 +0000 (13:02 +0200)]
Merge pull request #247 from shaded-enmity/origin/pullfix

import/pull: fix for the name/reference overwrite

9 years agoimport/pull: fix pulling by image digest
Pavel Odvody [Wed, 17 Jun 2015 11:25:06 +0000 (13:25 +0200)]
import/pull: fix pulling by image digest

When pulling by image digest the identifiers that
were produced by parsing image digest were later
overwritten by code parsing image tag.
This resulted in invalid identifiers being used
when contacting the remote endpoint, resulting in 404.

Reported here:
http://lists.freedesktop.org/archives/systemd-devel/2015-June/033039.html

9 years agotest: disable test-barrier by default
David Herrmann [Thu, 18 Jun 2015 08:18:31 +0000 (10:18 +0200)]
test: disable test-barrier by default

The test-barrier binary uses real-time alarms and timeouts to test for
races in the thread-barrier implementation. Hence, if your system is under
high load and your scheduler decides to not run test-barrier for
>BASE_TIME, then the tests are likely to fail.

Two options:
 1) Increase BASE_TIME. This will make the test take significantly longer
    for no real good. Furthermore, it is still not guaranteed that the
    task is scheduled.
 2) Don't rely on real-time timers, but use explicit synchronization. This
    would basically test one barrier implementation with another.. kinda
    ironic.. but maybe something worth looking into.
 3) Disable test-barrier by default.

This patch chooses option 3) and makes sure test-barrier only runs if you
pass any argument.

Side note:
        test-barrier is written in a way that if it fails under load, but
        does not on idle systems, then it is very _unlikely_ that the
        barrier implementation is the culprit. Hence, it makes little
        sense to run it under load, anyway. It will not improve the test
        coverage of barrier.c, but rather the coverage of the test itself.

9 years agoMerge pull request #281 from michaelolbrich/glibc-2.16-fix
Daniel Mack [Thu, 18 Jun 2015 08:18:28 +0000 (10:18 +0200)]
Merge pull request #281 from michaelolbrich/glibc-2.16-fix

exit-status: add missing include for SIG* defines

9 years agobuild-sys: don't dist man/systemd.directives.xml
Martin Pitt [Thu, 18 Jun 2015 06:42:15 +0000 (08:42 +0200)]
build-sys: don't dist man/systemd.directives.xml

It depends on man/custom-entities.ent which is (and needs to be) a built file,
so we need to always build man/systemd.directives.xml as well.

We also need to drop this from update-man-list so that it doesn't get disted
from Makefile-man.am.

Fixes distcheck failure.

https://github.com/systemd/systemd/issues/215

9 years agoexit-status: add missing include for SIG* defines
Michael Olbrich [Thu, 18 Jun 2015 07:00:01 +0000 (09:00 +0200)]
exit-status: add missing include for SIG* defines

Otherwise building fails with glibc 2.16. It works with glibc >= 2.17
because it is implicitly included via macro.h -> sys/param.h -> signal.h

9 years agobuild-sys: make SOURCE_XML_FILES array relative to $(top_srcdir)
Daniel Mack [Wed, 17 Jun 2015 20:52:24 +0000 (22:52 +0200)]
build-sys: make SOURCE_XML_FILES array relative to $(top_srcdir)

When calling the build commands from another directory than the toplevel:

  mkdir build
  cd build
  ../configure [...]

... the compilation fails with the following error:

 GEN      man/systemd.directives.xml
Traceback (most recent call last):
  File "../tools/make-directive-index.py", line 313, in make_page
    _extract_directives(directive_groups, formatting, page)
  File "../tools/make-directive-index.py", line 191, in _extract_directives
    t = xml_parse(page)
  File "/home/martin/upstream/systemd/tools/xml_helper.py", line 30, in xml_parse
    doc = tree.parse(page, _parser)
  File "lxml.etree.pyx", line 3301, in lxml.etree.parse (src/lxml/lxml.etree.c:72453)
  File "parser.pxi", line 1791, in lxml.etree._parseDocument (src/lxml/lxml.etree.c:105915)
  File "parser.pxi", line 1817, in lxml.etree._parseDocumentFromURL (src/lxml/lxml.etree.c:106214)
  File "parser.pxi", line 1721, in lxml.etree._parseDocFromFile (src/lxml/lxml.etree.c:105213)
  File "parser.pxi", line 1122, in lxml.etree._BaseParser._parseDocFromFile (src/lxml/lxml.etree.c:100163)
  File "parser.pxi", line 580, in lxml.etree._ParserContext._handleParseResultDoc (src/lxml/lxml.etree.c:94286)
  File "parser.pxi", line 690, in lxml.etree._handleParseResult (src/lxml/lxml.etree.c:95722)
  File "parser.pxi", line 618, in lxml.etree._raiseParseError (src/lxml/lxml.etree.c:94754)
OSError: Error reading file 'man/bootup.xml': failed to load external entity "man/bootup.xml"

That is because the file names in the XML_FILES array are not relative
to $(top_srcdir), and hence ../tools/make-directive-index.py is called
with non-existant arguments.

To fix this, call patsubst when generating SOURCE_XML_FILES from
NON_INDEX_XML_FILES.

9 years agoMerge pull request #269 from teg/udev-docs-1
Kay Sievers [Wed, 17 Jun 2015 22:45:51 +0000 (00:45 +0200)]
Merge pull request #269 from teg/udev-docs-1

man: libudev - add description to udev_device_*

9 years agoMerge pull request #272 from poettering/nspawn-flush-copy-fd
Daniel Mack [Wed, 17 Jun 2015 22:34:22 +0000 (00:34 +0200)]
Merge pull request #272 from poettering/nspawn-flush-copy-fd

nspawn: when exiting, flush all remaining bytes from the pty to stdout

9 years agobuild-sys: bump versions and sonames
Lennart Poettering [Wed, 17 Jun 2015 22:28:06 +0000 (00:28 +0200)]
build-sys: bump versions and sonames

9 years agoMerge pull request #276 from poettering/dbus-search-path
Kay Sievers [Wed, 17 Jun 2015 22:26:46 +0000 (00:26 +0200)]
Merge pull request #276 from poettering/dbus-search-path

bus-proxy: add new dbus policy search paths from /usr

9 years agoNEWS: update
Kay Sievers [Wed, 17 Jun 2015 22:25:17 +0000 (00:25 +0200)]
NEWS: update

9 years agoMerge pull request #277 from poettering/journal-interleaving-monotonic
Lennart Poettering [Wed, 17 Jun 2015 22:22:22 +0000 (00:22 +0200)]
Merge pull request #277 from poettering/journal-interleaving-monotonic

journal: make sure the clock increases strict monotonic

9 years agoNEWS: prepare for v221
Lennart Poettering [Wed, 17 Jun 2015 22:18:49 +0000 (00:18 +0200)]
NEWS: prepare for v221

9 years agohwdb: update databases from upstream
Lennart Poettering [Wed, 17 Jun 2015 21:54:35 +0000 (23:54 +0200)]
hwdb: update databases from upstream

9 years agoman: minor typo fix
Lennart Poettering [Wed, 17 Jun 2015 21:50:13 +0000 (23:50 +0200)]
man: minor typo fix

9 years agoman: run make update-man-list
Lennart Poettering [Wed, 17 Jun 2015 21:50:02 +0000 (23:50 +0200)]
man: run make update-man-list

9 years agoMerge pull request #270 from phomes/master
Tom Gundersen [Wed, 17 Jun 2015 21:27:39 +0000 (23:27 +0200)]
Merge pull request #270 from phomes/master

udevd: remove dead code

9 years agojournal: make sure the clock increases strict monotonic
Lennart Poettering [Wed, 17 Jun 2015 21:04:02 +0000 (23:04 +0200)]
journal: make sure the clock increases strict monotonic

Let's work around crappy clocks in test-journal-interleaving.c too. This
does the same as 98d2a5341788b49e82d628dfdc2e241af6d70dcd but for
test-journal-interlaving.c rather than test-journal-stream.c.

9 years agoMerge pull request #275 from poettering/acl-fixes
Martin Pitt [Wed, 17 Jun 2015 21:10:19 +0000 (23:10 +0200)]
Merge pull request #275 from poettering/acl-fixes

acl-util: various smaller fixes to parse_acl()

9 years agoupdate TODO
Lennart Poettering [Wed, 17 Jun 2015 21:03:27 +0000 (23:03 +0200)]
update TODO

9 years agoMerge pull request #271 from poettering/test-journal-stream-crappy-clock
Lennart Poettering [Wed, 17 Jun 2015 20:56:09 +0000 (22:56 +0200)]
Merge pull request #271 from poettering/test-journal-stream-crappy-clock

journal: ensure test-journal-stream doesn't get confused by crappy cl…

9 years agobus-proxy: add new dbus policy search paths from /usr
Lennart Poettering [Wed, 17 Jun 2015 20:43:46 +0000 (22:43 +0200)]
bus-proxy: add new dbus policy search paths from /usr

D-Bus upstream is working on extending the configuration/policy search
path, follow this.

See #274 for details.

9 years agoMerge pull request #273 from teg/libudev-device-get-sysattrs
Martin Pitt [Wed, 17 Jun 2015 20:35:19 +0000 (22:35 +0200)]
Merge pull request #273 from teg/libudev-device-get-sysattrs

libudev: device - fix typo in udev_device_get_sysattr_list_entry()

9 years agoacl-util: various smaller fixes to parse_acl()
Lennart Poettering [Wed, 17 Jun 2015 20:08:21 +0000 (22:08 +0200)]
acl-util: various smaller fixes to parse_acl()

- Make string parameter const

- Don't log some OOM errors, but not others

- Don't eat up errors generated by acl_from_text()

- Make sure check for success of every single strv_push() call

9 years agolibudev: device - fix typo in udev_device_get_sysattr_list_entry()
Tom Gundersen [Wed, 17 Jun 2015 19:57:25 +0000 (21:57 +0200)]
libudev: device - fix typo in udev_device_get_sysattr_list_entry()

We were adding the attributes to the wrong list.

9 years agoMerge pull request #248 from llua/zsh-completion
Daniel Mack [Wed, 17 Jun 2015 19:37:46 +0000 (21:37 +0200)]
Merge pull request #248 from llua/zsh-completion

zsh-completion: _loginctl - general bug fixes

9 years agonspawn: when exiting, flush all remaining bytes from the pty to stdout
Lennart Poettering [Wed, 17 Jun 2015 18:54:45 +0000 (20:54 +0200)]
nspawn: when exiting, flush all remaining bytes from the pty to stdout

This is a simpler fix for #210, it simply uses copy_bytes() for the
copying.

9 years agoMerge pull request #44 from filbranden/unquote_first_word1
Lennart Poettering [Wed, 17 Jun 2015 18:41:30 +0000 (20:41 +0200)]
Merge pull request #44 from filbranden/unquote_first_word1

Replace FOREACH_WORD_QUOTED with a loop using unquote_first_word in config_parse_exec()

9 years agojournal: ensure test-journal-stream doesn't get confused by crappy clocks
Lennart Poettering [Wed, 17 Jun 2015 18:37:19 +0000 (20:37 +0200)]
journal: ensure test-journal-stream doesn't get confused by crappy clocks

This ensures that we write strictly monotonic timestamps into the
journal files, to ensure that we can properly interleave everything
correctly.

See #175 for details.

9 years agoudved: remove dead code
Thomas Hindoe Paaboel Andersen [Wed, 17 Jun 2015 18:29:41 +0000 (20:29 +0200)]
udved: remove dead code

Leftover from 6af5e6a4c918a68b196a04346732e094e5373a36

9 years agologs-show: print a debug message when we skip entries without MESSAGE= fields
Lennart Poettering [Wed, 17 Jun 2015 18:28:20 +0000 (20:28 +0200)]
logs-show: print a debug message when we skip entries without MESSAGE= fields

9 years agoload-fragment: reset the list on an ExecStart= containing only whitespace
Filipe Brandenburger [Sat, 6 Jun 2015 06:12:25 +0000 (23:12 -0700)]
load-fragment: reset the list on an ExecStart= containing only whitespace

This is consistent with how an empty string works in an ExecStart=
statement.  We should not differentiate between an empty string and
whitespace only (since they look the same.)

Update the test case with whitespace only to reflect that the list is
reset.

Tested that `test-unit-file` passes and other test cases are not
affected.  Installed the patched systemd binaries on a machine, booted
it, looked for out of the usual behavior but did not find any.

9 years agoload-fragment: use unquote_first_word in config_parse_exec
Filipe Brandenburger [Sun, 31 May 2015 05:48:52 +0000 (22:48 -0700)]
load-fragment: use unquote_first_word in config_parse_exec

Convert config_parse_exec() from using FOREACH_WORD_QUOTED into a loop
of unquote_first_word.

Loop through the arguments only once (the FOREACH_WORD_QUOTED
implementation did it twice, once to count them and another time to
process and store them.)

Use newly introduced flag UNQUOTE_UNESCAPE_RELAX to preserve
unrecognized escape sequences such as regexps matches such as "\w",
"\d", etc. (Valid escape sequences such as "\s" or "\b" still need an
extra backslash if literals are desired for regexps.)

Differences in behavior:

- Handle ; (command separator) in special, so that only ; on its own is
  valid for that purpose, an quoted semicolon ";" or ';' will now behave
  as a literal semicolon.  This is probably what was initially intended.

- Handle \; (to introduce a literal semicolon) in special, so that only \;
  is turned into a semicolon but not \\; or "\\;" or "\;" which are kept
  as a literal \; in the output.  This is probably what was initially
  intended.

Known issues:

- Using an empty string (for example, ExecStartPre=<empty>) will empty
  the list and remove the existing commands, but using whitespace only
  (for example, ExecStartPre=<spaces>) will not.  This is a pre-existing
  issue and will be dealt with in a follow up commit.

Tested:

- Unit tests passing.  Also `make distcheck` still works as expected.

- Installed it on a local machine and booted with it, checked console
  output, systemctl and journalctl output, did not notice any issues
  running the patched systemd binaries.

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

9 years agotests: additional cases in test-unit-file
Filipe Brandenburger [Tue, 9 Jun 2015 05:01:52 +0000 (22:01 -0700)]
tests: additional cases in test-unit-file

These tests will be useful to check the cases regarding quoted and
escaped semicolon when we switch to using unquote_first_word.

Additionally, convert some of the tests that have semicolons so that the
argument after the semicolon looks like a path (starts with /) so that
we can see the change of behavior when making config_parse_exec more
strict about what it accepts as a command separator.

9 years agoutil: Introduce unquote_first_word_and_warn
Filipe Brandenburger [Tue, 9 Jun 2015 04:31:43 +0000 (21:31 -0700)]
util: Introduce unquote_first_word_and_warn

It will try to unquot_first_word, but if it runs into escaping problems
it will retry it adding UNQUOTE_CUNESCAPE_RELAX to the flags.  If it
succeeds on the second try, it will log a warning about it.  If it fails
both times, it will log an error.

Add test cases to confirm it behaves as expected.

9 years agoutil: New flag UNQUOTE_UNESCAPE_RELAX for unquote_first_word
Filipe Brandenburger [Wed, 3 Jun 2015 04:08:24 +0000 (21:08 -0700)]
util: New flag UNQUOTE_UNESCAPE_RELAX for unquote_first_word

The new flag UNQUOTE_UNESCAPE_RELAX preserves unrecognized escape
sequences verbatim in unquote_first_word, either when it's a trailing
backslash (similar to UNQUOTE_RELAX, but in this case keep the extra
backslash in the output) or in the middle of a sequence string.

Add unit test cases to ensure the new flag works as expected and to
prevent regressions from being introduced.

Tested with a follow up commit converting config_parse_exec() to start
using unquote_first_word, in which case this flags makes it possible to
preserve unrecognized escape sequences.

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

9 years agoutil: Refactor common cunescape block in unquote_first_word
Filipe Brandenburger [Sat, 30 May 2015 06:42:47 +0000 (23:42 -0700)]
util: Refactor common cunescape block in unquote_first_word

9 years agoMerge pull request #267 from phomes/master
Tom Gundersen [Wed, 17 Jun 2015 18:04:17 +0000 (20:04 +0200)]
Merge pull request #267 from phomes/master

sd-dhcp-client: readd deleted error check

9 years agoMerge pull request #265 from smcv/logind-runtimedir-race-write-earlier
Lennart Poettering [Wed, 17 Jun 2015 17:52:04 +0000 (19:52 +0200)]
Merge pull request #265 from smcv/logind-runtimedir-race-write-earlier

logind: save /run/systemd/users/UID before starting user@.service

9 years agoman: libudev - add description to udev_device_*
Tom Gundersen [Wed, 17 Jun 2015 17:48:15 +0000 (19:48 +0200)]
man: libudev - add description to udev_device_*

9 years agobus: fix installing DRIVER matches on kdbus
David Herrmann [Wed, 17 Jun 2015 17:15:58 +0000 (19:15 +0200)]
bus: fix installing DRIVER matches on kdbus

In kdbus we still have to support org.freedesktop.DBus matches even though
there is no real bus driver. The reason is that bus-control.c turns
NameOwnerChanged matches into proper kdbus matches. If we drop DRIVER
matches early, we will never match on name-changes for kdbus.

Two ways to fix this:

 1) Install DRIVER matches on kdbus (which is the simple way our and which
    is what this patch does).

 2) Properly fix the scope-detection to let NameOwnerChanged matches
    through (or better: block anything with Member!=NameOwnerChanged).

9 years agosd-dhcp-client: readd deleted error check
Thomas Hindoe Paaboel Andersen [Wed, 17 Jun 2015 16:09:31 +0000 (18:09 +0200)]
sd-dhcp-client: readd deleted error check

Seems to have been removed by mistake in:
9021bb9f935c93b516b10c88db2a212a9e3a8140

9 years agoMerge pull request #262 from teg/udev-dup-fds-2
Kay Sievers [Wed, 17 Jun 2015 17:06:49 +0000 (19:06 +0200)]
Merge pull request #262 from teg/udev-dup-fds-2

udevd: daemon - connect /dev/null to std{in,out,err} in debug mode

9 years agoMerge pull request #263 from kaysievers/wip
Kay Sievers [Wed, 17 Jun 2015 17:06:13 +0000 (19:06 +0200)]
Merge pull request #263 from kaysievers/wip

turn kdbus support into a runtime option

9 years agowatchdog: Don't require WDIOC_SETOPTIONS/WDIOS_ENABLECARD
Jean Delvare [Wed, 17 Jun 2015 16:57:39 +0000 (18:57 +0200)]
watchdog: Don't require WDIOC_SETOPTIONS/WDIOS_ENABLECARD

Not all watchdog drivers implement WDIOC_SETOPTIONS. Drivers which do
not implement it have their device always enabled. So it's fine to
report an error if WDIOS_DISABLECARD is passed and the ioctl is not
implemented, however failing when WDIOS_ENABLECARD is passed and the
ioctl is not implemented is not good: if the device was already
enabled then WDIOS_ENABLECARD was a no-op and wasn't needed in the
first place. So we can just ignore the error and continue.

9 years agoMerge pull request #259 from poettering/logind-label-fix
Tom Gundersen [Wed, 17 Jun 2015 17:02:19 +0000 (19:02 +0200)]
Merge pull request #259 from poettering/logind-label-fix

logind: apply selinux label to XDG_RUNTIME_DIR

9 years agoudevd: daemon - connect /dev/null to std{in,out,err} in debug mode
Tom Gundersen [Wed, 17 Jun 2015 15:43:11 +0000 (17:43 +0200)]
udevd: daemon - connect /dev/null to std{in,out,err} in debug mode

This is essentially a revert of 5c67cf2 and fixes issue #190.

9 years agologind: save /run/systemd/users/UID before starting user@.service
Simon McVittie [Wed, 17 Jun 2015 15:45:49 +0000 (16:45 +0100)]
logind: save /run/systemd/users/UID before starting user@.service

Previously, this had a race condition during a user's first login.
Some component calls CreateSession (most likely by a PAM service
other than 'systemd-user' running pam_systemd), with the following
results:

- logind:
  * create the user's XDG_RUNTIME_DIR
  * tell pid 1 to create user-UID.slice
  * tell pid 1 to start user@UID.service

Then these two processes race:

- logind:
  * save information including XDG_RUNTIME_DIR to /run/systemd/users/UID

- the subprocess of pid 1 responsible for user@service:
  * start a 'systemd-user' PAM session, which reads XDG_RUNTIME_DIR
    and puts it in the environment
  * run systemd --user, which requires XDG_RUNTIME_DIR in the
    environment

If logind wins the race, which usually happens, everything is fine;
but if the subprocesses of pid 1 win the race, which can happen
under load, then systemd --user exits unsuccessfully.

To avoid this race, we have to write out /run/systemd/users/UID
even though the service has not "officially" started yet;
previously this did an early-return without saving anything.
Record its state as OPENING in this case.

Bug: https://github.com/systemd/systemd/issues/232
Reviewed-by: Philip Withnall <philip.withnall@collabora.co.uk>
9 years agoturn kdbus support into a runtime option
Kay Sievers [Wed, 17 Jun 2015 14:37:55 +0000 (16:37 +0200)]
turn kdbus support into a runtime option

./configure --enable/disable-kdbus can be used to set the default
behavior regarding kdbus.

If no kdbus kernel support is available, dbus-dameon will be used.

With --enable-kdbus, the kernel command line option "kdbus=0" can
be used to disable kdbus.

With --disable-kdbus, the kernel command line option "kdbus=1" is
required to enable kdbus support.

9 years agohashmap: allow NULL key in ordered_hashmap_next()
Michal Schmidt [Tue, 16 Jun 2015 13:46:40 +0000 (15:46 +0200)]
hashmap: allow NULL key in ordered_hashmap_next()

There is no reason to require key to be non-NULL.
Change test_ordered_hashmap_next() to use trivial_hash_ops in order to
test NULL key too.

9 years agohashmap: remove _IDX_ITERATOR_NIL definition
Michal Schmidt [Tue, 16 Jun 2015 13:43:06 +0000 (15:43 +0200)]
hashmap: remove _IDX_ITERATOR_NIL definition

It is unused and rightly so. Users of the hashmap API should
not care about the idx values or any other Iterator internals.
_IDX_ITERATOR_FIRST in hashmap.h is an exception. It is needed
for ITERATOR_FIRST.