systemd/.git
4 years agomeson: Fix reallocarray check
Khem Raj [Sun, 13 Dec 2020 00:15:57 +0000 (16:15 -0800)]
meson: Fix reallocarray check

reallocarray() is defined in stdlib.h, so that would be right header to
check for its presense.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 5bb20fd3d33f7e866a0845f15c1ab5b595147f1e)
(cherry picked from commit 1d8cfe817861a0b0de2b561f6770e33d1242db63)

4 years agomeson: check that cxx variable is set before using it
Luca Boccassi [Thu, 3 Dec 2020 16:17:43 +0000 (16:17 +0000)]
meson: check that cxx variable is set before using it

In some cases it is not defined. Eg in a yocto build:

src/systemd/meson.build:61:15: ERROR: Unknown variable cxx.

(cherry picked from commit 442bc2afee6c5f731c7b3e76ccab7301703a45a7)
(cherry picked from commit dad90a476e667b9c570cf236c90b50ccae7e8817)

4 years agoudev: Fix sound.target dependency
Takashi Iwai [Wed, 9 Dec 2020 09:56:51 +0000 (10:56 +0100)]
udev: Fix sound.target dependency

The recent bug report indicated a race at device creation and the
sound.target dependencies, and the cause turned out to be the condition
of the sound.target trigger.  Currently it's set for "card*", but this
is actually the parent object; i.e. the sound.target is triggered before
the sound devices are created.

For assuring the whole sound device creations beforehand, we need to use
"controlC*" instead of "card*"; as already described in
78-sound-card.rules, this is guaranteed to be the last device, and can
be used as a synchronization point.

BugLink: https://bugzilla.suse.com/show_bug.cgi?id=1179363
Signed-off-by: Takashi Iwai <tiwai@suse.de>
(cherry picked from commit 5926e592fa5e6290b9f4588939945869adb5c55f)

4 years agoman: document that automount units are privileged
Lennart Poettering [Wed, 9 Dec 2020 13:04:21 +0000 (14:04 +0100)]
man: document that automount units are privileged

Fixes: #17886
(cherry picked from commit eef34a1d8fe5ca44bdab189b682642096c53e661)

4 years agolog: open journal when cli program run in a service unit
Yu Watanabe [Tue, 8 Dec 2020 16:49:13 +0000 (01:49 +0900)]
log: open journal when cli program run in a service unit

Previously, cli programs like networkctl always use console for logging.

(cherry picked from commit 13ee93978479b80e980d8551c689a7087bf1817e)

4 years agolog: make show_color variable tristate
Yu Watanabe [Tue, 8 Dec 2020 16:44:36 +0000 (01:44 +0900)]
log: make show_color variable tristate

Should not change any behavior.

(cherry picked from commit db987463fe2df3e2999e1968709a32a674d8e78d)

4 years agolog: merge conditions to reduce indentation
Yu Watanabe [Tue, 8 Dec 2020 16:21:31 +0000 (01:21 +0900)]
log: merge conditions to reduce indentation

(cherry picked from commit 5941112e7e92d4afd8a6a6c21b7bfa91012b09f7)

4 years agologind: fix closing of button input devices
Lennart Poettering [Mon, 7 Dec 2020 09:51:15 +0000 (10:51 +0100)]
logind: fix closing of button input devices

This is a fix of #17751. Specifically:

1. Sort #include headers again

2. Remove tabs, as per coding style

3. Don't install fds in half-initialized objects

4. Use asynchronous_close() everywhere

That all said:

Quit frankly, I am not convinced we should do all this at all. If
close()ing of these input devices is really that slow, then this should
probably be fixed in the kernel, not worked around in userspace like
this.

(cherry picked from commit c74d5fe25d53263c143f0a9c2698d8bb483e398c)

4 years agoUpdate logind-button.c
nihilix-melix [Fri, 27 Nov 2020 10:21:22 +0000 (11:21 +0100)]
Update logind-button.c

(cherry picked from commit eee582e7951fa8e328d1fcdfcff940254070ccba)

4 years agoasync: add trivial cleanup wrapper for asynchronous_close()
Lennart Poettering [Wed, 9 Dec 2020 09:07:12 +0000 (10:07 +0100)]
async: add trivial cleanup wrapper for asynchronous_close()

(cherry picked from commit 1d9aa4d572b661fd6500c55ab524141332f76230)

4 years agocgroup: Also set blkio.bfq.weight
Pavel Hrdina [Wed, 25 Nov 2020 08:05:36 +0000 (09:05 +0100)]
cgroup: Also set blkio.bfq.weight

Commit [1] added a workaround when unified cgroups are used but missed
legacy cgroups where there is the same issue.

[1] <https://github.com/systemd/systemd/commit/2dbc45aea747f25cc1c3848fded2ec0062f96bcf>

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
(cherry picked from commit 35e7a62ca32a30169a94693b831e53c832251984)

4 years agogenerator: use kmsg in system-level generators, journal otherwise v246.7
Lennart Poettering [Wed, 30 Sep 2020 14:19:12 +0000 (16:19 +0200)]
generator: use kmsg in system-level generators, journal otherwise

Fixes: #17129.
(cherry picked from commit dee29aeb5909f4f5604012ced250488286b8d468)

https://github.com/systemd/systemd-stable/issues/76

4 years agolog: normalize log target condition check
Lennart Poettering [Wed, 30 Sep 2020 14:17:12 +0000 (16:17 +0200)]
log: normalize log target condition check

