]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
3 years agoheaders: add spdx tags to imported files with a known license
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:32:27 +0000 (18:32 +0100)] 
headers: add spdx tags to imported files with a known license

I added the header in the cases where the license text is present and it is
easy to find the appropriate SPDX header.

For "public domain" stuff: SDPX treats each "public domain" license as unique [1],
but luckily the one in siphash24.c is one of the identified variants. There are
some other cases which specify "public domain" but there doesn't seem to be a
SPDX identifier.

[1] https://wiki.spdx.org/view/Legal_Team/Decisions/Dealing_with_Public_Domain_within_SPDX_Files

gunicode.[ch] are imported from glib, which is licensed as LGPL2.1+,
see https://gitlab.gnome.org/GNOME/glib/-/blob/master/glib/gunicode.h.

3 years agotime-wait-sync: drop gpl snail mail boilerplate
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:18:57 +0000 (18:18 +0100)] 
time-wait-sync: drop gpl snail mail boilerplate

No idea why this chunk was left when we removed the other copies.

3 years agotree-wide: use the usual SPDX header for our own files
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 17:18:20 +0000 (18:18 +0100)] 
tree-wide: use the usual SPDX header for our own files

3 years agoNEWS: v247-rc1 v247-rc1
Zbigniew Jędrzejewski-Szmek [Mon, 26 Oct 2020 19:43:18 +0000 (20:43 +0100)] 
NEWS: v247-rc1

3 years agoNEWS: update contributors list for v247-rc1
Zbigniew Jędrzejewski-Szmek [Mon, 26 Oct 2020 19:41:36 +0000 (20:41 +0100)] 
NEWS: update contributors list for v247-rc1

3 years agoNEWS: mention IPv6PrefixDelegation→IPv6SendRA renaming
Zbigniew Jędrzejewski-Szmek [Mon, 26 Oct 2020 19:27:41 +0000 (20:27 +0100)] 
NEWS: mention IPv6PrefixDelegation→IPv6SendRA renaming

3 years agotmpfiles: Handle filesystems without ACL support in more cases.
Pat Coulthard [Sun, 25 Oct 2020 21:45:13 +0000 (16:45 -0500)] 
tmpfiles: Handle filesystems without ACL support in more cases.

3 years agoNEWS: fix typo (`systemd-userdb` > `systemd-userdbd`)
Elias Probst [Sat, 24 Oct 2020 13:42:27 +0000 (15:42 +0200)] 
NEWS: fix typo (`systemd-userdb` > `systemd-userdbd`)

3 years agotest-network: add a test case for DNSSL in RA
Yu Watanabe [Sat, 24 Oct 2020 03:46:27 +0000 (12:46 +0900)] 
test-network: add a test case for DNSSL in RA

Closes #4590.

3 years agoMerge pull request #17430 from yuwata/network-drop-foreign-routes-managed-by-manager
Zbigniew Jędrzejewski-Szmek [Sat, 24 Oct 2020 11:44:10 +0000 (13:44 +0200)] 
Merge pull request #17430 from yuwata/network-drop-foreign-routes-managed-by-manager

network: drop routes managed by Manager when they are not requested

3 years agotest: ignore ENOMEDIUM error from sd_pid_get_cgroup()
Dan Streetman [Fri, 23 Oct 2020 19:50:28 +0000 (15:50 -0400)] 
test: ignore ENOMEDIUM error from sd_pid_get_cgroup()

Ubuntu builds on the Launchpad infrastructure run inside a chroot that does
not have the sysfs cgroup dirs mounted, so this call will return ENOMEDIUM
from cg_unified_cached() during the build-time testing, for example when
building the package in a Launchpad PPA.

3 years agotree-wide: fix typos found by Fossies codespell report
Yu Watanabe [Sat, 24 Oct 2020 03:07:19 +0000 (12:07 +0900)] 
tree-wide: fix typos found by Fossies codespell report

3 years agoRevert "sd-dhcp-client: use asynchronous_close()"
Yu Watanabe [Tue, 13 Oct 2020 12:11:36 +0000 (21:11 +0900)] 
Revert "sd-dhcp-client: use asynchronous_close()"

This effectively reverts the commit 22fc2420b2a7220addcee33c2fa17ada44d87f9c.

The function `asynchronous_close()` confuses valgrind. Before this commit,
valgrind may report the following:

```
HEAP SUMMARY:
    in use at exit: 384 bytes in 1 blocks
  total heap usage: 4,787 allocs, 4,786 frees, 1,379,191 bytes allocated

384 bytes in 1 blocks are possibly lost in loss record 1 of 1
   at 0x483CAE9: calloc (vg_replace_malloc.c:760)
   by 0x401456A: _dl_allocate_tls (in /usr/lib64/ld-2.31.so)
   by 0x4BD212E: pthread_create@@GLIBC_2.2.5 (in /usr/lib64/libpthread-2.31.so)
   by 0x499B662: asynchronous_job (async.c:47)
   by 0x499B7DC: asynchronous_close (async.c:102)
   by 0x4CFA8B: client_initialize (sd-dhcp-client.c:696)
   by 0x4CFC5E: client_stop (sd-dhcp-client.c:725)
   by 0x4D4589: sd_dhcp_client_stop (sd-dhcp-client.c:2134)
   by 0x493C2F: link_stop_clients (networkd-link.c:620)
   by 0x4126DB: manager_free (networkd-manager.c:867)
   by 0x40D193: manager_freep (networkd-manager.h:97)
   by 0x40DAFC: run (networkd.c:20)

LEAK SUMMARY:
   definitely lost: 0 bytes in 0 blocks
   indirectly lost: 0 bytes in 0 blocks
     possibly lost: 384 bytes in 1 blocks
   still reachable: 0 bytes in 0 blocks
        suppressed: 0 bytes in 0 blocks

For lists of detected and suppressed errors, rerun with: -s
ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
```

