platform/upstream/systemd.git
6 years agotests: make UBSan print full backtraces
Evgeny Vereshchagin [Sat, 15 Sep 2018 14:21:33 +0000 (14:21 +0000)]
tests: make UBSan print full backtraces

This should make it easier to get backtraces that can be
pasted into issues like https://github.com/systemd/systemd/issues/10096.

6 years agosd-device: use qsort_safe() (#10099)
Yu Watanabe [Sun, 16 Sep 2018 14:46:58 +0000 (23:46 +0900)]
sd-device: use qsort_safe() (#10099)

The number of found devices may be zero. So, let's use qsort_safe().

Follow-up for 0a1665890cec06032a17c16206e9f519ca88446e.
Fixes #10096.

6 years agoMerge pull request #9928 from yuwata/libudev-cleanups
Zbigniew Jędrzejewski-Szmek [Sat, 15 Sep 2018 20:36:38 +0000 (22:36 +0200)]
Merge pull request #9928 from yuwata/libudev-cleanups

libudev: coding style updates

6 years agoMerge pull request #9958 from yuwata/sd-device-enum-set
Zbigniew Jędrzejewski-Szmek [Sat, 15 Sep 2018 16:33:18 +0000 (18:33 +0200)]
Merge pull request #9958 from yuwata/sd-device-enum-set

sd-device: make sd_device_enumerator_get_*_next() not destroy the list

6 years agoMerge pull request #10070 from keszybz/test-reporting
Yu Watanabe [Sat, 15 Sep 2018 06:55:15 +0000 (15:55 +0900)]
Merge pull request #10070 from keszybz/test-reporting

Test reporting improvements

6 years agoMerge pull request #10089 from yuwata/fix-oss-fuzz-10350
Evgeny Vereshchagin [Sat, 15 Sep 2018 02:36:44 +0000 (05:36 +0300)]
Merge pull request #10089 from yuwata/fix-oss-fuzz-10350

bus-util: use _printf_ attribute

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=10350.

6 years agotest-catalog: drop unused variable
Yu Watanabe [Fri, 14 Sep 2018 16:58:50 +0000 (01:58 +0900)]
test-catalog: drop unused variable

Follow-up for 49cdae63d168b2fe0e19f9f090b90d79de3c39bb.

6 years agobus-util: use _printf_ attribute
Yu Watanabe [Fri, 14 Sep 2018 16:49:29 +0000 (01:49 +0900)]
bus-util: use _printf_ attribute

Follow-up for eda193578effbc3cee0f6d56ade52434778737c9.

Fixes oss-fuzz#10350.

6 years agosocket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails
Franck Bui [Fri, 14 Sep 2018 07:24:08 +0000 (09:24 +0200)]
socket-util: attempt SO_RCVBUFFORCE/SO_SNDBUFFORCE only if SO_RCVBUF/SO_SNDBUF fails

Both SO_SNDBUFFORCE and SO_RCVBUFFORCE requires capability 'net_admin'.

If this capability is not granted to the service the first attempt to increase
the recv/snd buffers (via sd_notify()) with SO_RCVBUFFORCE/SO_SNDBUFFORCE will
fail, even if the requested size is lower than the limit enforced by the
kernel.

If apparmor is used, the DENIED logs for net_admin will show up. These log
entries are seen as red warning light, because they could indicate that a
program has been hacked and tries to compromise the system.

It would be nicer if they can be avoided without giving services (relying on
sd_notify) net_admin capability or dropping DENIED logs for all such services
via their apparmor profile.

I'm not sure if sd_notify really needs to forcibly increase the buffer sizes,
but at least if the requested size is below the kernel limit, the capability
(hence the log entries) should be avoided.

Hence let's first ask politely for increasing the buffers and only if it fails
then ignore the kernel limit if we have sufficient privileges.

6 years agoMerge pull request #9920 from yuwata/udev-cleanup-4
Zbigniew Jędrzejewski-Szmek [Fri, 14 Sep 2018 08:05:59 +0000 (10:05 +0200)]
Merge pull request #9920 from yuwata/udev-cleanup-4

udev: drop unused udev structs and use verbs in udevadm

6 years agotests: add a helper function to skip with errno
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 14:11:16 +0000 (16:11 +0200)]
tests: add a helper function to skip with errno

6 years agotests: use a helper function to parse environment and open logging
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 12:31:13 +0000 (14:31 +0200)]
tests: use a helper function to parse environment and open logging