THis doesn't change the condition's logic at all, but is an attempt to
make things a bit more readable: instead of checking log_target !=
LOG_TARGET_AUTO let's actually list the targets where we want to
consider journal/syslog/kmsg, to make things a bit less confusing. After
all the message here is not to avoid them if LOG_TARGET_AUTO is set, but
to definitely do them in the other cases.

(cherry picked from commit ef9bddb79984aa1b9d605d44b8c0890e8289bef1)

4 years agolog: update comment
Lennart Poettering [Wed, 30 Sep 2020 14:06:53 +0000 (16:06 +0200)]
log: update comment

The logic was changed in bc694c06e60505efeb09e5278a7b22cdfa23975e, let's
update the comment accordingly.

(cherry picked from commit 27ffec083140467a03f463a446c6d19dc5e437ab)

4 years agoDon't assume /run/systemd exists when creating unit-root
Daan De Meyer [Thu, 3 Dec 2020 23:08:21 +0000 (23:08 +0000)]
Don't assume /run/systemd exists when creating unit-root

When running tests in a mkosi container, /run/systemd might not
exist yet in the container which causes test-execute to fail.

Fixes #17842.

(cherry picked from commit 77f16dbd6d93f2b4a96984254cca25cab03479af)

4 years agoresolved: beef up logic for suppressing "localhost" entry in /etc/hosts
Lennart Poettering [Tue, 10 Nov 2020 22:30:25 +0000 (23:30 +0100)]
resolved: beef up logic for suppressing "localhost" entry in /etc/hosts

Either suppress the entry entirely, or not at all. But do not suppress
the "localhost" names we recognize, leaving the ones we do not in place.

On Fedora, where "localhost4.localdomain4" is among those listed in
/etc/hosts for 127.0.0.1 we'd thus otherwise drop the "localhost" but
keep the "localhost4.localdomain4" and then on reverse lookups only
return that, which is highly confusing.

(cherry picked from commit 9ca875e80c38d5bd9898cab61a612ad16d527a5a)

4 years agoresolved: use stat_inode_unmodified() to detect /etc/hosts changes
Lennart Poettering [Fri, 6 Nov 2020 13:56:16 +0000 (14:56 +0100)]
resolved: use stat_inode_unmodified() to detect /etc/hosts changes

(cherry picked from commit 36d892b7e6753dfc67110b57c55864647a04c5cb)

4 years agoresolved: never allow _gateway lookups to go to the network
Lennart Poettering [Wed, 11 Nov 2020 16:38:21 +0000 (17:38 +0100)]
resolved: never allow _gateway lookups to go to the network

Make them rather fail than go to the network.

Previously we'd filter them on LLMNR (explicitly) and MDNS (implicitly,
because it doesn't have .local suffix), but not on DNS.

In order to make _gateway truly reliable, let's not allow it to go to
DNS either, and keep it local.

This is particular relevant, as clients can now request lookups without
local RR synthesis, where we'd rather have NXDOMAIN returned for
_gateway than have it hit the network.

(cherry picked from commit fbbc72189f7844df8500bb10a58988f70bf90c99)

4 years agoresolved: lower SERVFAIL cache timeout from 30s to 10s
Lennart Poettering [Thu, 12 Nov 2020 16:52:09 +0000 (17:52 +0100)]
resolved: lower SERVFAIL cache timeout from 30s to 10s

Apparently 30s is a bit too long for some cases, see #5552. But not
caching SERVFAIL at all also breaks stuff, see explanation in
201d99584ed7af8078bb243ce2587e5455074713.

Let's try to find some middle ground, by lowering the cache timeout to
10s. This should be ample for the problem
201d99584ed7af8078bb243ce2587e5455074713 attackes, but not as long as
half a miute, as #5552 complains.

Fixes: #5552
(cherry picked from commit 19bcef9dc3fde342f138394333ab04d7e44b7da2)

4 years agoresolved: bind socket to interface during connect()
Lennart Poettering [Thu, 5 Nov 2020 17:22:38 +0000 (18:22 +0100)]
resolved: bind socket to interface during connect()

Apparently, IF_UNICAST_IF does not influence the routing decisions done
during connect(). But SO_BINDTODEVICE/SO_BINDTOINDEX does, which however
brings a lot of other semantics with it, we are not so interested in
(i.e. it doesn't not allow packets from any other iface to us, even if
routing otherwise allows it).

Hence, let's bind to the ifindex immediately before the connect() and
unbind right after again, so that we get the semantics we want, but not
the ones we don't.

Fixes: #11935
Replaces: #12004
(cherry picked from commit d301c52383ca7cfa6b7cda87d7a4209c234a532c)

4 years agosocket-util: add sockaddr_in_addr() helper
Lennart Poettering [Wed, 18 Nov 2020 09:25:27 +0000 (10:25 +0100)]
socket-util: add sockaddr_in_addr() helper

This extracts the IP address (as union in_addr_union) from a socket
address (i.e. a struct sockaddr).

(cherry picked from commit 3132597182c806e5193aebb0b67cdc0f73154a51)

4 years agoresolved: insert large dgram size into EDNS0 only when in LARGE UDP mode
Lennart Poettering [Wed, 11 Nov 2020 20:20:15 +0000 (21:20 +0100)]
resolved: insert large dgram size into EDNS0 only when in LARGE UDP mode