3 years agoMerge pull request #17429 from keszybz/revert-17188
Yu Watanabe [Sat, 24 Oct 2020 03:16:44 +0000 (12:16 +0900)] 
Merge pull request #17429 from keszybz/revert-17188

Revert the change to allow arbitrary environment variable names

3 years agoMerge pull request #17427 from poettering/v247-bump
Lennart Poettering [Fri, 23 Oct 2020 15:50:04 +0000 (17:50 +0200)] 
Merge pull request #17427 from poettering/v247-bump

preparation for v247-rc1

3 years agotest-network: add tests for routes managed by Manager 17430/head
Yu Watanabe [Fri, 23 Oct 2020 14:06:13 +0000 (23:06 +0900)] 
test-network: add tests for routes managed by Manager

3 years agonetwork: drop routes managed by Manager when link is removed
Yu Watanabe [Fri, 23 Oct 2020 08:01:30 +0000 (17:01 +0900)] 
network: drop routes managed by Manager when link is removed

Also, foreign routes managed by Manager are dropped in
link_drop_foreign_routes().

3 years agonetwork: specify route type in route_remove()
Yu Watanabe [Fri, 23 Oct 2020 13:40:57 +0000 (22:40 +0900)] 
network: specify route type in route_remove()

This factors out the common netlink message handling in route_remote()
and route_configure() to route_set_netlink_message().

3 years agonetwork: link may be NULL
Yu Watanabe [Fri, 23 Oct 2020 13:19:16 +0000 (22:19 +0900)] 
network: link may be NULL

3 years agonetwork: ignore error in writing proxy_ndp
Yu Watanabe [Fri, 23 Oct 2020 08:32:19 +0000 (17:32 +0900)] 
network: ignore error in writing proxy_ndp

This partially reverts the commit fd773a11d8e2b01e9e6d234ca5693417c0101fca.

As, IPv6 may be disabled by kernel.

3 years agonetwork: fix typo
Yu Watanabe [Fri, 23 Oct 2020 08:29:49 +0000 (17:29 +0900)] 
network: fix typo

3 years agoman: document what variables are allowed 17429/head
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 13:47:33 +0000 (15:47 +0200)] 
man: document what variables are allowed

3 years agoupdate TODO
Lennart Poettering [Fri, 23 Oct 2020 13:45:17 +0000 (15:45 +0200)] 
update TODO

3 years agoRevert "basic/env-util: (mostly) follow POSIX for what variable names are allowed"
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 12:24:32 +0000 (14:24 +0200)] 
Revert "basic/env-util: (mostly) follow POSIX for what variable names are allowed"

This reverts commit b45c068dd8fac7661a15e99e7cf699ff06010b13.

I think the idea was generally sound, but didn't take into account the
limitations of show-environment and how it is used. People expect to be able to
eval systemctl show-environment output in bash, and no escaping syntax is
defined for environment *names* (we only do escaping for *values*). We could
skip such problematic variables in 'systemctl show-environment', and only allow
them to be inherited directly. But this would be confusing and ugly.

The original motivation for this change was that various import operations
would fail. a4ccce22d9552dc74b6916cc5ec57f2a0b686b4f changed systemctl to filter
invalid variables in import-environment.
https://gitlab.gnome.org/GNOME/gnome-session/-/issues/71 does a similar change
in GNOME. So those problematic variables should not cause failures, but just
be silently ignored.

Finally, the environment block is becoming a dumping ground. In my gnome
session 'systemctl show-environment --user' includes stuff like PWD, FPATH
(from zsh), SHLVL=0 (no idea what that is). This is not directly related to
variable names (since all those are allowed under the stricter rules too), but
I think we should start pushing people away from running import-environment and
towards importing only select variables.

https://github.com/systemd/systemd/pull/17188#issuecomment-708676511

3 years agobasic/env-util: make function shorter
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 11:49:05 +0000 (13:49 +0200)] 
basic/env-util: make function shorter

3 years agobuild-sys: prepare 247-rc1 17427/head
Lennart Poettering [Fri, 23 Oct 2020 11:39:24 +0000 (13:39 +0200)] 
build-sys: prepare 247-rc1

Interestingly, the libudev so version was already bumped.

3 years agoupdate hwdb
Lennart Poettering [Fri, 23 Oct 2020 11:44:16 +0000 (13:44 +0200)] 
update hwdb

3 years agoMerge pull request #16859 from poettering/loop-eagain
Lennart Poettering [Fri, 23 Oct 2020 11:15:04 +0000 (13:15 +0200)] 
Merge pull request #16859 from poettering/loop-eagain

loop: handle EAGAIN on LOOP_SET_STATUS64

3 years agoMerge pull request #17417 from anitazha/more_systoomd
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 11:06:51 +0000 (13:06 +0200)] 
Merge pull request #17417 from anitazha/more_systoomd

More systemd-oomd tweaks