The advantages are that we save a few lines, and that we can override
logging using environment variables in more test executables.

6 years agotest-condition: make function return void
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 11:35:03 +0000 (13:35 +0200)]
test-condition: make function return void

We don't look at the result anyway.

6 years agotests: add helper to unify skipping a test and exiting
Zbigniew Jędrzejewski-Szmek [Thu, 13 Sep 2018 11:34:12 +0000 (13:34 +0200)]
tests: add helper to unify skipping a test and exiting

6 years agoman: fix typo (#10084)
Harshit Jain [Fri, 14 Sep 2018 07:04:10 +0000 (12:34 +0530)]
man: fix typo (#10084)

fixes #10083

6 years agouser-runtime-dir@.service: don't stop on runlevel switch (#10079)
Alan Jenkins [Fri, 14 Sep 2018 03:11:57 +0000 (04:11 +0100)]
user-runtime-dir@.service: don't stop on runlevel switch (#10079)

Followup to commit 13cf422e04b7 ("user@.service: don't kill user manager at runlevel switch")

I think there's a general rule that units with `StopWhenUnneeded=yes` need
`IgnoreOnIsolate=yes`...  But it doesn't apply to `suspend.target` and friends.
`printer.target` and friends break on isolate even if we apply the rule[1].
That just leaves `graphical-session.target`, which is a user service.
"isolate" is *mostly* a weird attempt to emulate runlevels, so I decided
not to worry about it for user services.

[1] https://github.com/systemd/systemd/issues/6505#issuecomment-320644819

6 years agoreplace https://github.com/systemd/systemd/blob/master/doc/* with https://github...
killermoehre [Thu, 13 Sep 2018 11:53:03 +0000 (13:53 +0200)]
replace https://github.com/systemd/systemd/blob/master/doc/* with https://github.com/systemd/systemd/blob/master/docs/* to point to proper documentation

6 years agouser@.service: don't kill user manager at runlevel switch
Thomas Blume [Wed, 12 Sep 2018 13:10:58 +0000 (15:10 +0200)]
user@.service: don't kill user manager at runlevel switch

Loggin in as root user and then switching the runlevel results in a
stop of the user manager, even though the user ist still logged in.
That leaves a broken user session.

Adding "IgnoreOnIsolate=true" to user@.service fixes this.

6 years agotest: unset $XDG_{CONFIG,DATA}_DIRS
Yu Watanabe [Thu, 13 Sep 2018 07:37:33 +0000 (16:37 +0900)]
test: unset $XDG_{CONFIG,DATA}_DIRS

When $XDG_DATA_DIRS is unset, then, the default value
'/usr/local/share:/usr/share' is used.
When $XDG_DATA_DIRS contain the default paths but the order
is inverted: '/usr/share:/usr/local/share', then test-path-lookup fails.

Fixes #10002.

6 years agomeson: drop some unneeded parens
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:57:06 +0000 (16:57 +0200)]
meson: drop some unneeded parens

6 years agomeson: always allow compilation of tests binaries
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:52:08 +0000 (16:52 +0200)]
meson: always allow compilation of tests binaries

6 years agoNEWS: remove repeated "slightly"
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 14:11:15 +0000 (16:11 +0200)]
NEWS: remove repeated "slightly"

6 years agomeson: do not build tests by default when '-Dtests=false'
Yu Watanabe [Wed, 12 Sep 2018 12:47:56 +0000 (21:47 +0900)]
meson: do not build tests by default when '-Dtests=false'

[zj: it is still possible to build tests explicitly by calling
     ninja -C build test-name. This way we have full flexibility.]

6 years agotest: log when skipping tests in more cases
Yu Watanabe [Wed, 12 Sep 2018 12:52:31 +0000 (21:52 +0900)]
test: log when skipping tests in more cases

Follow-up for the previous commit.