Specifically, in TLS-DO there's no reason to set the exotic dgram size.

(cherry picked from commit 0a489d3f5d2a6ef8667224d838044a520e98ab37)

4 years agodns-domain: try IDN2003 rules if IDN2008 doesn't work
Lennart Poettering [Mon, 9 Nov 2020 22:10:43 +0000 (23:10 +0100)]
dns-domain: try IDN2003 rules if IDN2008 doesn't work

This follows more closely what web browsers do, and makes sure emojis in
domains work.

Fixes: #14483
(cherry picked from commit d80e72ec602c2af2983842ad87e4443fce89d423)

4 years agovirt: Properly detect nested UML inside another hypervisor
Christopher Obbard [Wed, 2 Dec 2020 14:20:39 +0000 (14:20 +0000)]
virt: Properly detect nested UML inside another hypervisor

UML runs as a user-process so it can quite easily be ran inside of
another hypervisor, for instance inside a KVM instance. UML passes
through the CPUID from the host machine so in this case detect_vm
incorrectly identifies as running under KVM. So check we are running
a UML kernel first, before we check any other hypervisors.

Resolves: #17754

Signed-off-by: Christopher Obbard <chris.obbard@collabora.com>
(cherry picked from commit c8037dbf05da586b6a210ac04f145d99f424971f)

4 years agoresolved: properly check per-link NTA list
Lennart Poettering [Tue, 17 Nov 2020 17:31:53 +0000 (18:31 +0100)]
resolved: properly check per-link NTA list

We need to check for parent domains too. We did this correctly for the
system-wide NTA list, but not for the per-link one. Let's fix that.

(cherry picked from commit 7e8a93b77c3c4d4df1e8c3177dc9553c94fac759)

4 years agomeson: use '_' as separator in fuzz test names
Yu Watanabe [Wed, 2 Dec 2020 09:05:06 +0000 (18:05 +0900)]
meson: use '_' as separator in fuzz test names

Follow-up for d448888924c1d4815cb97bcd5d94419812c053b9 and ca121e20c42219e3bc4e5cb63dcc96cc5eae2879.

Fixes #17568.

(cherry picked from commit 0f82a2ab5c8d812791aca9686bdcc45f39c62431)

4 years agoman: Speicfy exact return values of sd_bus_message_enter_container
igo95862 [Fri, 27 Nov 2020 13:51:18 +0000 (16:51 +0300)]
man: Speicfy exact return values of sd_bus_message_enter_container

(cherry picked from commit 1edc1f1b626446a20db405d041cd70ed3d52c632)

4 years agonetwork: fix return values
Yu Watanabe [Thu, 26 Nov 2020 23:18:32 +0000 (08:18 +0900)]
network: fix return values

(cherry picked from commit 72f092815ada28431103d2145ffa61e1ae14aded)

4 years agoshared/seccomp-util: address family filtering is broken on ppc
Zbigniew Jędrzejewski-Szmek [Thu, 26 Nov 2020 10:23:54 +0000 (11:23 +0100)]
shared/seccomp-util: address family filtering is broken on ppc

This reverts the gist of da1921a5c396547261c8c7fcd94173346eb3b718 and
0d9fca76bb69e162265b2d25cb79f1890c0da31b (for ppc).

Quoting #17559:
> libseccomp 2.5 added socket syscall multiplexing on ppc64(el):
> https://github.com/seccomp/libseccomp/pull/229
>
> Like with i386, s390 and s390x this breaks socket argument filtering, so
> RestrictAddressFamilies doesn't work.
>
> This causes the unit test to fail:
> /* test_restrict_address_families */
> Operating on architecture: ppc
> Failed to install socket family rules for architecture ppc, skipping: Operation canceled
> Operating on architecture: ppc64
> Failed to add socket() rule for architecture ppc64, skipping: Invalid argument
> Operating on architecture: ppc64-le
> Failed to add socket() rule for architecture ppc64-le, skipping: Invalid argument
> Assertion 'fd < 0' failed at src/test/test-seccomp.c:424, function test_restrict_address_families(). Aborting.
>
> The socket filters can't be added so `socket(AF_UNIX, SOCK_DGRAM, 0);` still
> works, triggering the assertion.

Fixes #17559.

(cherry picked from commit d5923e38bc0e6cf9d7620ed5f1f8606fe7fe1168)

4 years agotest: use cap_last_cap() for max supported cap number, not capability_list_length()
Dan Streetman [Wed, 25 Nov 2020 20:22:24 +0000 (15:22 -0500)]
test: use cap_last_cap() for max supported cap number, not capability_list_length()

This test assumes capability_list_length() is an invalid cap number,
but that isn't true if the running kernel supports more caps than we were
compiled with, which results in the test failing.

Instead use cap_last_cap() + 1.

If cap_last_cap() is 63, there are no more 'invalid' cap numbers to test with,
so the invalid cap number test part is skipped.

(cherry picked from commit ebc815cd1c647faa934a446ceea91ff4bc9dffa4)

4 years agoman: slightly update the man page of sd_bus_message_read_basic()
Yu Watanabe [Wed, 25 Nov 2020 13:20:48 +0000 (22:20 +0900)]
man: slightly update the man page of sd_bus_message_read_basic()

Follow-up for 73a1d7d2433edd1872ec53db3e804009298ebb1d.

(cherry picked from commit 7a1fe27f81dace11a25a0573dc170d86d1f92023)