3 years agoMerge pull request #17185 from yuwata/ethtool-update
Zbigniew Jędrzejewski-Szmek [Fri, 23 Oct 2020 06:22:09 +0000 (08:22 +0200)] 
Merge pull request #17185 from yuwata/ethtool-update

ethtool: add several link modes

3 years agoMerge pull request #17357 from yuwata/network-dhcp6-pd-announce-17353
Yu Watanabe [Fri, 23 Oct 2020 03:57:58 +0000 (12:57 +0900)] 
Merge pull request #17357 from yuwata/network-dhcp6-pd-announce-17353

network: add an option to control announcement of delegated prefix

3 years agonetwork: move set-MAC and set-nomaster operations out of link_up()
Dan Streetman [Wed, 17 Jun 2020 20:28:39 +0000 (16:28 -0400)] 
network: move set-MAC and set-nomaster operations out of link_up()

These should not be bundled into the link_up() operation, as that is
not (currently) called during interface configuration if the interface
already is IFF_UP, which is unrelated to the need to change the mac
to a user-defined value, or set 'nomaster' on the interface.

Additionally, there is no need to re-set the mac or re-assert nomaster
every time the interface is brought up; those should be only part of
normal initial interface configuration.

Fixes: #17391
3 years agooomd: make start up swap check more robust 17417/head
Anita Zhang [Thu, 22 Oct 2020 09:03:20 +0000 (02:03 -0700)] 
oomd: make start up swap check more robust

3 years agotest: add basic memory pressure extended test for oomd
Anita Zhang [Fri, 14 Aug 2020 08:20:43 +0000 (01:20 -0700)] 
test: add basic memory pressure extended test for oomd

Simple test to generate a lot of pressure in one unit and assert that
systemd-oomd kills the right one.

3 years agoMerge pull request #17418 from poettering/news-247-more
Lennart Poettering [Thu, 22 Oct 2020 16:20:47 +0000 (18:20 +0200)] 
Merge pull request #17418 from poettering/news-247-more

more v247 preps

3 years agotest: add heavy load loopback block device test 16859/head
Lennart Poettering [Fri, 25 Sep 2020 16:26:53 +0000 (18:26 +0200)] 
test: add heavy load loopback block device test

3 years agoloop-util: wait a random time before trying again
Lennart Poettering [Tue, 13 Oct 2020 12:37:39 +0000 (14:37 +0200)] 
loop-util: wait a random time before trying again

Let's try to make collisions when multiple clients want to use the same
device less likely, by sleeping a random time on collision.

The loop device allocation protocol is inherently collision prone:
first, a program asks which is the next free loop device, then it tries
to acquire it, in a separate, unsynchronized setp. If many peers do this
all at the same time, they'll likely all collide when trying to
acquire the device, so that they need to ask for a free device again and
again.

Let's make this a little less prone to collisions, reducing the number
of failing attempts: whenever we notice a collision we'll now wait
short and randomized time, making it more likely another peer succeeds.

(This also adds a similar logic when retrying LOOP_SET_STATUS64, but
with a slightly altered calculation, since there we definitely want to
wait a bit, under all cases)

3 years agodissect: retrigger devices if we missed uevents
Lennart Poettering [Wed, 14 Oct 2020 08:52:05 +0000 (10:52 +0200)] 
dissect: retrigger devices if we missed uevents

On systems that have a udev before
a7fdc6cbd399acdb1a975a7f72b9be4504a38c7c uevents would sometimes be
eaten because of device node collisions that caused the ruleset to fail.
Let's add an (ugly) work-around for this, so that we can even work with
such an older udev.

3 years agoudev-util: use absolute rather than relative timeout when waiting for devices
Lennart Poettering [Mon, 12 Oct 2020 16:18:33 +0000 (18:18 +0200)] 
udev-util: use absolute rather than relative timeout when waiting for devices

This makes it easier to accurately wait for a overall deadline.

3 years agoloop-util: if a loopback device we want to use still has partitions, do something...
Lennart Poettering [Fri, 25 Sep 2020 15:12:34 +0000 (17:12 +0200)] 
loop-util: if a loopback device we want to use still has partitions, do something about it

On current kernels (5.8 for example) under some conditions I don't fully
grok it might happen that a detached loopback block device still has
partition block devices around. Accessing these partition block devices
results in EIO errors (that also fill up dmesg). These devices cannot be
claned up with LOOP_CLR_FD (since the main device already is officially
detached), nor with LOOP_CTL_DELETE (returns EBUSY as long as the
partitions still exist). This is a kernel bug. But it appears to apply
to all recent kernels. I cannot really pin down what triggers this,
suffice to say our heavy-duty test can trigger it.

Either way, let's do something about it: when we notice this state we'll
attach an empty file to it, which is guaranteed to have to part table.
This makes the partitions go away. After closing/reoping the device we
hence are good to go again. ugly workaround, but I think OK enough to
use.

The net result is: with this commit, we'll guarantee that by the time we
attach a file to the loopback device we have zero kernel partitions
associated with it. Thus if we then wait for the kernel partitions we
need to appear we should have entirely reliable behaviour even if
loopback devices by the name are heavily recycled and udev events reach
us very late.

Fixes: #16858
3 years agodissect-image: rework how we wait for partitions
Lennart Poettering [Tue, 29 Sep 2020 18:56:50 +0000 (20:56 +0200)] 
dissect-image: rework how we wait for partitions