6 years agotest: when skipping tests, always print something
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 11:25:45 +0000 (13:25 +0200)]
test: when skipping tests, always print something

It is quite confusing if the test "fails" without printing anything at all.

A typo in an 'if' statement is also fixed.

6 years agomeson: disable _all_ tests when -Dtests=false
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:08:49 +0000 (11:08 +0200)]
meson: disable _all_ tests when -Dtests=false

Back in 08318a2c5acb3d0e4243c36461e69a3e45482441, value "false" was enabled for
'-Dtests=', but various tests were not conditionalized properly. So even with
-Dtests=false -Dslow-tests=false we'd run 120 tests. Let's make this consistent.

6 years agomeson: disable "slow tests" too when tests are generally disabled
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:02:58 +0000 (11:02 +0200)]
meson: disable "slow tests" too when tests are generally disabled

We would have a strange situation where after setting -Dslow-tests=true -Dtests=false
we'd get mostly the slow tests (plus some other ones which I'll fix in
subsequent commit). Let's simplify things by making -Dtests=false just
disable those tests too.

6 years agotest-barrier: just make this a slow test
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 07:55:39 +0000 (09:55 +0200)]
test-barrier: just make this a slow test

test-barrier was using a custom mechanism to skip itself. Let's
just follow the normal scheme.

6 years agotests: centralize check for slow tests
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 07:45:17 +0000 (09:45 +0200)]
tests: centralize check for slow tests

6 years agoupdate TODO
Lennart Poettering [Wed, 12 Sep 2018 19:39:14 +0000 (21:39 +0200)]
update TODO

6 years agonspawn: use copy-static if systemd-resolved is up and image is writable
afg [Wed, 29 Aug 2018 01:20:27 +0000 (09:20 +0800)]
nspawn: use copy-static if systemd-resolved is up and image is writable

6 years agoMerge pull request #10061 from xnox/fix-logindless-scheduled-shutdown
Lennart Poettering [Wed, 12 Sep 2018 18:45:31 +0000 (20:45 +0200)]
Merge pull request #10061 from xnox/fix-logindless-scheduled-shutdown

Fix logindless scheduled shutdown

6 years agoMerge pull request #10060 from yuwata/property-take-value
Lennart Poettering [Wed, 12 Sep 2018 18:17:53 +0000 (20:17 +0200)]
Merge pull request #10060 from yuwata/property-take-value

bus-util: make --property= optionaly take value

6 years agotest: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR
Filipe Brandenburger [Wed, 12 Sep 2018 07:23:40 +0000 (00:23 -0700)]
test: use ${builddir}/systemd-runtest.env for $SYSTEMD_CATALOG_DIR

This makes it so that tests no longer need to know the absolute paths to the
source and build dirs, instead using the systemd-runtest.env file to get these
paths when running from the build tree.

Confirmed that test-catalog works on `ninja test`, when called standalone and
also when the environment file is not present, in which case it will use the
installed location under /usr/lib/systemd/catalog.

The location can now also be overridden for this test by setting the
$SYSTEMD_CATALOG_DIR environment variable.

6 years agotest: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA
Filipe Brandenburger [Wed, 12 Sep 2018 06:55:02 +0000 (23:55 -0700)]
test: use ${builddir}/systemd-runtest.env to set $SYSTEMD_TEST_DATA

This simplifies get_testdata_dir() to simply checking for an environment
variable, with an additional function to locate a systemd-runtest.env file in
the same directory as the test binary and reading environment variable
assignments from that file if it exists.

This makes it possible to:
- Run `ninja test` from the build dir and have it use ${srcdir}/test for
  test unit definitions.
- Run a test directly, such as `build/test-execute` and have it locate
  them correctly.
- Run installed tests (from systemd-tests package) and locate the test
  units in the installed location (/usr/lib/systemd/tests/testdata), in
  which case the absence of the systemd-runtest.env file will have
  get_testdata_dir() use the installed location hardcoded into the
  binaries.

Explicit setting of $SYSTEMD_TEST_DATA still overrides the contents of
systemd-runtest.env.