4 years agoman: Fixed an incomplete sentence
igo95862 [Wed, 25 Nov 2020 13:15:33 +0000 (16:15 +0300)]
man: Fixed an incomplete sentence

(cherry picked from commit 78c4f2f153b93fdb39654edb93a73b202a67dcfd)

4 years agoman: Specify that sd_bus_message_read_basic returns 0 if end of array had been reached.
igo95862 [Wed, 25 Nov 2020 12:53:52 +0000 (15:53 +0300)]
man: Specify that sd_bus_message_read_basic returns 0 if end of array had been reached.

(cherry picked from commit 73a1d7d2433edd1872ec53db3e804009298ebb1d)

4 years agocore/mount: mount command may fail after adding the corresponding proc mountinfo...
Yu Watanabe [Tue, 17 Nov 2020 00:13:59 +0000 (09:13 +0900)]
core/mount: mount command may fail after adding the corresponding proc mountinfo entry

Hopefully fixes #17617.

(cherry picked from commit 2fa0bd7d57863dffda89190a70a83c51bd7d114a)

4 years agomkosi: make sure our mkosi files work with f33
Lennart Poettering [Tue, 17 Nov 2020 17:35:08 +0000 (18:35 +0100)]
mkosi: make sure our mkosi files work with f33

(cherry picked from commit e2c5e698c094165919af8d5f91896425c918c850)

4 years agoman: clarify DefaultTasksMax doc
Pavel Sapezhko [Wed, 18 Nov 2020 14:54:01 +0000 (17:54 +0300)]
man: clarify DefaultTasksMax doc

(cherry picked from commit 77f5277a7abf7d6b0a4bbf4ecf872da0b92335b5)

4 years agoseccomp: also move munmap into @default syscall filter set
Yu Watanabe [Tue, 24 Nov 2020 09:47:37 +0000 (18:47 +0900)]
seccomp: also move munmap into @default syscall filter set

Follow-up for 5abede3247591248718026cb8be6cd231de7728b.

(cherry picked from commit 11b9105dfdbcea5dc9f4a5dd676ca494ab8b909e)

4 years agosd-device-enumerator: do not return error when a device is removed
INSUN PYO [Thu, 19 Nov 2020 01:49:04 +0000 (10:49 +0900)]
sd-device-enumerator: do not return error when a device is removed

If /sys/class/OOO node is created and destroyed during booting (kernle driver initialization fails),
systemd-udev-trigger.service fails due to race condition.

***** race condition ***********************************************************************************
 1. kernel driver create /sys/class/OOO
 2. systemd-udev-trigger.service execues "/usr/bin/udevadm trigger --type=devices --action=add"

 3. device_enumerator_scan_devices() => enumerator_scan_devices_all() => enumerator_scan_dir("class") =>
    opendir("/sys/class") and iterate all subdirs ==> enumerator_scan_dir_and_add_devices("/sys/class/OOO")

 4. kernel driver fails and destroy /sys/class/OOO
 5. enumerator_scan_dir_and_add_devices("/sys/class/OOO") fails in opendir("/sys/class/OOO")

 6. "systemd-udev-trigger.service" fails
 7. udev coldplug fails and some device units not ready
 8. mount units asociated with device units fail
 9. local-fs.target fails
 10. enters emergency mode
********************************************************************************************************

***** status of systemd-udev-trigger.service unit ******************************************************
$ systemctl status systemd-udev-trigger.service
 systemd-udev-trigger.service - udev Coldplug all Devices
   Loaded: loaded (/usr/lib/systemd/system/systemd-udev-trigger.service; static; vendor preset: enabled)
   Active: failed (Result: exit-code) since Thu 2020-01-02 13:16:54 KST; 22min ago
     Docs: man:udev(7)
           man:systemd-udevd.service(8)
  Process: 2162 ExecStart=/usr/bin/udevadm trigger --type=subsystems --action=add (code=exited, status=0/SUCCESS)
  Process: 2554 ExecStart=/usr/bin/udevadm trigger --type=devices --action=add (code=exited, status=1/FAILURE)
  Main PID: 2554 (code=exited, status=1/FAILURE)

  Jan 02 13:16:54 localhost udevadm[2554]: Failed to scan devices: No such file or directory
  Jan 02 13:16:54 localhost systemd[1]: systemd-udev-trigger.service: Main process exited, code=exited, status=1/FAILURE
  Jan 02 13:16:54 localhost systemd[1]: systemd-udev-trigger.service: Failed with result 'exit-code'.
  Jan 02 13:16:54 localhost systemd[1]: Failed to start udev Coldplug all Devices.
*******************************************************************************************************

***** journal log with Environment=SYSTEMD_LOG_LEVEL=debug in systemd-udev-trigger.service  ***********
  Jan 01 21:57:20 localhost udevadm[2039]: sd-device-enumerator: Scanning /sys/bus
  Jan 01 21:57:20 localhost udevadm[2522]: sd-device-enumerator: Scan all dirs
  Jan 01 21:57:20 localhost udevadm[2522]: sd-device-enumerator: Scanning /sys/bus
  Jan 01 21:57:21 localhost udevadm[2522]: sd-device-enumerator: Scanning /sys/class
  Jan 01 21:57:21 localhost udevadm[2522]: sd-device-enumerator: Failed to scan /sys/class: No such file or directory
  Jan 01 21:57:21 localhost udevadm[2522]: Failed to scan devices: No such file or directory