Previously, we'd just wait for the first moment where the kernel exposes
the same numbre of partitions as libblkid tells us. After that point we
enumerate kernel partitions and look for matching libblkid partitions.

With this change we'll instead enumerate with libblkid only, and then
wait for each kernel partition to show up with the exact parameters we
expect them to show up. Once that happens we are happy.

Care is taken to use the udev device notification messages only as hint
to recheck what the kernel actually says. That's because we are
otherwise subject to a race: we might see udev events from an earlier
use of a loopback device. After all these devices are heavily recycled.
Under the assumption that we'll get udev events for *at least* all
partitions we care about (but possibly more) we can fix the race
entirely with one more fix coming in a later commit: if we make sure
that a loopback block device has zero kernel partitions when we take
possession of it, it doesn't matter anymore if we get spurious udev
events from a previous use. All we have to do is notice when the devices
we need all popped up.

3 years agodissect-image: wait for udev device to be initialized early
Lennart Poettering [Fri, 25 Sep 2020 16:49:13 +0000 (18:49 +0200)] 
dissect-image: wait for udev device to be initialized early

If we allocate the sd_device early we can already use it as path when
looking at whole-device fs images.

3 years agoloop-util: LOOP_CLR_FD is async, don't retry to reuse a device right after issuing it
Lennart Poettering [Fri, 25 Sep 2020 13:22:48 +0000 (15:22 +0200)] 
loop-util: LOOP_CLR_FD is async, don't retry to reuse a device right after issuing it

When we fall back to classic LOOP_SET_FD logic in case LOOP_CONFIGURE
didn't work we issue LOOP_CLR_FD first. But that call turns out to be
potentially async in the kernel: if something else (let's say
udev/blkid) is accessing the device the ioctl just sets the autoclear
flag and exits. Hence quite often the LOOP_SET_FD will subsequently
fail. Let's avoid the trouble, and immediately exit with EBUSY if
LOOP_CONFIGURE fails, and but remember that LOOP_CONFIGURE is not
available so that on the next iteration we go directly for LOOP_SET_FD
instead.

3 years agoloop-util: handle EAGAIN on LOOP_SET_STATUS64
Lennart Poettering [Wed, 26 Aug 2020 20:42:26 +0000 (22:42 +0200)] 
loop-util: handle EAGAIN on LOOP_SET_STATUS64

Since
https://github.com/torvalds/linux/commit/5db470e229e22b7eda6e23b5566e532c96fb5bc3 (i.e. kernel 5.0)
changing the .lo_offset field via LOOP_SET_STATUS64 might result in
EAGAIN. Let's handle that.

Fixes: #16858
3 years agoMerge pull request #17324 from keszybz/resolvectl-compat-output
Lennart Poettering [Thu, 22 Oct 2020 12:57:41 +0000 (14:57 +0200)] 
Merge pull request #17324 from keszybz/resolvectl-compat-output

resolvectl compat output

3 years agotest-env-util: Verify that \r is disallowed in env var values
Hans Ulrich Niedermann [Wed, 21 Oct 2020 20:40:18 +0000 (22:40 +0200)] 
test-env-util: Verify that \r is disallowed in env var values

This adds tests to make sure that basic/env-util considers environment
variables containing \r characters invalid, and that it removes such
variables during environment cleanup in strv_env_clean*().

test-env-util has not verified this behaviour before.

As \r characters can be used to hide information, disallowing them
helps with systemd's security barrier role, even when the \r
character comes as part of a DOS style (\r\n) line ending.

Prompted-by: https://github.com/systemd/systemd/issues/17378
3 years agoMerge pull request #16632 from keszybz/test-path-yet-again
Lennart Poettering [Thu, 22 Oct 2020 12:56:46 +0000 (14:56 +0200)] 
Merge pull request #16632 from keszybz/test-path-yet-again

Tighten handling of spawned services in tests that may fail

3 years agoclock-util: trivial clean-ups 17418/head
Lennart Poettering [Thu, 22 Oct 2020 12:05:13 +0000 (14:05 +0200)] 
clock-util: trivial clean-ups

3 years agonet_id: fix newly added naming scheme name
Lennart Poettering [Thu, 22 Oct 2020 12:03:57 +0000 (14:03 +0200)] 
net_id: fix newly added naming scheme name

v246 is long released. Hence the new scheme should be named v247.

(Interesting, how we pretty systematically for the last releases changed
the scheme only every second release)

3 years agoupdate NEWS
Lennart Poettering [Thu, 22 Oct 2020 12:03:38 +0000 (14:03 +0200)] 
update NEWS

3 years agoMerge pull request #17415 from keszybz/logind-resolved-docs
Lennart Poettering [Thu, 22 Oct 2020 11:44:17 +0000 (13:44 +0200)] 
Merge pull request #17415 from keszybz/logind-resolved-docs

A bunch of updates to logind and resolved man pages

3 years agoresolvectl: wrap the extended status string too 17324/head
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 08:50:01 +0000 (10:50 +0200)] 
resolvectl: wrap the extended status string too

3 years agoresolvect: use wrapping for various lists
Zbigniew Jędrzejewski-Szmek [Mon, 12 Oct 2020 13:54:57 +0000 (15:54 +0200)] 
resolvect: use wrapping for various lists

dump_list() is used for DNS servers, DNS domains, fallback DNS servers.