6 years agotest: remove support for suffix in get_testdata_dir()
Filipe Brandenburger [Wed, 12 Sep 2018 06:15:09 +0000 (23:15 -0700)]
test: remove support for suffix in get_testdata_dir()

Instead, use path_join() in callers wherever needed.

6 years agoSet theme jekyll-theme-slate
Zbigniew Jędrzejewski-Szmek [Wed, 12 Sep 2018 09:51:27 +0000 (11:51 +0200)]
Set theme jekyll-theme-slate

6 years agobash-completion: systemctl: re-implement __filter_units_by_properties()
Yu Watanabe [Wed, 12 Sep 2018 03:36:22 +0000 (12:36 +0900)]
bash-completion: systemctl: re-implement __filter_units_by_properties()

This also unifies __filter_units_by_property() and
__filter_units_by_properties(), and makes completion for 'restart',
'reload' or 'stop' show more candidates.

6 years agobus-util: make --property= optionally take value
Yu Watanabe [Tue, 11 Sep 2018 08:18:14 +0000 (17:18 +0900)]
bus-util: make --property= optionally take value

6 years agoMerge pull request #10046 from yuwata/fix-10045
Michael Biebl [Tue, 11 Sep 2018 21:30:16 +0000 (23:30 +0200)]
Merge pull request #10046 from yuwata/fix-10045

test: use installed catalogs when test-catalog is not located at build dir

6 years agosystemctl: correctly proceed to immediate shutdown if scheduling fails
Dimitri John Ledkov [Tue, 11 Sep 2018 09:41:56 +0000 (10:41 +0100)]
systemctl: correctly proceed to immediate shutdown if scheduling fails

Actually check the return code from logind_schedule_shutdown() and proceed to
immediate shutdown if that fails. Negative return codes can be returned if
systemctl is compiled without logind support, or if logind otherwise failed
(either too old, disabled/masked, or it is incomplete
systemd-shim/systemd-service implementation).

6 years agosd-device,libudev: make an argument for *_set_sysattr_value() const
Yu Watanabe [Tue, 11 Sep 2018 03:42:18 +0000 (12:42 +0900)]
sd-device,libudev: make an argument for *_set_sysattr_value() const

6 years agolibudev-monitor: use assert_return() in many places
Yu Watanabe [Fri, 24 Aug 2018 08:12:04 +0000 (17:12 +0900)]
libudev-monitor: use assert_return() in many places

6 years agolibudev-monitor: add missing error checks in udev_monitor_enable_receiving()
Yu Watanabe [Fri, 24 Aug 2018 08:10:27 +0000 (17:10 +0900)]
libudev-monitor: add missing error checks in udev_monitor_enable_receiving()

6 years agolibudev-monitor: introduce udev_monitor_send_sd_device()
Yu Watanabe [Fri, 24 Aug 2018 08:05:22 +0000 (17:05 +0900)]
libudev-monitor: introduce udev_monitor_send_sd_device()

And use it in udev_monitor_send_device().

6 years agolibudev-monitor: re-implement udev_monitor_receive_sd_device()
Yu Watanabe [Fri, 24 Aug 2018 08:04:10 +0000 (17:04 +0900)]
libudev-monitor: re-implement udev_monitor_receive_sd_device()

6 years agolibudev-monitor: use Hashmap or Set to store filters
Yu Watanabe [Fri, 24 Aug 2018 08:00:40 +0000 (17:00 +0900)]
libudev-monitor: use Hashmap or Set to store filters

6 years agolibudev-monitor: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 07:51:58 +0000 (16:51 +0900)]
libudev-monitor: use structured initializer

6 years agolibudev-monitor: rename monitor_set_nl_address() and make it return negative errno
Yu Watanabe [Fri, 24 Aug 2018 07:47:30 +0000 (16:47 +0900)]
libudev-monitor: rename monitor_set_nl_address() and make it return negative errno

6 years agolibudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c
Yu Watanabe [Mon, 13 Aug 2018 08:59:44 +0000 (17:59 +0900)]
libudev-monitor: rename udev_has_devtmpfs() and move it to mount-util.c

As the function itself is quite generic.