*******************************************************************************************************

(cherry picked from commit cfb6197bc31eb6b2631dec7bf8d7a253e7891016)

4 years agocurl-util: fix callback prototype
Etienne Doms [Fri, 20 Nov 2020 16:15:25 +0000 (17:15 +0100)]
curl-util: fix callback prototype

CURLMOPT_SOCKETFUNCTION callback is an easy handle, not a multi.

(cherry picked from commit 5b639090d0b4a49d77ba58bebe180b2a6f8da322)

4 years agocurl-util: fix type CURL -> CURLM
Yu Watanabe [Fri, 20 Nov 2020 16:51:03 +0000 (01:51 +0900)]
curl-util: fix type CURL -> CURLM

(cherry picked from commit 2d052a0a48cc184ea3748c2e364c661985aa21d5)

4 years agounits: restore sysfs conditions in sys-fs-fuse-connections.mount and sys-kernel-confi...
Franck Bui [Fri, 20 Nov 2020 10:52:36 +0000 (11:52 +0100)]
units: restore sysfs conditions in sys-fs-fuse-connections.mount and sys-kernel-config.mount

Commit 42cc2855ba2fe4c6f5d incorrectly removed the condition on sysfs in both
sys-fs-fuse-connections.mount and sys-kernel-config.mount. However there are
still needed in case modprobe of one of these modules is intentionally skipped
(due to lack of privs for example).

This patch restores the 2 conditions which should be safe for the common case,
since all conditions are only checked after all deps ordered before are
complete.

Follow-up for 42cc2855ba2fe4c6f5dc863507a1c843611350a0.

(cherry picked from commit 07ccf434e77b17b20d773ce8b2637083cd4fdafc)

4 years agocore/mount: mount_start() may be called during the state is MOUNT_MOUNTING_DONE
Yu Watanabe [Tue, 17 Nov 2020 01:50:12 +0000 (10:50 +0900)]
core/mount: mount_start() may be called during the state is MOUNT_MOUNTING_DONE

As, both MOUNT_MOUNTING and MOUNT_MOUNTING_DONE are mapped to
UNIT_ACTIVATING.

Fixes #17570.

(cherry picked from commit db39a62784e8f857a67cb4a83ade28a906f79679)

4 years agoseccomp: move brk+mmap+mmap2 into @default syscall filter set
Lennart Poettering [Thu, 19 Nov 2020 10:14:41 +0000 (11:14 +0100)]
seccomp: move brk+mmap+mmap2 into @default syscall filter set

These three syscalls are internally used by libc's memory allocation
logic, i.e. ultimately back malloc(). Allocating a bit of memory is so
basic, it should just be in the default set.

This fixes a couple of issues with asan/msan and the seccomp tests: when
asan/msan is used some additional, large memory allocations take place
in the background, and unless mmap/mmap2/brk are allowlisted these will
fail, aborting the test prematurely.

(cherry picked from commit 5abede3247591248718026cb8be6cd231de7728b)

4 years agounits: wait until some fs modules are entirely loaded before mounting their correspon...
Franck Bui [Thu, 19 Nov 2020 08:17:19 +0000 (09:17 +0100)]
units: wait until some fs modules are entirely loaded before mounting their corresponding filesystem

udev requests to start the fs mount units when their respective module is
loaded. For that it monitors uevents of type "ADD" for the relevant fs modules.

However the uevent is sent by the kernel too early, ie before the init() of the
module is called hence before directories in /sys/fs/ are created.

This patch workarounds adds "Requires/After=modprobe@<fs-module>.service" to
the mount unit, which means that modprobe(8) will be called once the fs module
is announced to be loaded. This sounds pointless, but given that modprobe only
returns after the initialization of the module is complete, it should
workaround the issue.

As a side effect, the module will be automatically loaded if the mount unit is
started manually.

Fixes #17586.

(cherry picked from commit 42cc2855ba2fe4c6f5dc863507a1c843611350a0)

4 years agoRevert "units: skip modprobe@.service if the unit appears to be already loaded"
Franck Bui [Thu, 19 Nov 2020 07:55:56 +0000 (08:55 +0100)]
Revert "units: skip modprobe@.service if the unit appears to be already loaded"

This reverts commit 9cbf1e58f9629af5c6b56777ee73dc6320306d6d.

The presence of /sys/module/%I directory can't be used to assert that the load
of a given module is complete and therefore the call to modprobe(8) can be
skipped. Indeed this directory is created before the init() function of the
module is called.

Users of modprobe@.service needs to be sure that once this service returns the
module is fully operational.

(cherry picked from commit b3e32582f67c68896b6b05893b138a975fa26454)

4 years agokhash: fix structured initializer
Yu Watanabe [Wed, 18 Nov 2020 07:43:58 +0000 (16:43 +0900)]
khash: fix structured initializer

Fixes #17646.

(cherry picked from commit f56a9cbf9c20cd798258d3db302d51bf21458b38)

4 years agoman: Fix sd_bus_message_append_array_space function signature
igo95862 [Wed, 18 Nov 2020 09:21:37 +0000 (12:21 +0300)]
man: Fix sd_bus_message_append_array_space function signature

(cherry picked from commit 0e577869f3fc287223d31cfed52921c4d3579ff2)