3 years agoformat-table: add TABLE_STRV_WRAPPED
Zbigniew Jędrzejewski-Szmek [Mon, 12 Oct 2020 11:29:46 +0000 (13:29 +0200)] 
format-table: add TABLE_STRV_WRAPPED

The idea is that we have strvs like list of server names or addresses, where
the majority of strings is rather short, but some are long and there can
potentially be many strings. So formattting them either all on one line or all
in separate lines leads to output that is either hard to read or uses way too
many rows. We want to wrap them, but relying on the pager to do the wrapping is
not nice. Normal text has a lot of redundancy, so when the pager wraps a line
in the middle of a word the read can understand what is going on without any
trouble. But for a high-density zero-redundancy text like an IP address it is
much nicer to wrap between words. This also makes c&p easier.

This adds a variant of TABLE_STRV which is wrapped on output (with line breaks
inserted between different strv entries).

The change table_print() is quite ugly. A second pass is added to re-calculate
column widths. Since column size is now "soft", i.e. it can adjust based on
available columns, we need to two passes:
- first we figure out how much space we want
- in the second pass we figure out what the actual wrapped columns
  widths will be.

To avoid unnessary work, the second pass is only done when we actually have
wrappable fields.

A test is added in test-format-table.

3 years agotest-path: relax test in "ci" and "release" modes 16632/head
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 08:07:23 +0000 (10:07 +0200)] 
test-path: relax test in "ci" and "release" modes

3 years agotests: add helper function to autodetect CI environments
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 09:29:00 +0000 (11:29 +0200)] 
tests: add helper function to autodetect CI environments

Sadly there is no standarized way to check if we're running in some
CI environment. So let's try to gather the heuristics in one helper function.

3 years agoresolved: add trailing newlines in generated file 17415/head
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 20:59:19 +0000 (22:59 +0200)] 
resolved: add trailing newlines in generated file

Fixup for b3ffa2b5f3aa68dc6ab15893d5eeba8906aa3a9e.

3 years agoresolved.conf: add empty DNSStubListenerExtra=
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 20:42:40 +0000 (22:42 +0200)] 
resolved.conf: add empty DNSStubListenerExtra=

3 years agoman: document differences between nss-resolve and nss-dns
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 15:52:37 +0000 (17:52 +0200)] 
man: document differences between nss-resolve and nss-dns

https://bugzilla.redhat.com/show_bug.cgi?id=1889012
https://serverfault.com/questions/626612/dns-just-started-resolving-my-server-prod-addresses-to-127-0-53-53
https://serverfault.com/questions/649352/what-are-the-security-implications-of-the-allow-dns-suffix-appending-to-unquali

3 years agoman/org.freedesktop.resolve1: briefly document a bunch of methods and properties
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 11:53:59 +0000 (13:53 +0200)] 
man/org.freedesktop.resolve1: briefly document a bunch of methods and properties

Fixes #13799.

3 years agoman/systemd-resolved: reword the description of query a bit
Zbigniew Jędrzejewski-Szmek [Sun, 18 Oct 2020 14:51:14 +0000 (16:51 +0200)] 
man/systemd-resolved: reword the description of query a bit

The phrase "routing domains" is used to mean both route-only domains and search
domains. Route-only domains are always called like that, and not just "route domains".

Some paragraphs are reordered to describe synthetisized records first, then
LLMNR, then various ways quries are routed.

Fixes #8928, hopefully.

3 years agoMerge pull request #13589 from williamvds/systemctl-edit-copy
Lennart Poettering [Thu, 22 Oct 2020 09:19:26 +0000 (11:19 +0200)] 
Merge pull request #13589 from williamvds/systemctl-edit-copy

systemctl: show original contents in comment when editing unit

3 years agopstore: don't enable crash_kexec_post_notifiers by default
Kairui Song [Tue, 4 Aug 2020 09:30:51 +0000 (17:30 +0800)] 
pstore: don't enable crash_kexec_post_notifiers by default

commit f00c36641a253f4ea659ec3def5d87ba1336eb3b enabled
crash_kexec_post_notifiers by default regardless of whether pstore
is enabled or not.

The original intention to enabled this option by default is that
it only affects kernel post-panic behavior, so should have no harm.
But this is not true if the user wants a reliable kdump.

crash_kexec_post_notifiers is known to cause problem with kdump,
and it's documented in kernel. It's not easy to fix the problem
because of how kdump works. Kdump expects the crashed kernel to
jump to an pre-loaded crash kernel, so doing any extra job before
the jump will increase the risk.

It depends on the user to choose between having a reliable kdump or
some other post-panic debug mechanic.

So it's better to keep this config untouched by default, or it may put
kdump at higher risk of failing silently. User should enable it by
uncommenting the config line manually if pstore is always needed.

Also add a inline comment inform user about the potential issue.

Thanks to Dave Young for finding out this issue.

Fixes #16661

Signed-off-by: Kairui Song <kasong@redhat.com>
3 years agoMerge pull request #17412 from mrc0mmand/ghworkflow-buildtest-improvements
Lennart Poettering [Thu, 22 Oct 2020 09:16:12 +0000 (11:16 +0200)] 
Merge pull request #17412 from mrc0mmand/ghworkflow-buildtest-improvements

ci: GH 'build test' improvements

3 years agomeson: convert developer_mode boolean to an enum
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 08:04:23 +0000 (10:04 +0200)] 
meson: convert developer_mode boolean to an enum

I initially changed this to add a third state. But even with two values having
an explicit name instead of just 0/1 is mode descriptive.