6 years agolibudev-monitor: use structured initializer in bpf_*()
Yu Watanabe [Fri, 24 Aug 2018 07:43:01 +0000 (16:43 +0900)]
libudev-monitor: use structured initializer in bpf_*()

This also drop inline attribute from the functions.

6 years agolibudev-monitor: use 'unsigned' instead of 'unsigned int'
Yu Watanabe [Fri, 24 Aug 2018 07:40:47 +0000 (16:40 +0900)]
libudev-monitor: use 'unsigned' instead of 'unsigned int'

6 years agolibudev-device: create sd_device at first in udev_device_new_from_*()
Yu Watanabe [Fri, 24 Aug 2018 07:11:13 +0000 (16:11 +0900)]
libudev-device: create sd_device at first in udev_device_new_from_*()

6 years agolibudev-device: drop prototypes of unexistent functions
Yu Watanabe [Fri, 24 Aug 2018 05:44:01 +0000 (14:44 +0900)]
libudev-device: drop prototypes of unexistent functions

6 years agolibudev: drop a prototype of unexistent function
Yu Watanabe [Fri, 24 Aug 2018 05:43:43 +0000 (14:43 +0900)]
libudev: drop a prototype of unexistent function

6 years agolibudev-device: coding style fixes
Yu Watanabe [Fri, 24 Aug 2018 05:32:05 +0000 (14:32 +0900)]
libudev-device: coding style fixes

6 years agolibudev-device: fix return value of udev_device_has_tag()
Yu Watanabe [Fri, 24 Aug 2018 05:31:41 +0000 (14:31 +0900)]
libudev-device: fix return value of udev_device_has_tag()

6 years agolibudev-device: use original negative errno
Yu Watanabe [Fri, 24 Aug 2018 05:30:24 +0000 (14:30 +0900)]
libudev-device: use original negative errno

6 years agolibudev-device: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 05:16:43 +0000 (14:16 +0900)]
libudev-device: use structured initializer

6 years agolibudev-enumerate: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 05:09:17 +0000 (14:09 +0900)]
libudev-enumerate: use structured initializer

6 years agolibudev-hwdb: use assert_return_errno()
Yu Watanabe [Fri, 24 Aug 2018 04:57:58 +0000 (13:57 +0900)]
libudev-hwdb: use assert_return_errno()

6 years agolibudev-hwdb: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 04:57:04 +0000 (13:57 +0900)]
libudev-hwdb: use structured initializer

6 years agolibudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct
Yu Watanabe [Fri, 24 Aug 2018 04:55:25 +0000 (13:55 +0900)]
libudev-hwdb: drop unused 'struct udev *udev' in udev_hwdb struct

6 years agolibudev-queue: coding style fixes
Yu Watanabe [Fri, 24 Aug 2018 04:43:59 +0000 (13:43 +0900)]
libudev-queue: coding style fixes

6 years agolibudev-queue: drop prototypes of nonexistent functions
Yu Watanabe [Fri, 24 Aug 2018 04:43:38 +0000 (13:43 +0900)]
libudev-queue: drop prototypes of nonexistent functions

6 years agolibudev-queue: use _cleanup_ attribute and TAKE_FD()
Yu Watanabe [Fri, 24 Aug 2018 04:42:18 +0000 (13:42 +0900)]
libudev-queue: use _cleanup_ attribute and TAKE_FD()

6 years agolibudev-queue: use assert_return()
Yu Watanabe [Fri, 24 Aug 2018 04:41:22 +0000 (13:41 +0900)]
libudev-queue: use assert_return()

6 years agolibudev-queue: use structured initializer
Yu Watanabe [Fri, 24 Aug 2018 04:39:46 +0000 (13:39 +0900)]
libudev-queue: use structured initializer

6 years agolibudev: modernize code a bit
Yu Watanabe [Tue, 28 Aug 2018 04:15:03 +0000 (13:15 +0900)]
libudev: modernize code a bit

6 years agolibudev: use structured initializer
Yu Watanabe [Tue, 28 Aug 2018 04:14:42 +0000 (13:14 +0900)]
libudev: use structured initializer

6 years agolibudev: drop unused element in udev struct
Yu Watanabe [Tue, 28 Aug 2018 04:14:02 +0000 (13:14 +0900)]
libudev: drop unused element in udev struct