4 years agosd-device: drop unwanted newline in netlink message
Yu Watanabe [Mon, 16 Nov 2020 15:51:14 +0000 (00:51 +0900)]
sd-device: drop unwanted newline in netlink message

(cherry picked from commit b9cbb08e0a35070d57721cd5bf810659a0b80f5e)

4 years agoman: drop misplaced phrase
Zbigniew Jędrzejewski-Szmek [Tue, 17 Nov 2020 10:46:50 +0000 (11:46 +0100)]
man: drop misplaced phrase

I think it was added in 6c2b9c8da1eb1bac7e8f170b913f63dbd13a16d7 as c&p.

(cherry picked from commit de70ff66dc628062d4f04270988b92ba0aef2420)

4 years agoman: Add a paragraph to sd_bus_call explaning callback message lifetime
igo95862 [Tue, 17 Nov 2020 09:47:28 +0000 (12:47 +0300)]
man: Add a paragraph to sd_bus_call explaning callback message lifetime

(cherry picked from commit e6ce785d611702532ae71547e78fbb49eff3aded)

4 years agoman: fix prototpe of sd_bus_message_peek_type()
Yu Watanabe [Sat, 14 Nov 2020 20:13:55 +0000 (05:13 +0900)]
man: fix prototpe of sd_bus_message_peek_type()

Fixes #17609.

(cherry picked from commit 483abcc65bd5efe43b0cea453580bac45cd0f177)

4 years agoman: add missing <para> tag, and drop redundant ">"
Yu Watanabe [Sat, 14 Nov 2020 20:10:10 +0000 (05:10 +0900)]
man: add missing <para> tag, and drop redundant ">"

Fixes #17609.

(cherry picked from commit e55c073161d469fb01ecd5bea3ff8845194e25d9)

4 years agoman: Separated paragraph about making sd_bus object reply async
igo95862 [Tue, 17 Nov 2020 07:54:19 +0000 (10:54 +0300)]
man: Separated paragraph about making sd_bus object reply async

(cherry picked from commit 2e4238a6d14223728dbfbb24830e644d31b04111)

4 years agomeson: use "_" as separator in test names
Yu Watanabe [Fri, 13 Nov 2020 06:55:54 +0000 (15:55 +0900)]
meson: use "_" as separator in test names

Follow-up for ca121e20c42219e3bc4e5cb63dcc96cc5eae2879.

Fixes #17568.

(cherry picked from commit d448888924c1d4815cb97bcd5d94419812c053b9)

4 years agomissing: define several syscall numbers for MIPS arch
Yu Watanabe [Fri, 13 Nov 2020 05:58:49 +0000 (14:58 +0900)]
missing: define several syscall numbers for MIPS arch

Fixes #17591.

(cherry picked from commit 77419ba463999a25922146ac424348adc2fe23af)

4 years agonetworkd: fix default value of DHCPv6Client
Christof Efkemann [Sun, 15 Nov 2020 19:08:39 +0000 (20:08 +0100)]
networkd: fix default value of DHCPv6Client

The configuration of networkd has a DHCPv6Client setting in its
[IPv6AcceptRA] section, which, according to the man page, can be
a boolean, or the special value "always". The man page states
that "true" is the default.

The default value is implemented in src/network/networkd-network.c
by setting field ipv6_accept_ra_start_dhcp6_client of network to
true. However, this field is not a boolean, but an enum type
IPv6AcceptRAStartDHCP6Client (src/network/networkd-ndisc.h).

Setting ipv6_accept_ra_start_dhcp6_client to true effectively
corresponds to the enum value IPV6_ACCEPT_RA_START_DHCP6_CLIENT_ALWAYS,
resulting in the DHCPv6Client setting having the default value
"always".

This patch changes the initialisation to the correct enum value
IPV6_ACCEPT_RA_START_DHCP6_CLIENT_YES.

(cherry picked from commit cabe57119f07a9f86ab281f6260bbb006b89a854)

4 years agoratelimit: fix integer overflow
Etienne Doms [Thu, 12 Nov 2020 10:09:54 +0000 (11:09 +0100)]
ratelimit: fix integer overflow

If StartLimitIntervalSec is huge, or more specifically, set to "infinity", we need to take care about overflows.

(cherry picked from commit e2357b1c8a87b610066b8b2a59517bcfb20b832e)

4 years agoman: fix tag
Yu Watanabe [Mon, 9 Nov 2020 21:10:16 +0000 (06:10 +0900)]
man: fix tag

(cherry picked from commit af7ce3faf88f6bcd5c82a71412fa81e8ae34acbb)

4 years agoman: mention that sd_bus_call() may return a negative errno mapped from D-Bus error...
Yu Watanabe [Mon, 9 Nov 2020 20:57:41 +0000 (05:57 +0900)]
man: mention that sd_bus_call() may return a negative errno mapped from D-Bus error reply

Closes #17556.

(cherry picked from commit c660668ed9daf15358c522c09ba3932393bd5451)

4 years agoman: add missing period
Yu Watanabe [Mon, 9 Nov 2020 20:25:29 +0000 (05:25 +0900)]
man: add missing period

(cherry picked from commit 23243adf69ffed2630c778e021c3cf2e97a6b999)

4 years agomeson: use "_" as separator in test names
Zbigniew Jędrzejewski-Szmek [Wed, 11 Nov 2020 13:37:07 +0000 (14:37 +0100)]
meson: use "_" as separator in test names