3 years agotest-path: start infinite sleep instead of a short command
Zbigniew Jędrzejewski-Szmek [Sun, 27 Sep 2020 13:33:20 +0000 (15:33 +0200)] 
test-path: start infinite sleep instead of a short command

The test sometimes fails, e.g. in bionic-s390x ci. I think it might be because
the service binary exits before we get a chance to notice that it is running:
13:59:31 --- Listing only the last 100 lines from a long log. ---
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4639845)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4539608)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4439376)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4338946)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4238702)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4138424)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 4038116)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3937835)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3837553)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3737250)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3636934)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3536622)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3436318)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3336021)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3235730)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3135468)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 3035158)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2934855)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2834541)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2732511)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2632255)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2532014)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2431746)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2331438)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2231213)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2130952)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 2030663)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1930428)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1830172)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1729906)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1629652)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1529368)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1429110)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1328852)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1228593)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1128320)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 1028083)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 927824)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 827564)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 724935)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 624664)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 524411)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 424124)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 323853)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 223585)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 120356)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: 18053)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 line 293: path-unit.path: state = running; result = success (left: -82385)
13:59:31 line 293: path-mycustomunit.service: state = exited; result = success
13:59:31 Test timeout when testing path-unit.path

It seems test/test-path/path-service.service wasn't actually used for anything.

3 years agotests: replace the few remaining Type=simple with Type=exec
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 07:02:36 +0000 (09:02 +0200)] 
tests: replace the few remaining Type=simple with Type=exec

Except for the places where we explicitly want to test Type=simple,
we should use Type=exec.

3 years agoxdg-autostart-generator: use Type=exec
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 07:01:48 +0000 (09:01 +0200)] 
xdg-autostart-generator: use Type=exec

We check that the binary exists before writing the service file, but
let's also not consider the service started until the fork has happened.
This is still relatively new stuff, so we're can change the implementation
details like this.

3 years agotest-path: use Type=exec
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 06:58:54 +0000 (08:58 +0200)] 
test-path: use Type=exec

In general, Type=exec is superior to Type=simple. Let's not assume that
the service is started before it was really started.

3 years agotest-path: do not fail the test if we fail to start a service because of cgroup setup
Zbigniew Jędrzejewski-Szmek [Fri, 31 Jul 2020 08:36:57 +0000 (10:36 +0200)] 
test-path: do not fail the test if we fail to start a service because of cgroup setup

The test was failing because it couldn't start the service:

path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
path-modified.path: state = waiting; result = success
path-modified.service: state = failed; result = exit-code
Failed to connect to system bus: No such file or directory
-.slice: Failed to enable/disable controllers on cgroup /system.slice/kojid.service, ignoring: Permission denied
path-modified.service: Failed to create cgroup /system.slice/kojid.service/path-modified.service: Permission denied
path-modified.service: Failed to attach to cgroup /system.slice/kojid.service/path-modified.service: No such file or directory
path-modified.service: Failed at step CGROUP spawning /bin/true: No such file or directory
path-modified.service: Main process exited, code=exited, status=219/CGROUP
path-modified.service: Failed with result 'exit-code'.
Test timeout when testing path-modified.path

In fact any of the services that we try to start may fail, especially
considering that we're doing some rogue cgroup operations. See
https://github.com/systemd/systemd/pull/16603#issuecomment-679133641.

3 years agotest-path: more debugging information
Zbigniew Jędrzejewski-Szmek [Mon, 14 Sep 2020 06:56:28 +0000 (08:56 +0200)] 
test-path: more debugging information

Just to make it easier to grok what happens when test-path fails.
Change printf→log_info so that output is interleaved and not split in two
independent parts in log files.

3 years agooomd: use ERRNO_IS_NOT_SUPPORTED and ERRNO_IS_PRIVILEGE
Anita Zhang [Wed, 21 Oct 2020 08:52:53 +0000 (01:52 -0700)] 
oomd: use ERRNO_IS_NOT_SUPPORTED and ERRNO_IS_PRIVILEGE

3 years agomacro: introduce POINTER_MAX as define for (void*) -1
Lennart Poettering [Wed, 21 Oct 2020 12:31:54 +0000 (14:31 +0200)] 
macro: introduce POINTER_MAX as define for (void*) -1

Just add a safer, prettier way to write (void*) -1, that doesn't rely on
two's complement, but uses the correct underlying C constructs.

3 years agosystemctl: show original contents when editing unit 13589/head
williamvds [Wed, 21 Oct 2020 16:19:05 +0000 (17:19 +0100)] 
systemctl: show original contents when editing unit

A comment indicates the start of the new contents of the override file,
and another indicates that lines following it will be discarded once
editing is finished.
The contents of the unit file and drop-ins are listed out after this
last marker.

Adds WRITE_STRING_FILE_TRUNCATE to set O_TRUNC when opening a file.

Thanks to cgzones for providing the required SELinux function calls.

Co-authored-by: Christian Göttsche <cgzones@googlemail.com>
3 years agounits: add initrd-cryptsetup.target
Jonathan Lebon [Tue, 20 Oct 2020 20:30:20 +0000 (16:30 -0400)] 
units: add initrd-cryptsetup.target

For encrypted block devices that we need to unlock from the initramfs,
we currently rely on dracut shipping `cryptsetup.target`. This works,
but doesn't cover the case where the encrypted block device requires
networking (i.e. the `remote-cryptsetup.target` version). That target
however is traditionally dynamically enabled.