6 years agolibudev: drop outdated comments
Yu Watanabe [Tue, 28 Aug 2018 04:13:39 +0000 (13:13 +0900)]
libudev: drop outdated comments

6 years agolibudev: use DEFINE_PUBLIC_TRIVIAL_REF_UNREF_FUNC() macro where applicable
Yu Watanabe [Tue, 28 Aug 2018 04:07:48 +0000 (13:07 +0900)]
libudev: use DEFINE_PUBLIC_TRIVIAL_REF_UNREF_FUNC() macro where applicable

6 years agolibudev-monitor: use safe_close() in udev_monitor_disconnect()
Yu Watanabe [Tue, 28 Aug 2018 04:06:02 +0000 (13:06 +0900)]
libudev-monitor: use safe_close() in udev_monitor_disconnect()

6 years agodhcp: fix assertion starting DHCP client without MAC address (#10054)
Thomas Haller [Tue, 11 Sep 2018 00:45:48 +0000 (02:45 +0200)]
dhcp: fix assertion starting DHCP client without MAC address (#10054)

An assertion in dhcp_network_bind_raw_socket() is triggered when
starting an sd_dhcp_client without setting a MAC address first.

  - sd_dhcp_client_start()
    - client_start()
      - client_start_delayed()
        - dhcp_network_bind_raw_socket()

In that case, the arp-type and MAC address is still unset. Note that
dhcp_network_bind_raw_socket() already checks for a valid arp-type
and MAC address below, so we should just gracefully return -EINVAL.

Maybe sd_dhcp_client_start() should fail earlier when starting without
MAC address. But the failure here will be correctly propagated and
the start aborted.

Fixes: 76253e73f9c9c24fec755e485516f3b55d0707b4

6 years agotest: make test-catalog relocatable
Yu Watanabe [Tue, 11 Sep 2018 00:18:33 +0000 (09:18 +0900)]
test: make test-catalog relocatable

Fixes #10045.

6 years agotest: introduce test_is_running_from_builddir()
Yu Watanabe [Tue, 11 Sep 2018 00:17:22 +0000 (09:17 +0900)]
test: introduce test_is_running_from_builddir()

6 years agohwdb: Update PNP IDs of Goldstar (now: LG Electronics). (#10051)
Dariusz Gadomski [Mon, 10 Sep 2018 22:35:30 +0000 (00:35 +0200)]
hwdb: Update PNP IDs of Goldstar (now: LG Electronics). (#10051)

hwdb: Update PNP IDs of Goldstar (now: LG Electronics)

6 years agonspawn: always use mode 555 for /sys
Franck Bui [Mon, 10 Sep 2018 12:17:32 +0000 (14:17 +0200)]
nspawn: always use mode 555 for /sys

When a network namespace is needed, /sys is mounted as tmpfs (see commit
d8fc6a000fe21b0c1ba27f for details).

But in this case mode 755 was used as initial permissions for /sys whereas the
default mode for sysfs is 555.

In practice using 755 doesn't have any impact because /sys is mounted read-only
too but for consistency, let's use the correct mode.

Fixes: #10050

6 years agoRevert "systemctl: if no logind, don't try to schedule shutdown"
Dimitri John Ledkov [Mon, 10 Sep 2018 18:54:12 +0000 (19:54 +0100)]
Revert "systemctl: if no logind, don't try to schedule shutdown"

This reverts commit c68867da320de296917820e5a76e902a8a86be5a.

6 years agoRevert "systemctl: fix compilation w/o logind"
Dimitri John Ledkov [Mon, 10 Sep 2018 18:53:59 +0000 (19:53 +0100)]
Revert "systemctl: fix compilation w/o logind"

This reverts commit 807690fb7f7e4998e2bb67f32026ab9f1c7b8077.

6 years agopam_systemd: support use in PID namespaces
Jürg Billeter [Sat, 18 Aug 2018 07:29:43 +0000 (09:29 +0200)]
pam_systemd: support use in PID namespaces

Pass 0 as leader PID to CreateSession to let logind use the PID from the
D-Bus credentials. This allows use of pam_systemd in PID namespaces.

6 years agoudevadm-util: drop unused function print_version()
Yu Watanabe [Wed, 22 Aug 2018 14:56:34 +0000 (23:56 +0900)]
udevadm-util: drop unused function print_version()

6 years agoudevadm-info: make info_main() returns negative value on error
Yu Watanabe [Wed, 22 Aug 2018 14:52:52 +0000 (23:52 +0900)]
udevadm-info: make info_main() returns negative value on error

Also, this replaces fprintf(stderr, ...) by log_error().

6 years agoudevadm-trigger: make trigger_main() returns negative value on error
Yu Watanabe [Wed, 22 Aug 2018 14:41:55 +0000 (23:41 +0900)]
udevadm-trigger: make trigger_main() returns negative value on error

6 years agoudevadm-test: modernize code
Yu Watanabe [Tue, 21 Aug 2018 07:24:23 +0000 (16:24 +0900)]
udevadm-test: modernize code

6 years agoudevadm-test-builtin: modernize code
Yu Watanabe [Tue, 21 Aug 2018 07:08:54 +0000 (16:08 +0900)]
udevadm-test-builtin: modernize code

6 years agoudevadm-settle: modernize code
Yu Watanabe [Wed, 22 Aug 2018 12:59:29 +0000 (21:59 +0900)]
udevadm-settle: modernize code

6 years agoudevadm-monitor: modernize code
Yu Watanabe [Fri, 24 Aug 2018 12:55:47 +0000 (21:55 +0900)]
udevadm-monitor: modernize code

6 years agoudevadm-control: modernize code a bit
Yu Watanabe [Fri, 24 Aug 2018 12:55:19 +0000 (21:55 +0900)]
udevadm-control: modernize code a bit

6 years agoudevadm-hwdb: modernize code a bit
Yu Watanabe [Tue, 21 Aug 2018 02:28:26 +0000 (11:28 +0900)]
udevadm-hwdb: modernize code a bit

6 years agostrbuf: accept NULL for strbuf_cleanup()
Yu Watanabe [Wed, 22 Aug 2018 12:50:50 +0000 (21:50 +0900)]
strbuf: accept NULL for strbuf_cleanup()

6 years agoudevadm: use dispatch_verb() and drop udevadm_cmd struct
Yu Watanabe [Tue, 21 Aug 2018 02:17:01 +0000 (11:17 +0900)]
udevadm: use dispatch_verb() and drop udevadm_cmd struct

6 years agoudevd: drop unused refcount
Yu Watanabe [Tue, 28 Aug 2018 05:02:37 +0000 (14:02 +0900)]
udevd: drop unused refcount

6 years agoudev-ctrl: use DEFINE_TRIVIAL_REF_FUNC() macro or friends
Yu Watanabe [Tue, 28 Aug 2018 05:01:35 +0000 (14:01 +0900)]
udev-ctrl: use DEFINE_TRIVIAL_REF_FUNC() macro or friends

6 years agoudev: drop unused udev struct
Yu Watanabe [Wed, 22 Aug 2018 10:57:32 +0000 (19:57 +0900)]
udev: drop unused udev struct

6 years agoudev: drop unused udev_watch struct
Yu Watanabe [Wed, 22 Aug 2018 10:57:07 +0000 (19:57 +0900)]
udev: drop unused udev_watch struct

6 years agolibudev-util: adjust type of returned value by util_string_hash32()
Yu Watanabe [Wed, 22 Aug 2018 10:51:32 +0000 (19:51 +0900)]
libudev-util: adjust type of returned value by util_string_hash32()

6 years agolibudev-util: drop unnecessary argument 'struct udev *udev' from util_resolve_subsys_...
Yu Watanabe [Wed, 22 Aug 2018 10:46:37 +0000 (19:46 +0900)]
libudev-util: drop unnecessary argument 'struct udev *udev' from util_resolve_subsys_kernel()

6 years agoudev/net: replace udev_device by sd_device
Yu Watanabe [Wed, 22 Aug 2018 08:10:38 +0000 (17:10 +0900)]
udev/net: replace udev_device by sd_device