":" is prettier, but meson 0.56+ doesn't like it:
src/systemd/meson.build:73: DEPRECATION: ":" is not allowed in test name "cc-sd-bus.h:c", it has been replaced with "_"
src/systemd/meson.build:73: DEPRECATION: ":" is not allowed in test name "cc-sd-bus.h:c-ansi", it has been replaced with "_"
...

Fixes #17568.

(cherry picked from commit ca121e20c42219e3bc4e5cb63dcc96cc5eae2879)

4 years agoethtool: make ethtool_get_driver() return -ENODATA if ioctl succeeds but driver name...
Yu Watanabe [Mon, 9 Nov 2020 16:14:38 +0000 (01:14 +0900)]
ethtool: make ethtool_get_driver() return -ENODATA if ioctl succeeds but driver name is empty

Inspired by #17532.

(cherry picked from commit 861de64e6858bc92b154ad70d1cee41ae5b75835)

4 years agojournal: refuse skip parameter for sd_journal_next_skip() larger than INT_MAX
Yu Watanabe [Mon, 9 Nov 2020 06:23:32 +0000 (15:23 +0900)]
journal: refuse skip parameter for sd_journal_next_skip() larger than INT_MAX

Fixes #17502.

(cherry picked from commit 41d544a1c124a63f94b571e5ed924c4fb03193bb)

4 years agocore: add missing oom check
Yu Watanabe [Mon, 9 Nov 2020 14:59:36 +0000 (23:59 +0900)]
core: add missing oom check

Fixes #17552.

(cherry picked from commit 72585a584d26eec4bb9ea6c30fc101f1e4f0d7f9)

4 years agoudev: log when we fail to query ID_NET_DRIVER
Zbigniew Jędrzejewski-Szmek [Mon, 9 Nov 2020 14:39:29 +0000 (15:39 +0100)]
udev: log when we fail to query ID_NET_DRIVER

Inspired by #17532.

(cherry picked from commit d61db498bf86fe64c66e30d15aafc020cc87d068)

4 years agonetwork: make default router lifetime to 30min
Yu Watanabe [Mon, 9 Nov 2020 07:29:32 +0000 (16:29 +0900)]
network: make default router lifetime to 30min

Closes #17527.

(cherry picked from commit 71a5db49fd07864078348359200921d6d441f85a)

4 years agosd-bus: fix possible division by 0
Yu Watanabe [Mon, 9 Nov 2020 05:33:16 +0000 (14:33 +0900)]
sd-bus: fix possible division by 0

Fixes #17541.

(cherry picked from commit 291bb0b01cae22c3c14882fd5a0ad557c92d9298)

4 years agohome: fix copy-and-paste mistake
Yu Watanabe [Mon, 9 Nov 2020 05:00:14 +0000 (14:00 +0900)]
home: fix copy-and-paste mistake

Fixes #17542.

(cherry picked from commit 755b35b1aa6eda16a2cf02be3e4aa44d08fc17a3)

4 years agoresolved: slightly extend debug log output about outgoing messages
Lennart Poettering [Fri, 6 Nov 2020 10:46:39 +0000 (11:46 +0100)]
resolved: slightly extend debug log output about outgoing messages

(cherry picked from commit 76f772298e3473f00eff7cb6dc294926a7d8cc4f)

4 years agoresolved: don't resolve "local." via LLMNR
Lennart Poettering [Thu, 5 Nov 2020 13:16:03 +0000 (14:16 +0100)]
resolved: don't resolve "local." via LLMNR

It's the mDNS top-level domain, hence don't consider it for LLMNR, ever.

Fixes: #16233
(cherry picked from commit 088648d081e9bc27f53c6471b91109569b29322f)

4 years agoresolved: show all answer flags when dumping answer
Lennart Poettering [Wed, 4 Nov 2020 20:01:49 +0000 (21:01 +0100)]
resolved: show all answer flags when dumping answer

(cherry picked from commit 5cdcac6cf6879826407433f2cfcf2b763f89d74a)

4 years agoresolved: suppress misleading debug message about ignored resolv.conf line
Lennart Poettering [Thu, 5 Nov 2020 14:49:15 +0000 (15:49 +0100)]
resolved: suppress misleading debug message about ignored resolv.conf line

(cherry picked from commit 02c205359b7dfcb4501cab564218f21d0a0523f8)

4 years agoresolved: handle RRs where we don't have a signer
Lennart Poettering [Tue, 3 Nov 2020 19:34:21 +0000 (20:34 +0100)]
resolved: handle RRs where we don't have a signer

If we encounter an RR that has no matching signature, then we don't know
whether it was expanded from a wildcard or not. We need to accept that
and not make the NSEC test fail, just skip over the RR.

(cherry picked from commit 2f4c2db20ae02d750a6995e0afbff7231cd3a6b7)

4 years agoresolved: put size limit in DnsAnswer size to UINT16_MAX
Lennart Poettering [Tue, 3 Nov 2020 17:31:03 +0000 (18:31 +0100)]
resolved: put size limit in DnsAnswer size to UINT16_MAX

The three answer sections can only carry up to UINT16_MAX entries, hence
put a hard upper limit on how far DnsAnswer can grow. The three count
fields in the DNS packet header are 16 bit only, hence the limit.

If code actually tries to add more than 64K RRs it will get ENOSPC with
this new checking.

And similar to DnsQuestion.

(cherry picked from commit 398c611833584632c6977e2f89746403108637c7)