Instead, let's rework things here by adding a `initrd-cryptsetup.target`
specifically for initramfs encrypted block device setup. This plays the
role of both `cryptsetup.target` and `remote-cryptsetup.target` in the
initramfs.

Then, adapt `systemd-cryptsetup-generator` to hook all generated
services to this new unit when running from the initrd. This is
analogous to `systemd-fstab-generator` hooking all mounts to
`initrd-fs.target`, regardless of whether they're network-backed or not.

3 years agoAdd WRITE_STRING_FILE_TRUNCATE to set O_TRUNC
williamvds [Wed, 21 Oct 2020 16:18:25 +0000 (17:18 +0100)] 
Add WRITE_STRING_FILE_TRUNCATE to set O_TRUNC

3 years agoAdd strv_prepend
williamvds [Wed, 21 Oct 2020 16:14:37 +0000 (17:14 +0100)] 
Add strv_prepend

Inserts a copy of the value at the head of the list.

3 years agoMerge pull request #17356 from yuwata/sd-xxx-stop
Lennart Poettering [Wed, 21 Oct 2020 16:07:38 +0000 (18:07 +0200)] 
Merge pull request #17356 from yuwata/sd-xxx-stop

network: about sd_xxx_stop()

3 years agoMerge pull request #17400 from yuwata/network-route-counter-17396
Lennart Poettering [Wed, 21 Oct 2020 16:07:12 +0000 (18:07 +0200)] 
Merge pull request #17400 from yuwata/network-route-counter-17396

network: about route message counter

3 years agohomed: remove PAM_USER_UNKNOWN test in pam_sm_acct_mgmt
Chandradeep Dey [Sun, 18 Oct 2020 09:59:40 +0000 (15:29 +0530)] 
homed: remove PAM_USER_UNKNOWN test in pam_sm_acct_mgmt

Why this change
---------------
Assumption - PAM's auth stack is properly configured.

Currently account pam_systemd_home.so returns PAM_SUCCESS for non
systemd-homed users, and a variety of return values (including
PAM_SUCCESS) for homed users.

account pam_unix returns PAM_AUTHINFO_UNAVAIL for systemd-homed
users, and a variety of return values (including PAM_AUTHINFO_UNAVAIL)
for normal users.

No possible combination in the pam stack can let us preserve the
various return values of the modules. For example, the configuration
mentioned in the manpage causes account pam_unix to never be reached
since pam_systemd_home just returns a success for ordinary users. Users
with expired passwords are allowed to log in because a check cannot be
made.

More configuration examples and why they don't work are mentioned
in #16906 and the downstream discussion linked there.

After this change
-----------------
account pam_unix will continue to return wrong value for homed users.
But we can skip the module conditionally using the return value from
account pam_systemd_home. We can already do this with the auth and
password modules.

3 years agoci: add the libfido2 dependency for better coverage 17412/head
Frantisek Sumsal [Wed, 21 Oct 2020 14:28:22 +0000 (16:28 +0200)] 
ci: add the libfido2 dependency for better coverage

3 years agoci: build with clang-11 as well
Frantisek Sumsal [Wed, 21 Oct 2020 14:18:50 +0000 (16:18 +0200)] 
ci: build with clang-11 as well

The LLVM nightly repositories now have a separate branch for clang-11,
so let's build with it as well.

3 years agoci: bump the 'build test' image to Ubuntu Focal
Frantisek Sumsal [Wed, 21 Oct 2020 14:17:29 +0000 (16:17 +0200)] 
ci: bump the 'build test' image to Ubuntu Focal

3 years agocgtop: Display cpu time in microseonds with --raw
Arian van Putten [Wed, 14 Oct 2020 11:47:17 +0000 (13:47 +0200)] 
cgtop: Display cpu time in microseonds with --raw

this makes the CPU time easily parseable; which was the goal
of --raw in the first place.

This only triggers if --raw is combined with --cpu=time

3 years agoMerge pull request #17395 from keszybz/hwdb-drop-quotes
Zbigniew Jędrzejewski-Szmek [Wed, 21 Oct 2020 09:34:39 +0000 (11:34 +0200)] 
Merge pull request #17395 from keszybz/hwdb-drop-quotes

hwdb: drop quotes from XKB_FIXED_*= properties

3 years agoMerge pull request #16444 from oniko/luks-detached-header
Lennart Poettering [Wed, 21 Oct 2020 08:41:11 +0000 (10:41 +0200)] 
Merge pull request #16444 from oniko/luks-detached-header

Add support for detached LUKS header on kernel cmd line

3 years agotest-mountpoint-util: run test in private mount namespace
Lennart Poettering [Tue, 20 Oct 2020 12:51:01 +0000 (14:51 +0200)] 
test-mountpoint-util: run test in private mount namespace

This creates a private mount namespace for test-mountpint-util, with all
propagation from the host turned off. This gives us the guarantee that
/proc/self/mountinfo remains fixed and constant while we operate,
removing potential races against other unrelated stuff running on the
system that changes the mount table.

Prompted-by: #17050
(I doubt this actually fixes 17050, this is mostly to make sure that we
aren't possibly affected by such races in our test)

3 years agoMerge pull request #17407 from keszybz/test-ipcrm
Lennart Poettering [Wed, 21 Oct 2020 07:04:12 +0000 (09:04 +0200)] 
Merge pull request #17407 from keszybz/test-ipcrm

Make test-ipcrm not fail cryptically

3 years agodhcp-server: make parameter const
Lennart Poettering [Tue, 20 Oct 2020 12:47:44 +0000 (14:47 +0200)] 
dhcp-server: make parameter const

3 years agoMerge pull request #17297 from keszybz/tmpfiles-sysusers-disable-standalone-image
Michael Biebl [Tue, 20 Oct 2020 21:07:16 +0000 (23:07 +0200)] 
Merge pull request #17297 from keszybz/tmpfiles-sysusers-disable-standalone-image

tmpfiles,sysusers: disable --image= support in standalone versions

3 years agoformat-table: reduce scope of iterator variables
Zbigniew Jędrzejewski-Szmek [Sun, 11 Oct 2020 14:39:12 +0000 (16:39 +0200)] 
format-table: reduce scope of iterator variables

3 years agoresolvectl: use compat status string instead of a field-by-field table
Zbigniew Jędrzejewski-Szmek [Sun, 11 Oct 2020 14:20:27 +0000 (16:20 +0200)] 
resolvectl: use compat status string instead of a field-by-field table

The status string is modeled after our --version output: +enabled -disabled equals=more-info

For example:
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=allow-downgrade/supported

3 years agoresolvectl: sort domain/nta output
Zbigniew Jędrzejewski-Szmek [Sun, 11 Oct 2020 10:19:46 +0000 (12:19 +0200)] 
resolvectl: sort domain/nta output

dns list shall not be sorted.

3 years agoresolvectl: add the usual typedef for struct link_info/global_info
Zbigniew Jędrzejewski-Szmek [Sun, 11 Oct 2020 11:46:53 +0000 (13:46 +0200)] 
resolvectl: add the usual typedef for struct link_info/global_info

Also move the struct defintions up in preparation for further changes.

3 years agoman: add example of negative trust anchor file
Zbigniew Jędrzejewski-Szmek [Sun, 11 Oct 2020 10:55:10 +0000 (12:55 +0200)] 
man: add example of negative trust anchor file

Fixes #17226.

3 years agoresolvectl: break nta/domain/dns listings with newlines
Zbigniew Jędrzejewski-Szmek [Sun, 11 Oct 2020 09:54:18 +0000 (11:54 +0200)] 
resolvectl: break nta/domain/dns listings with newlines

We would print the whole string as a single super-long line. Let's nicely
break the text into lines that fit on the screen.

$ COLUMNS=70 build/resolvectl --no-pager nta
Global: home local intranet 23.172.in-addr.arpa lan
        18.172.in-addr.arpa 16.172.in-addr.arpa 19.172.in-addr.arpa
        25.172.in-addr.arpa 21.172.in-addr.arpa d.f.ip6.arpa
        20.172.in-addr.arpa 30.172.in-addr.arpa 17.172.in-addr.arpa
        internal 168.192.in-addr.arpa 28.172.in-addr.arpa
        22.172.in-addr.arpa 24.172.in-addr.arpa 26.172.in-addr.arpa
        corp 10.in-addr.arpa private 29.172.in-addr.arpa test
        27.172.in-addr.arpa 31.172.in-addr.arpa
Link 2 (hub0):
Link 4 (enp0s31f6):
Link 5 (wlp4s0):
Link 7 (virbr0): adsfasdfasdfasd.com 21.172.in-addr.arpa lan j b
        a.com home d.f.ip6.arpa b.com local 16.172.in-addr.arpa
        19.172.in-addr.arpa 18.172.in-addr.arpa 25.172.in-addr.arpa
        20.172.in-addr.arpa k i h 23.172.in-addr.arpa
        168.192.in-addr.arpa d g intranet 17.172.in-addr.arpa c e.com
        30.172.in-addr.arpa a f d.com e internal
Link 8 (virbr0-nic):
Link 9 (vnet0):
Link 10 (vb-rawhide):
Link 15 (wwp0s20f0u2i12):

3 years agotest-ipcrm: modernize, skip test on permission errors 17407/head
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 16:02:54 +0000 (18:02 +0200)] 
test-ipcrm: modernize, skip test on permission errors

I now get:
$ build/test-ipcrm
Failed to enter shared memory directory /dev/shm/multipath: Permission denied
test-ipcrm: No privileges, skipping tests.

3 years agoshared/clean-ipc: improve error message a bit
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 15:57:03 +0000 (17:57 +0200)] 
shared/clean-ipc: improve error message a bit

Failed to enter shared memory directory multipath: Permission denied

Failed to enter shared memory directory /dev/shm/multipath: Permission denied

When looking at nested directories, we will print only the final two elements
of the path. That is still more useful than just the last component of the
path. To print the full path, we'd have to allocate the string, and since the
error occurs so very rarely, I think the current best-effort approach is
enough.

3 years agosd-hwdb: reduce variable scope, use periods 17395/head
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 15:23:40 +0000 (17:23 +0200)] 
sd-hwdb: reduce variable scope, use periods

3 years agosd-hwdb: allow empty properties
Zbigniew Jędrzejewski-Szmek [Tue, 20 Oct 2020 15:12:42 +0000 (17:12 +0200)] 
sd-hwdb: allow empty properties

So far we didn't allow empty properties, but it makes sense to do so, for
example to distinguish empty data from lack of data. It also makes it easy to
override properties (back to the empty) value for specific cases.