4 years agoresolved: fix dumping of DnsAnswer objects
Lennart Poettering [Wed, 28 Oct 2020 13:54:12 +0000 (14:54 +0100)]
resolved: fix dumping of DnsAnswer objects

(cherry picked from commit 014e8cc131109e2a1995fcfe0550a77e6a9b42b2)

4 years agoresolved: check return value of memdup() correctly for OOM
Lennart Poettering [Tue, 3 Nov 2020 17:06:47 +0000 (18:06 +0100)]
resolved: check return value of memdup() correctly for OOM

(cherry picked from commit a63a1252b501f6c8b5a011825372977710e88e72)

4 years agoman: remove misplaced comma
Lennart Poettering [Thu, 29 Oct 2020 17:58:04 +0000 (18:58 +0100)]
man: remove misplaced comma

(cherry picked from commit 8b2e362651ca7f921ae9cd46a851f31eb2a7c903)

4 years agounits: unconditionally pull in remote-cryptsetup.target in the initramfs
Jonathan Lebon [Tue, 27 Oct 2020 12:29:38 +0000 (13:29 +0100)]
units: unconditionally pull in remote-cryptsetup.target in the initramfs

[zjs: Replaces #17149.

I took half of the patch in
https://github.com/systemd/systemd/pull/17149#issuecomment-698399194,
hence I'm keeping Jonathan's authorship.

The original reasoning for 6c5496c492a8d74e54d22bf8824160cab1e63c10 was that we
enable remote-cryptsetup.target via presets, and since presets are not used for
the initrd, we need a different target. But since parts of the unit and target
tree are shared between the initramfs and the main system, we can't just create
a separate target for the initramfs. All the targets that depend on this one
would need to be split also. That condition is true for initrd-fs.target, but
not for sysinit.target.

So let's instead just uncoditionally pull in remote-cryptsetup.target in the
initramfs. It should normally be empty, so there should be no impact on boots
that don't have units in the target.

Jonathan's patch used initrd-root-fs.target, this version instead uses
initrd-root-device.target. initrd-root-device.target is ordered before
sysroot.mount, which means that the decrypted devices will be available earlier
too.]

(cherry picked from commit e921ebb57e0bc823ac167801cb5dd5f119f5d585)

4 years agomeson: simplify with_runlevels ternany op usage
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 09:49:11 +0000 (10:49 +0100)]
meson: simplify with_runlevels ternany op usage

(cherry picked from commit d5816b6138be788f3d3ea72359bb28dc239c3235)

4 years agoman: update fedora version
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 15:01:56 +0000 (16:01 +0100)]
man: update fedora version

F33 was released today!

(cherry picked from commit d468c81e268adb2975faff2d8c8587b5640c15ae)

4 years agoman/machinectl: fix pull-raw example
Zbigniew Jędrzejewski-Szmek [Tue, 27 Oct 2020 15:01:16 +0000 (16:01 +0100)]
man/machinectl: fix pull-raw example

We do not allow machine names with "_", so the command would fail as written.
Share the example with the systemd-nspawn page instead.

(cherry picked from commit 5fadff3352cfeb82844b6d475056bb18f2eba0dc)

4 years agoman: correct xdg-autostart-generator path
Josh Brobst [Mon, 26 Oct 2020 22:45:51 +0000 (18:45 -0400)]
man: correct xdg-autostart-generator path

(cherry picked from commit c690bd0bc6b2e07873cb289948ebd4dfa3a7e868)

4 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.

(cherry picked from commit 3045c416e1cbbd8ab40577790522217fd1b9cb3b)

4 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`)

(cherry picked from commit a0223c308e869b51e4142c82f365ceb17b086adb)

4 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)
```

(cherry picked from commit 5a8775bb39526696d01d0e2ffd64e9509644fff1)

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

(cherry picked from commit 0dc9fd56a53ef833fdc5b9b81bc958e7c3dd41a4)

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

(cherry picked from commit 7d1e1afe28d554b2bbf95966990f8e07c361647d)

4 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.

(cherry picked from commit f08a64c5e10aed0a023e85ea664cc2f916fd6a23)

4 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.

(cherry picked from commit b0e3d799891c4633bd2b0d88e4ed2c741bbcd532)

4 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

(cherry picked from commit 6f8ca84c9b64c81add286790a7ffcc2eed569b27)

4 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

(cherry picked from commit fe37e5a5d192ec55f87cd57893688a865b7f72d2)

4 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.

(cherry picked from commit af781878d5986127ca00831c4b524c2b62649823)

4 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.

(cherry picked from commit 80b8c3d7fd90e1e1943873c54dafc9e3b88fca94)

4 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.

(cherry picked from commit 2c91906e25ab0a4caa30f0bfaa1bdff6994cb9d9)

4 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):

(cherry picked from commit 7c5023037815228280dcf461bf9b9f2b3575f600)

4 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.

(cherry picked from commit 67b2edb21f11d7b3bd2b5f8c88ceed4c5194c78a)

4 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.

(cherry picked from commit 333d102c644e7539b071ff5409d5a5e2dab35d65)

4 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
(cherry picked from commit bace688394ab32d182f0624133f5db8367259402)

4 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.

(cherry picked from commit 2ce493672cb9a42ff0960ed127a850a8abfd12d1)

4 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.

(cherry picked from commit 9e1804b24c2fc75cd049b967d0f6411b6b42fecb)