systemd/.git
4 years agocompletion: fix 'unbound variables' errors
Luca Boccassi [Tue, 22 Jun 2021 13:56:19 +0000 (14:56 +0100)]
completion: fix 'unbound variables' errors

Fixes https://github.com/systemd/systemd/issues/19987

(cherry picked from commit 36ec026830c6978be8bd39f3c6d1d7822495e07f)

4 years agocompletion/systemd-delta,-resolve: autocomplete with parameters
Luca Boccassi [Tue, 22 Jun 2021 13:55:22 +0000 (14:55 +0100)]
completion/systemd-delta,-resolve: autocomplete with parameters

(cherry picked from commit 6a0667d2b6f05682c2ced1b53132274049b9ea5c)

4 years agonetworkd: Permit all-zero RoutingPolicyRule prefixes
Hristo Venev [Tue, 22 Jun 2021 09:29:03 +0000 (12:29 +0300)]
networkd: Permit all-zero RoutingPolicyRule prefixes

For example this `From` address range is no longer ignored:

    [RoutingPolicyRule]
    From=0.0.0.0/8

(cherry picked from commit 2e8a32afbc300e0fe6b624174cd3f3d03467fed8)

4 years agotime-util: don't use plural units indiscriminately
Anders Wenhaug [Sun, 20 Jun 2021 19:43:07 +0000 (21:43 +0200)]
time-util: don't use plural units indiscriminately

format_timestamp_relative currently returns the plural form of
years and months no matter the quantity, and in many cases (for
durations > 1 week) this is the same with days.

This patch changes this so that the function takes the quantity into account,
returning "1 month 1 week ago" instead of "1 months 1 weeks ago".

(cherry picked from commit 45eb4d2261ed0d943fd503a6d79ee3b7b7558c09)

4 years agoUpdate systemd-resolved.service.8 help
plattrap [Fri, 18 Jun 2021 00:32:02 +0000 (12:32 +1200)]
Update systemd-resolved.service.8 help

Text currently refers to `/etc/nsswitch.conf` where it should refer to `/etc/resolv.conf`.
This is in the context of defining a nameserver IP and search domains.

(cherry picked from commit e83580bfc6e74359ba242d5176d933ea1e723f89)

4 years agoshell-completion: revert c1072f6473bafa063cbf700c86524083d2857031
Eric Cook [Wed, 16 Jun 2021 19:35:12 +0000 (15:35 -0400)]
shell-completion: revert c1072f6473bafa063cbf700c86524083d2857031
fixing https://github.com/systemd/systemd/issues/19689

(cherry picked from commit 682e043c42fe3ac0fee4ce727458aaeb0e638589)

4 years agocore: Hide "Deactivated successfully" message
Jan Macku [Thu, 27 May 2021 10:25:51 +0000 (12:25 +0200)]
core: Hide "Deactivated successfully" message

Show message "Deactivated successfully" in debug mode (when manager is
user) rather than in info mode. This message has low information value
for regular users and it might be a bit overwhelming on a system with
a lot of devices.

(cherry picked from commit edf2ee22f54005d76b2fb8fdcc9c60974feb88bc)

4 years agoman: fix RFC number and its title
Yu Watanabe [Wed, 16 Jun 2021 01:32:28 +0000 (10:32 +0900)]
man: fix RFC number and its title

(cherry picked from commit f4c48492fe3dfa268b6d2457c9ae425b685ca4e0)

4 years agoseccomp: drop quotactl_path() again from filter sets
Lennart Poettering [Tue, 15 Jun 2021 07:17:12 +0000 (09:17 +0200)]
seccomp: drop quotactl_path() again from filter sets

In the light of https://lwn.net/Articles/859679/ let's drop
quotactl_path() again from the filter set list, as it got backed out
again in 5.13-rc3.

It's likely going to be replaced by quotactl_fd() eventually, but that
hasn't made its way into the tree yet, hence let's not replace the entry
for now.

This partially reverts 34254e599a28529bdb89f91571adeaf7c76d9f43.

(cherry picked from commit 8156422c8f0d94d3444043282f01551084271b22)

4 years agosyscalls: update tables
Yu Watanabe [Tue, 15 Jun 2021 10:07:11 +0000 (19:07 +0900)]
syscalls: update tables

(cherry picked from commit d34e3b76e515af99b97a2b96c799c6889ffe6f71)

4 years agosyscalls: run ninja update-syscall-*
Lennart Poettering [Wed, 9 Jun 2021 09:40:14 +0000 (11:40 +0200)]
syscalls: run ninja update-syscall-*

(cherry picked from commit 5156e6804db9deaf1abe641b0563ee1110b4187c)

4 years agocore/service: fix assertion when Type=dbus but BusName= is not specified
Yu Watanabe [Mon, 14 Jun 2021 18:04:06 +0000 (03:04 +0900)]
core/service: fix assertion when Type=dbus but BusName= is not specified

Fixes #19920.

(cherry picked from commit 0f97b7c338bb7440572c454558efb8fee395896a)

4 years agocore: Avoid spurious realization of unit cgroups
Michal Koutný [Thu, 10 Jun 2021 13:58:43 +0000 (15:58 +0200)]
core: Avoid spurious realization of unit cgroups

Cgroups may be unnecessarily realized when they are not needed. This
happens, e.g. for mount units parsed from /proc/$PID/mountinfo, check

        touch /run/ns_mount
        unshare -n sh -c "mount --bind /proc/self/ns/net /run/ns_mount"
        # no cgroup exists
        file /sys/fs/cgroup/system.slice/run-ns_mount.mount
        systemctl daemon-reload
        # the vain cgroup exists
        file /sys/fs/cgroup/system.slice/run-ns_mount.mount

. (Such cgroups can account to a large number with many similar mounts.)

The code already accounts for "lazy" realization (see various checks for
Unit.cgroup_realized) but the unit_deserialize() in the reload/reexec
path performs unconditional realization.

Invalidate (and queue) the units for realization only if we know that
they were already realized in the past. This is a safe thing to do even
in the case the reload brings some new cgroup setting (controllers, BPF)
because units that aren't realized will use the updated setting when the
time for their realization comes. (It's not even needed to add a code
comment because the current formulation suggests the changed behavior.)

(cherry picked from commit cc815b7fea0ade5331e8dd22ef6b5183edb77608)

4 years agoman: clarify that global search domains apply to global servers, not all interfaces
Zbigniew Jędrzejewski-Szmek [Fri, 11 Jun 2021 07:13:25 +0000 (09:13 +0200)]
man: clarify that global search domains apply to global servers, not all interfaces

Fixes #19257.

(cherry picked from commit dbb3b26f1b347f9d7b9fd56aa4ef4a92253e6f2e)

4 years agosd-event: change ordering of pending/ratelimited events
Lennart Poettering [Tue, 8 Jun 2021 07:07:51 +0000 (00:07 -0700)]
sd-event: change ordering of pending/ratelimited events

Instead of ordering non-pending before pending we should order
"non-pending OR ratelimited" before "pending AND not-ratelimited".
This fixes a bug where ratelimited events were ordered at the end of the
priority queue and could be stuck there for an indeterminate amount of
time.

(cherry picked from commit 81107b8419c39f726fd2805517a5b9faab204e59)

4 years agokbd-model-map: add Latvian keyboard layout mapping
nl6720 [Thu, 10 Jun 2021 06:40:04 +0000 (09:40 +0300)]
kbd-model-map: add Latvian keyboard layout mapping

(cherry picked from commit 9dfb429a44b0c7e4c50f35f888ac8ba3c677a994)

4 years agoman: add note about operation without swap in systemd-oomd
Anita Zhang [Thu, 10 Jun 2021 04:55:38 +0000 (21:55 -0700)]
man: add note about operation without swap in systemd-oomd

(cherry picked from commit c48bc311a57aff76b592cc1569ca758b84438ef5)

4 years agoClarify help information for --global
nerdopolis [Wed, 9 Jun 2021 13:00:02 +0000 (09:00 -0400)]
Clarify help information for --global

(cherry picked from commit 3c3335c7146a43137c46acfa18417cca101cb088)

4 years agoman: add missing settings
Yu Watanabe [Wed, 9 Jun 2021 19:45:54 +0000 (04:45 +0900)]
man: add missing settings

Fixes #19869.

(cherry picked from commit c3006a485c9c35c0ab947479ff1dd7149fda9750)

4 years agoman: merge several settings about netdev
Yu Watanabe [Wed, 9 Jun 2021 19:41:08 +0000 (04:41 +0900)]
man: merge several settings about netdev

(cherry picked from commit 85bc4c080d8264c7d7e233c9e0f304c8d650f126)

4 years agoman: fix missing markdown & minor errors
Peter Morrow [Wed, 9 Jun 2021 17:04:08 +0000 (18:04 +0100)]
man: fix missing markdown & minor errors

In #19771 there were a few missing markdown tags a few style issue.

Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
(cherry picked from commit dbb8b5bcf78a86020287f98a8d96780af0203672)

4 years agojournal: don't try to reuse already calculated hash between files with keyed hash...
Lennart Poettering [Tue, 8 Jun 2021 21:17:53 +0000 (23:17 +0200)]
journal: don't try to reuse already calculated hash between files with keyed hash feature

When suppressing duplicate fields between files we so far tried to reuse
the already known hash value of the data fields between files. This was
fine as long as we used the same hash function everywhere. However,
since addition of the keyed hash feature for journal files this doesn't
work anymore, since the hashes will be different for different files.

Fixes: #19172
(cherry picked from commit 2e1a8a5dab8b5519c079c9bed54fc682aa4095b0)

4 years agojournal: add some careful overflow checking
Lennart Poettering [Tue, 8 Jun 2021 20:14:40 +0000 (22:14 +0200)]
journal: add some careful overflow checking

(cherry picked from commit d8671b1c6f036ce270b9631973314e7de24e74b1)

4 years agoseccomp: add some recently added syscalls to filter groups
Lennart Poettering [Wed, 9 Jun 2021 09:56:00 +0000 (11:56 +0200)]
seccomp: add some recently added syscalls to filter groups

(cherry picked from commit 34254e599a28529bdb89f91571adeaf7c76d9f43)

4 years agojournald: when journald namespace instances log, they can do so safely to the main...
Lennart Poettering [Tue, 8 Jun 2021 17:43:47 +0000 (19:43 +0200)]
journald: when journald namespace instances log, they can do so safely to the main journald instance

Fixes: #18951
(cherry picked from commit e68778a3ac30932a5fa86d08605b423d711ddb7c)

4 years agotest-libcrypt-util: print out default for password settings, run make_salt() a few...
Zbigniew Jędrzejewski-Szmek [Tue, 8 Jun 2021 11:48:10 +0000 (13:48 +0200)]
test-libcrypt-util: print out default for password settings, run make_salt() a few times

Inspired by
https://fedoraproject.org/wiki/Changes/yescrypt_as_default_hashing_method_for_shadow.

(cherry picked from commit 7ff9d99e9e8b75930aa05b45eb21889eac8af014)

4 years agoresolved: fix strange function recursion
Zbigniew Jędrzejewski-Szmek [Tue, 8 Jun 2021 16:17:44 +0000 (18:17 +0200)]
resolved: fix strange function recursion

In dns_server_unlink_marked() and dns_server_mark_all() we done recursively.
People might have dozens of servers defined, and it's better to avoid recursion
when a simple loop suffices.

dns_server_unlink_marked() would only unmark the first marked server.

Fixes #19651.

(cherry picked from commit a77f9dfbaed2e49269b42222da0d1c8680057fa6)

4 years agocore/socket: do not assign another fd to SocketPort which already has a fd on deseria...
Yu Watanabe [Tue, 8 Jun 2021 01:23:47 +0000 (10:23 +0900)]
core/socket: do not assign another fd to SocketPort which already has a fd on deserialization

Otherwise, if a socket address is duplicated, then the previous fd is
closed.

Fixes #19843.

(cherry picked from commit 3da0caf5bbf3c8cab716c4d7adf0eb25907dc951)

4 years agocore: do not serialize mounts and automounts for switch-root
Zbigniew Jędrzejewski-Szmek [Thu, 3 Jun 2021 17:40:01 +0000 (19:40 +0200)]
core: do not serialize mounts and automounts for switch-root

When e.g. tmp.mount is present in the initrd, and we serialize it, switch root,
and deserialize, the new systemd is confused because it thinks /tmp is mounted.
In general, it doesn't make sense to serialize anything that refers to paths in
the old root file system.

This fixes two errors for me:

1. tmp.mount was not mounted properly before local-fs.target. It would be
mounted as some point (I guess when we re-read /proc/self/mountinfo for some
other reason). In effect systemd-tmpfiles-setup.service would see one fs, and
some other units started later a different one. In particular gdm.service would
fail because the pre-created /tmp/.X11-unix with proper permissions would not
exist at time it was started.

2. # systemd[1]: proc-sys-fs-binfmt_misc.automount: Got hangup/error on autofs pipe from kernel. Likely our automount point has been unmounted by someone or something else?
   # systemd[1]: proc-sys-fs-binfmt_misc.automount: Failed with result 'unmounted'.
   # systemd[1]: Mounting proc-sys-fs-binfmt_misc.mount...
   # systemd[1]: Mounted proc-sys-fs-binfmt_misc.mount.
   # systemd[1]: Starting systemd-binfmt.service...
   # systemd[1]: Finished systemd-binfmt.service.
   # systemd[1]: proc-sys-fs-binfmt_misc.automount: Path /proc/sys/fs/binfmt_misc is already a mount point, refusing start.
   # systemd[1]: Failed to set up automount proc-sys-fs-binfmt_misc.automount.
   # systemd[1]: proc-sys-fs-binfmt_misc.automount: Path /proc/sys/fs/binfmt_misc is already a mount point, refusing start.
   # systemd[1]: Failed to set up automount proc-sys-fs-binfmt_misc.automount.
   # systemd[1]: proc-sys-fs-binfmt_misc.automount: Path /proc/sys/fs/binfmt_misc is already a mount point, refusing start.
   # systemd[1]: Failed to set up automount proc-sys-fs-binfmt_misc.automount.
   # systemd[1]: Stopping systemd-binfmt.service...
   # systemd[1]: systemd-binfmt.service: Deactivated successfully.
   # systemd[1]: Stopped systemd-binfmt.service.

I couldn't understand the error here, but in retrospect the first line is entirely
correct: "someone or something else" was the old systemd unmounting the old root.

(cherry picked from commit 755021d43448011ef169f20ec3a08d4e92c824af)

4 years agoman: add details on overriding top level drop-ins
Peter Morrow [Mon, 7 Jun 2021 12:05:06 +0000 (13:05 +0100)]
man: add details on overriding top level drop-ins

When using top level drop-ins it isn't immediately obvious that one can
make use of symlinking to disable a top-level drop in for a specific
unit.

Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com>
(cherry picked from commit 90a404f5d490eb4981851966f6a01f210fd5eb0d)

4 years agoman: explain ConditionNeedsUpdate a bit more
Zbigniew Jędrzejewski-Szmek [Mon, 7 Jun 2021 10:55:55 +0000 (12:55 +0200)]
man: explain ConditionNeedsUpdate a bit more

We were effectively doing all post-upgrade scripts twice in Fedora. We got this
wrong, so it's likely other people will get it wrong too. So let's explain
what is actually needed to make this work, but also when it's not useful.

(cherry picked from commit f75420a43a4dc3c69210f887b38f5df23660ea16)

4 years agoman: update docs on systemd-system.conf logging (LogTime=) (#19846)
alexlzhu [Tue, 8 Jun 2021 06:54:07 +0000 (23:54 -0700)]
man: update docs on systemd-system.conf logging (LogTime=) (#19846)

Updating documentation for systemd to reflect that logging is done in the console.

(cherry picked from commit 9f40351f77963efc304473830a431c424fd976b1)

4 years agoinstall: allow adding plain templates to .wants/ or .requires/
Zbigniew Jędrzejewski-Szmek [Fri, 4 Jun 2021 13:26:37 +0000 (15:26 +0200)]
install: allow adding plain templates to .wants/ or .requires/

Fixes #19437.

As reported in the bug:

> # drkonqi-coredump-processor@.service
>  ...
> [Install]
> WantedBy=systemd-coredump@.service
>
> The plan here is to have a systemd-coredump@ instance start the same %i for
> drkonqi-coredump-processor@. Works perfectly when creating the symlink manually
> ln -sv /usr/lib/systemd/system/drkonqi-coredump-processor@.service
> /etc/systemd/system/systemd-coredump@.service.wants/.

When DefaultInstance is set, we replace template references with
template@default-inst. But in this case we want to create a symlink for the
template name, so that systemd will fill in the instance from the
wanting/requiring unit. This is only possible for those units that actually
have an instance set, so we create the symlink only from .requires/ or .wants
of an instantiated unit (then this specific instance will be used), or a
template (than some instance will be inherited later).

Specifically:
...
[Install]
WantedBy=other@.service, fixed.service
DefaultInstance=inst

→ enable foo@.service creates other@.service.wants/foo@inst.service, and
other@a.service will want foo@inst.service, and other@b.service will want foo@inst.service,
and fixed.service will want foo@inst.service.

Without DefaultInstance,
→ enable foo@.service creates other@.service.wants/foo@.service, and
other@a.service would want foo@a.service, and other@b.service would want foo@b.service,
but enablement fails because no dependency can be created for fixed.service:

  Failed to enable unit, unit fixed.service is a non-template unit.

(cherry picked from commit b0ec372a9665dab6bb00066bc0fed667940f343e)

4 years agoudevadm: fix --tag-match help + description
Lennart Poettering [Mon, 7 Jun 2021 14:08:45 +0000 (16:08 +0200)]
udevadm: fix --tag-match help + description

(cherry picked from commit d27e6aee5050da17bc9531fb62ac11aba4b15ceb)

4 years agocore: disable "update" units in the initramfs
Zbigniew Jędrzejewski-Szmek [Mon, 7 Jun 2021 11:29:19 +0000 (13:29 +0200)]
core: disable "update" units in the initramfs

Initially I wanted to add ConditionPathExists=!/etc/initrd-release in various
units (ldconfig.service, systemd-sysusers.service, systemd-hwdb-update.service,
systemd-journal-catalog-update, systemd-update-done.service), but I think it's
better to just disable the mechanism in the initrd altogether. Initrd images
are put together in a very particular way, and there is not need to do
post-update steps on them. If a unit from some other package winds up in the
initrd, we wouldn't want to invoke it either.

Also, any modifications are ephemeral, so any update would happen on every
use. And finally, initrd images are all about speed, and we shouldn't invoke
any unneeded services.

(cherry picked from commit 294eace024b0e6c34cb64e3bb4f8958bb98ee00b)

4 years agounits: stop automount unit when shutting down
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jun 2021 06:05:03 +0000 (08:05 +0200)]
units: stop automount unit when shutting down

This is currently our only .automount unit. We wouldn't want to trigger it
accidentally during shutdown, so let's stop it too.

(cherry picked from commit dc16846c26287fd2081eb3c4a73487c9b186e2b7)

4 years agopid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes
Franck Bui [Fri, 28 Aug 2020 14:03:06 +0000 (16:03 +0200)]
pid1: only add a Wants= type dependency on /tmp when PrivateTmp=yes

We support that tmp.mount being masked, and this should not be considered an
error.

(cherry picked from commit b2c7d1bbc2243a425d9b825859bbd0647eecd050)

4 years agotmpfiles: do not check if unresolved globs are autofs paths
Zbigniew Jędrzejewski-Szmek [Wed, 2 Jun 2021 13:44:29 +0000 (15:44 +0200)]
tmpfiles: do not check if unresolved globs are autofs paths

With the previous commit, we would not complain about the not-found path, but
the check is still not useful. We use a libc function to resolve the glob, and
it has no notion of treating autofs specially. So we can't avoid touching
autofs when resolving globs. But usually the glob is found in the last
component of the path, so if we strip the glob part, we can still do a useful
check in many cases. (E.g. if /var/tmp is on autofs, something like
"/var/tmp/<glob>" is much more likely than "/var/<glob-that-matches-tmp>/<something>".)

With the system config in F34, we check the following prefixes:

/var/tmp/abrt/* → /var/tmp/abrt/
/run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/*.journal* → /run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/
/var/lib/systemd/coredump/.#core*.21e5c6c28c5747e6a4c7c28af9560a3d* → /var/lib/systemd/coredump/
/tmp/podman-run-* → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /tmp/
/tmp/containers-user-* → /tmp/
/var/tmp/beakerlib-* → /var/tmp/
/var/tmp/dnf*/locks/* → /var/tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /var/tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /var/tmp/
/var/tmp/abrt/* → /var/tmp/abrt/
/var/tmp/beakerlib-* → /var/tmp/
/var/tmp/dnf*/locks/* → /var/tmp/
/tmp/podman-run-* → /tmp/
/tmp/containers-user-* → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /tmp/
/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-* → /var/tmp/
/var/tmp/systemd-private-21e5c6c28c5747e6a4c7c28af9560a3d-*/tmp → /var/tmp/
/var/lib/systemd/coredump/.#core*.21e5c6c28c5747e6a4c7c28af9560a3d* → /var/lib/systemd/coredump/
/run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/*.journal* → /run/log/journal/08a5690a2eed47cf92ac0a5d2e3cf6b0/

(cherry picked from commit bd6d28f21ad212e141b5e74bd0b7ad517f64a711)

4 years agobasic/glob-util: add helper to strip the glob part from a glob
Zbigniew Jędrzejewski-Szmek [Wed, 2 Jun 2021 14:01:40 +0000 (16:01 +0200)]
basic/glob-util: add helper to strip the glob part from a glob

(cherry picked from commit 1e472a6ce4747a1f10954fb239df73580c8e7411)

4 years agotmpfiles: stop complaining about autofs on not-found paths
Zbigniew Jędrzejewski-Szmek [Wed, 2 Jun 2021 13:40:27 +0000 (15:40 +0200)]
tmpfiles: stop complaining about autofs on not-found paths

systemd-tmpfiles[328]: Failed to determine whether '/run/cryptsetup' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/etc/resolv.conf' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/lock/subsys' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/setrans' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/console' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/faillock' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/sepermit' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/motd.d' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/motd.d' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/motd' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/run/nologin' is below autofs, ignoring: No such file or directory
systemd-tmpfiles[328]: Failed to determine whether '/var/lib/systemd/pstore' is below autofs, ignoring: No such file or directory
... and so on and so on.

(cherry picked from commit 16eff8271b402f2705d4329fa4cf5a0435e65996)

4 years agotest: don't expect that clone() always makes it to the kernel
Lennart Poettering [Fri, 4 Jun 2021 08:35:43 +0000 (10:35 +0200)]
test: don't expect that clone() always makes it to the kernel

We might get EPERM on certain clone() flag combinations. Apparently in
Docker for example.

Prompted by: https://github.com/systemd/systemd/pull/19800#issuecomment-854196491

(cherry picked from commit d414f415358846717c2260a1d931fe75d6c5f0e3)

4 years agoman: fix typo
adrian5 [Thu, 3 Jun 2021 19:05:20 +0000 (21:05 +0200)]
man: fix typo

(cherry picked from commit d0fd114929d3c8d5781e10e408ec178722d2f672)

4 years agopid1: don't choke on overly long device paths
Lennart Poettering [Wed, 2 Jun 2021 13:49:10 +0000 (15:49 +0200)]
pid1: don't choke on overly long device paths

This mimics what we do for device units: if there's a device we cannot
synthesize a good swap unit name for, then proceed without failure.

(cherry picked from commit e82c6e8b6230b237c838f053d52baa3297668eaa)

4 years agopid1: downgrade if we can't make sense of the old device on MOVE uevent
Lennart Poettering [Wed, 2 Jun 2021 13:34:34 +0000 (15:34 +0200)]
pid1: downgrade if we can't make sense of the old device on MOVE uevent

If the name of the old device didn#t work for us, we don't have to clean
anything up, since we know for sure that there won't be a device unit
for it. hence downgrade log message about it.

(cherry picked from commit 4d94c74fae21f7ef02a5f14b8296a4522d6b51df)

4 years agopid1: reduce log noise generated by devices with overly long sysfs paths
Lennart Poettering [Wed, 2 Jun 2021 13:29:29 +0000 (15:29 +0200)]
pid1: reduce log noise generated by devices with overly long sysfs paths

This basically does what 2c905207db37c691d4abef868165ad5ea2dd0f4f did
for mount units

Fixes: #16161
(cherry picked from commit ad172d19d5ef8b5a3631a8484cc3d1a28dba26c2)

4 years agoefi: drop glibc header and use pre-defined macros
Yu Watanabe [Wed, 2 Jun 2021 20:55:05 +0000 (05:55 +0900)]
efi: drop glibc header and use pre-defined macros

This reverts 72dc626b3d6905b105ae61ca2c60f51a6f74070e and replace glibc
specific macros with compiler's pre-defined macros.

(cherry picked from commit ffc36c276c47a9b3f21e83947090f11039628676)

4 years agosd-device: do not use ::subsystem member directly
Yu Watanabe [Wed, 2 Jun 2021 07:29:59 +0000 (16:29 +0900)]
sd-device: do not use ::subsystem member directly

The value is set dynamically when sd_device_get_subsystem() is called
first time.

Fixes the following issue:
```
$ build/udevadm test /sys/class/block/dm-1
...
Assertion '_subsystem' failed at src/libsystemd/sd-device/sd-device.c:767, function device_set_subsystem(). Aborting.
Program received signal SIGABRT, Aborted.
```

(cherry picked from commit 2255e8adee37c490bf8cf2daab791b6f746bb0a0)

4 years agovarious: don't say that the timestamp 'changed' on initial load
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jun 2021 15:40:51 +0000 (17:40 +0200)]
various: don't say that the timestamp 'changed' on initial load

I always found this a bit annoying.
With the patch:

$ SYSTEMD_LOG_LEVEL=debug build/udevadm test /sys/class/block/dm-1
...
Loaded timestamp for '/etc/systemd/network'.
Loaded timestamp for '/usr/lib/systemd/network'.
Parsed configuration file /usr/lib/systemd/network/99-default.link
Parsed configuration file /etc/systemd/network/10-eth0.link
Created link configuration context.
Loaded timestamp for '/etc/udev/rules.d'.
Loaded timestamp for '/usr/lib/udev/rules.d'.
...

(cherry picked from commit 0d5a24beaedb161d4f7fe07361d2a5abdbd6e736)

4 years agovarlink: remove duplicated "varlink:" prefix
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jun 2021 08:00:01 +0000 (10:00 +0200)]
varlink: remove duplicated "varlink:" prefix

We had:

systemd[1]: varlink-36: New incoming message: {"method":"io.systemd.UserDatabase.GetMemberships","parameters":{"userName":"gdm","service":"io.systemd.DynamicUser"},"more":true}
systemd[1]: varlink-36: varlink: changing state idle-server → processing-method-more
systemd[1]: varlink-36: Sending message: {"error":"io.systemd.UserDatabase.NoRecordFound","parameters":{}}
systemd[1]: varlink-36: varlink: changing state processing-method-more → processed-method
systemd[1]: varlink-36: varlink: changing state processed-method → idle-server
systemd[1]: varlink-36: Got POLLHUP from socket.
systemd[1]: varlink-36: varlink: changing state idle-server → pending-disconnect
systemd[1]: varlink-36: varlink: changing state pending-disconnect → processing-disconnect
systemd[1]: varlink-36: varlink: changing state processing-disconnect → disconnected

So let's drop the "varlink:" prefix and use capitalized sentences like in other messages.

(cherry picked from commit 953394e3bb1f1ead3c1d80237b97b71835b0755a)

4 years agovarlink: say "varlink:" instead of "n/a:" when no description is available
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jun 2021 07:55:09 +0000 (09:55 +0200)]
varlink: say "varlink:" instead of "n/a:" when no description is available

For new connections, we log something like this:

systemd[1]: n/a: New incoming connection.
systemd[1]: n/a: Connections of user 997: 0 (of 1024 max)
systemd[1]: varlink-22: varlink: setting state idle-server
systemd[1]: varlink-22: New incoming message: ...

This "n/a" is not very pretty, and without context it would be hard to even
figure out this is a varlink connection.

(cherry picked from commit f35e9b101d80c05d5a5eaece6e62e8eeb5743691)

4 years agoudev: ignore the case that the device is already removed
Yu Watanabe [Wed, 2 Jun 2021 10:10:49 +0000 (19:10 +0900)]
udev: ignore the case that the device is already removed

See #19788.

(cherry picked from commit 6be1feb1d7e30c0e7591121b74d4c3c7079de6b3)

4 years agoefi: include endian.h to handle endian correctly
Yu Watanabe [Wed, 2 Jun 2021 06:38:29 +0000 (15:38 +0900)]
efi: include endian.h to handle endian correctly

The macro __BYTE_ORDER__ is defined in endian.h.

(cherry picked from commit 72dc626b3d6905b105ae61ca2c60f51a6f74070e)

4 years agoefi: do not use _STRING_ARCH_unaligned macro
Yu Watanabe [Wed, 2 Jun 2021 06:36:26 +0000 (15:36 +0900)]
efi: do not use _STRING_ARCH_unaligned macro

It is already removed from glibc. See,
https://sourceware.org/git/?p=glibc.git;a=commit;h=16396c41deab45f715ffd813280d9d685b3b281e
https://sourceware.org/git/?p=glibc.git;a=commit;h=09a596cc2cf4e0f9f8e9f3bba4b1a97efcb13bcb

(cherry picked from commit 959ab90bbc08855ad5824efecbc03d37b3f9c982)

4 years agomount: be more descriptive when logging about overly long mount point paths
Lennart Poettering [Tue, 1 Jun 2021 20:26:49 +0000 (22:26 +0200)]
mount: be more descriptive when logging about overly long mount point paths

This is prompted by #17684: let's very explicitly say that the name is
too long for us, and that we'll ignore it.

(cherry picked from commit 3ebc9b9b30b04a3aeec55a11022b337ec5fdb5cf)

4 years agocore: when looping over mount/swap names, continue if we find one which doesn't trans...
Lennart Poettering [Tue, 1 Jun 2021 20:20:55 +0000 (22:20 +0200)]
core: when looping over mount/swap names, continue if we find one which doesn't translate to a valid unit name

(cherry picked from commit 598a6a8491abd311d36b11caf262123fbbffb2c0)

4 years agounit-name: generate a clear error code when converting an overly long fs path to...
Lennart Poettering [Tue, 1 Jun 2021 17:43:55 +0000 (19:43 +0200)]
unit-name: generate a clear error code when converting an overly long fs path to a unit name

(cherry picked from commit 9d5acfab20c5f1177d877d0bec18063c0a6c5929)

4 years agopam: do not require a non-expired password for user@.service
Zbigniew Jędrzejewski-Szmek [Tue, 1 Jun 2021 14:17:16 +0000 (16:17 +0200)]
pam: do not require a non-expired password for user@.service

Without this parameter, we would allow user@ to start if the user
has no password (i.e. the password is "locked"). But when the user does have a password,
and it is marked as expired, we would refuse to start the service.
There are other authentication mechanisms and we should not tie this service to
the password state.

The documented way to disable an *account* is to call 'chage -E0'. With a disabled
account, user@.service will still refuse to start:

systemd[16598]: PAM failed: User account has expired
systemd[16598]: PAM failed: User account has expired
systemd[16598]: user@1005.service: Failed to set up PAM session: Operation not permitted
systemd[16598]: user@1005.service: Failed at step PAM spawning /usr/lib/systemd/systemd: Operation not permitted
systemd[1]: user@1005.service: Main process exited, code=exited, status=224/PAM
systemd[1]: user@1005.service: Failed with result 'exit-code'.
systemd[1]: Failed to start user@1005.service.
systemd[1]: Stopping user-runtime-dir@1005.service...

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1961746.

(cherry picked from commit 71889176e4372b443018584c3520c1ff3efe2711)

4 years agologind-dbus: correctly calculate when to create /etc/nologin file in all cases
Lennart Poettering [Tue, 1 Jun 2021 14:46:40 +0000 (16:46 +0200)]
logind-dbus: correctly calculate when to create /etc/nologin file in all cases

Fixes: #19258
(cherry picked from commit cbb6c000c7f08f97fca28db990cd6aeb7aad7f4a)

4 years agocryptsetup: add missing error branch
Lennart Poettering [Tue, 1 Jun 2021 14:17:24 +0000 (16:17 +0200)]
cryptsetup: add missing error branch

Found in the process of trying to figure out #19193, but I doubt it's
going to fix that.

(cherry picked from commit abc50cf6c8bfc98acc0b5cdc33b731f8fd1c37d6)

4 years agotty-ask-password-agent: mention optional argument in help
Zbigniew Jędrzejewski-Szmek [Sun, 23 May 2021 07:52:56 +0000 (09:52 +0200)]
tty-ask-password-agent: mention optional argument in help

0cf84693877f060254f04cf38120f52c2aa3059c added --console.
6af621248f2255f9ce50b0bafdde475305dc4e57 added an optional argument, but didn't
update the help texts.

Note that there is no ambiguity with the optional argument because no positional
arguments are allowed.

(cherry picked from commit af88c399c0f666abd929b2c906c283731e746458)

4 years agotree-wide: fix typo
Yu Watanabe [Fri, 28 May 2021 10:52:12 +0000 (19:52 +0900)]
tree-wide: fix typo

(cherry picked from commit 48008c1cbf932dbdbe25fa88e9c05bf162bcdae8)

4 years agobasic/unit-file: fix use-after-free
Yu Watanabe [Fri, 28 May 2021 10:48:33 +0000 (19:48 +0900)]
basic/unit-file: fix use-after-free

This fixes a bug introduced by e8630e695232bdfcd16b55f3faafb4329c961104.

Fixes CID#1453292.

(cherry picked from commit 7f1238bd04000f3333e8e2fcb82c9c6e18ee3ffc)

4 years agomeson: Correctly validate that prefix is a child of rootprefix
Peter Kjellerstedt [Thu, 27 May 2021 15:05:34 +0000 (17:05 +0200)]
meson: Correctly validate that prefix is a child of rootprefix

In commit d895e10a a test was introduced to validate that prefix is a
child of rootprefix. However, it only works when rootprefix is "/".
Since the test is ignored when rootprefix is equal to prefix, this is
only noticed if specifying both -Drootprefix= and -Dprefix=, e.g.:

  $ meson foo -Drootprefix=/foo -Dprefix=/foo/bar
  meson.build:111:8: ERROR: Problem encountered: Prefix is not below
  root prefix (now rootprefix=/foo prefix=/foo/bar)

(cherry picked from commit b2d74870711f859ddc72c5756299d2c2f1659468)

4 years agoman: document that it is guaranteed that generated ID128 are never all-zero or all-one
Lennart Poettering [Wed, 26 May 2021 14:07:55 +0000 (16:07 +0200)]
man: document that it is guaranteed that generated ID128 are never all-zero or all-one

This is the case because the ID128 we generate are all marked as v4 UUID
which requires that some bits are zero and others are one. Let's
document this so that people can rely on SD_ID128_NULL being a special
value for "uninitialized" that is always distinguishable from generated
UUIDs.

(cherry picked from commit 6f7530929538b28cb41c289ad9cbced51848fc02)

4 years agoman: fix list of escaped characters in unit names
Lennart Poettering [Wed, 26 May 2021 11:55:37 +0000 (13:55 +0200)]
man: fix list of escaped characters in unit names

The code works differently than the docs, and the code is right here.
Fix the doc hence.

See VALID_CHARS in unit-name.c for details about allowed chars in unit
names, but keep in mind that "-" and "\" are special, since generated by
the escaping logic: they are OK to show up in unit names, but need to be
escaped when converting foreign strings to unit names to make sure
things remain reversible.

Fixes: #19623
(cherry picked from commit aa6dc3ec337b04308a5dfe3b962fa88088b2c82e)

4 years agoman: document udevadm info output prefixes
Lennart Poettering [Wed, 26 May 2021 08:54:57 +0000 (10:54 +0200)]
man: document udevadm info output prefixes

Fixes: #19663
(cherry picked from commit 205013c8002aacd142264e9b4560e86b0ba05830)

4 years agoman: try to clarify that nss-mymachines does not provide name resolution outside...
Lennart Poettering [Wed, 26 May 2021 09:10:18 +0000 (11:10 +0200)]
man: try to clarify that nss-mymachines does not provide name resolution outside its own scope

Fixes: #18229
(cherry picked from commit 74c88a25203e7db293ca7a1c31b789e6558129fd)

4 years agoman: explicit say for priority/weight values whether more is more or less
Lennart Poettering [Wed, 26 May 2021 09:23:06 +0000 (11:23 +0200)]
man: explicit say for priority/weight values whether more is more or less

Fixes: #17523
(cherry picked from commit 7dbc38db509f153256d3a3bfe6cbb26e2731c741)

4 years agocore/service: do not set zero error to log_unit_debug_errno()
Yu Watanabe [Tue, 25 May 2021 20:02:18 +0000 (05:02 +0900)]
core/service: do not set zero error to log_unit_debug_errno()

Fixes #19725.

(cherry picked from commit 95599cacd3944073f7d944a8b3973e1308d1d57f)

4 years agoload-fragment: validate paths properly
Lennart Poettering [Tue, 25 May 2021 15:25:40 +0000 (17:25 +0200)]
load-fragment: validate paths properly

The comment suggests we validate paths here, but we actually didn't, we
only validated filenames. Let' fix that.

(Note this still lets any kind of paths through, including those with
".." and stuff, this is not a normalization check after all)

(cherry picked from commit 108144adea838b281fe1f60dfa75542fe4c82d4b)

4 years agotest-parse-argument: Include signal.h
Khem Raj [Tue, 25 May 2021 01:26:27 +0000 (18:26 -0700)]
test-parse-argument: Include signal.h

Fixes
src/test/test-parse-argument.c:49:29: error: use of undeclared identifier 'SIGABRT'

Signed-off-by: Khem Raj <raj.khem@gmail.com>
(cherry picked from commit 850f0008bff77690e1c9a7265e3900688f0f9825)

4 years agoREADME: point at IRC channel on the new network
Mantas Mikulėnas [Tue, 25 May 2021 10:09:05 +0000 (13:09 +0300)]
README: point at IRC channel on the new network

(cherry picked from commit fb906b00c68e34b8692e207a658bcfa3df62456c)

4 years agosysusers: make sysusers work with dnf --installroot
Zbigniew Jędrzejewski-Szmek [Mon, 24 May 2021 09:34:16 +0000 (11:34 +0200)]
sysusers: make sysusers work with dnf --installroot

This is not very pretty, but the code in fs-util.c already provisions for
missing /proc. We ourselves are careful to set up /proc, but not everybody
is and it is important for sysusers to also work where shadow-utils would:
I would like to replace calls to useradd and groupadd in Fedora systemd rpm
scriptlets with a call to sysusers. It has a number of advantages:
- dogfooding
- we don't need to manually duplicate the information from our sysusers
  files to scriptlets
- a dependency on shadow-utils is dropped, which transitively drops dependencies
  on setup and fedora-repos and bunch of other stuff.

We could try to get 'dnf' and 'rpm --root' and such to be reworked,
but not in any reasonable timeframe. And even if this was done, we'd still
want to support older rpm/dnf versions.

(cherry picked from commit 82855aa610510ddacf72bec03629839a7829e3b7)

4 years agobasic: allow copy_rights() to work without mounted /proc
Zbigniew Jędrzejewski-Szmek [Mon, 24 May 2021 09:33:50 +0000 (11:33 +0200)]
basic: allow copy_rights() to work without mounted /proc

This will be used in sysusers later on.

(cherry picked from commit 0520564dcf3e0adc8eb140f149c93351481c446c)

4 years agonetwork: allow to set Group=0 in [Link] section
Yu Watanabe [Fri, 21 May 2021 05:11:36 +0000 (14:11 +0900)]
network: allow to set Group=0 in [Link] section

Previously, when a link has already in a numbered group, we cannot
remove the link from the group.

This also fixes the range mentioned in the man page.

(cherry picked from commit f0c09831bddb9f335af1b1ebfa6eb8424c2058f3)

4 years agosystemctl: avoid crash when pattern expands to empty unit list
Zbigniew Jędrzejewski-Szmek [Mon, 24 May 2021 20:49:56 +0000 (22:49 +0200)]
systemctl: avoid crash when pattern expands to empty unit list

Fixes #19652.

(cherry picked from commit ffcd68385226d4b499dbff0123271e1d3fb8f516)

4 years agokernel-install: don't erase previous errors if a hook returns 77
наб [Tue, 16 Mar 2021 15:59:07 +0000 (16:59 +0100)]
kernel-install: don't erase previous errors if a hook returns 77

The manpage says that exiting 77 is the same as exiting 0,
then skipping all other hooks, but the behaviour heretofor
was to exit 0, skip all, and behave as if all hooks exited 0

(cherry picked from commit 44230fa2b050d63fce49b4bfbbb93c42940754cc)

4 years agokernel-install/90-loaderentry: use install(1) instead of cp/chown/chmod chains
наб [Tue, 16 Mar 2021 15:08:34 +0000 (16:08 +0100)]
kernel-install/90-loaderentry: use install(1) instead of cp/chown/chmod chains

Also fix typo in error message

(cherry picked from commit 0ad401dc5db9fe66e2b967ce0a00a117fc0e35d8)

4 years agorules.d: Properly quote $env{MODALIAS}
Roshan Shariff [Mon, 24 May 2021 07:30:38 +0000 (01:30 -0600)]
rules.d: Properly quote $env{MODALIAS}

 Add quotes around use of $env{MODALIAS} in rules.d/80-drivers.rules. The
 modalias can contain whitespace, for example when it is dynamically generated
 using device or vendor IDs.

(cherry picked from commit 07c0e5eeaf3183963f4d680555d2289a33735d6e)

4 years agoman: we is OK too -> which is OK too (#19708)
наб [Mon, 24 May 2021 09:39:38 +0000 (11:39 +0200)]
man: we is OK too -> which is OK too (#19708)

(cherry picked from commit 8a2f7b7c9b2c8da33d692cc828a99f84e03d018e)

4 years agounits: make sure importd has CAP_LINUX_IMMUTABLE flag
Lennart Poettering [Fri, 21 May 2021 20:04:33 +0000 (22:04 +0200)]
units: make sure importd has CAP_LINUX_IMMUTABLE flag

Since d8f9686c0f1f276c0a687d9bd69f3adf33f15a95 we use the chattr +i flag
for marking containers in directories as reead-only. But to do so we
need the cap for it, hence grant it.

Fixes: #19115
(cherry picked from commit 86204ae145e38a4557981a92ce91a8ce4318e181)

4 years agounits: skip some units in the initrd
Zbigniew Jędrzejewski-Szmek [Fri, 21 May 2021 08:53:25 +0000 (10:53 +0200)]
units: skip some units in the initrd

I'm working on building initramfs images directly from normal packages, and it
doesn't make sense for those units to be started. Pristine system rpms need to
behave correctly as much as possible also in the initrd, and those units are
enabled by the rpms. There usually isn't enough time for the timer to actually
fire, but starting it gives a line on the console and generally looks confusing
and sloppy. Flushing the journal means that its actually lost, since the real
/var is not available yet.

Another approach would be not enable those units, but right now they are
statically enabled, and changing that would be more work, and doesn't really
seem necessary, since the condition checks are very quick.

Checking for /etc/initrd-release is the standard condition that the initrd
units use, so let's do the same here.

(cherry picked from commit fe7f113c1331e11af4e9f815d7305c8b1b332312)

4 years agotest-env-util: use streq_ptr when comparing directly the result of getenv
Luca Boccassi [Fri, 21 May 2021 12:39:24 +0000 (13:39 +0100)]
test-env-util: use streq_ptr when comparing directly the result of getenv

It might return NULL.

Fixes CID #1453247

(cherry picked from commit 05576809194754989f88f83c7104341c35944546)

4 years agosd-device: use strjoina() more again in sd_device_new_from_subsystem_sysname()
Lennart Poettering [Mon, 10 May 2021 14:41:46 +0000 (16:41 +0200)]
sd-device: use strjoina() more again in sd_device_new_from_subsystem_sysname()

This reverts a major part of: e17c95af8e450caacde692875b30675cea75211f

Using format strings for concatenating strings is pretty unefficient,
and using PATH_MAX buffers unpretty as well. Let's revert to using
strjoina() as before.

However, to fix the fuzz issue at hand, let's explicitly verify the two
input strings ensuring they are valid path names. This includes a length
check (to 2K each), thus making things prettier, faster and using less
memory again.

(cherry picked from commit f5e775973a22e10e0813b56cb3e43d5d415979f7)

4 years agojournal: fix uninitialized variable use
Luca Boccassi [Thu, 20 May 2021 09:35:36 +0000 (10:35 +0100)]
journal: fix uninitialized variable use

If the journal file being processed is archivied, seqnum_id will not be
initialized before being passed on, and coverity complains.
Initialize it to zero.

CID #1453235

(cherry picked from commit 06a368e8198a9cbfad86ba17bba6a76a33f15492)

4 years agonetwork: fix an infinite loop
Yu Watanabe [Thu, 20 May 2021 07:14:17 +0000 (16:14 +0900)]
network: fix an infinite loop

Fixes #19467.

(cherry picked from commit e8f99f4e249916e12c09ee5cc9a108cba6a2b5c0)

4 years agoselinux: invoke selinux_set_callback(3) more type-safe
Christian Göttsche [Fri, 14 May 2021 12:14:25 +0000 (14:14 +0200)]
selinux: invoke selinux_set_callback(3) more type-safe

(cherry picked from commit 57e70396dfdc6835c4a9141d29043e4af407205d)

4 years agoselinux: reload label db on policy load with libselinux 3.2
Christian Göttsche [Fri, 14 May 2021 12:12:39 +0000 (14:12 +0200)]
selinux: reload label db on policy load with libselinux 3.2

Currently the label database is not reloaded with libselinux 3.2 on a
policy reload.

Since libselinux 3.2 avc_open(3) uses the SELinux status page instead of
a netlink socket to check for policy reloads.
The status page is also queried in mac_selinux_maybe_reload().
Thus calls to selinux_check_access(3) might consume an update, queried
by selinux_status_updated(3), leaving mac_selinux_maybe_reload() unable
to detect a policy reload.

Do not use selinux_status_updated(3), use selinux_status_policyload(3)
unconditionally.

Relevant libselinux commit: https://github.com/SELinuxProject/selinux/commit/05bdc03130d741e53e1fb45a958d0a2c184be503

Debian Bullseye is going to ship libselinux 3.1, so stay compatible for
backports.

(cherry picked from commit c46c76881144271b9a18842e086d1318febdb372)

4 years agoman: mention that drop-in files are merged in alphanumeric order
Yu Watanabe [Thu, 20 May 2021 06:55:06 +0000 (15:55 +0900)]
man: mention that drop-in files are merged in alphanumeric order

This addresses the request in https://github.com/systemd/systemd/issues/19467#issuecomment-829332877.

(cherry picked from commit e6655fbe40a9774c8250c1ae8e1c1677aadb98a6)

4 years agoman: document default rlimits
Anita Zhang [Wed, 19 May 2021 07:33:59 +0000 (00:33 -0700)]
man: document default rlimits

Fixes #19645

(cherry picked from commit 1539124b394cec0c8d9d67a9ad6dbd00d085bdde)

4 years agokbd-model-map: add mapping 'es-dvorak'
Franck Bui [Wed, 19 May 2021 08:18:21 +0000 (10:18 +0200)]
kbd-model-map: add mapping 'es-dvorak'

And update test-keymap-util accordingly.

While at it, make sure to use tabs everywhere.

(cherry picked from commit 0495728429096a405b1d2cf1fa283a90c30ebaa9)

4 years agotest: reduce debugging logs in test-event
Yu Watanabe [Wed, 19 May 2021 08:08:59 +0000 (17:08 +0900)]
test: reduce debugging logs in test-event

The logs mostly give no information, but fill CI results.

(cherry picked from commit 834f3ba1a0a6ac8ea4607d380feeeba9d2edd43d)

4 years agosystemctl: re-align colon in status output
Lennart Poettering [Fri, 14 May 2021 16:20:32 +0000 (18:20 +0200)]
systemctl: re-align colon in status output

(cherry picked from commit 1d406dceb769da2123417e6a06c85a99ebead7b1)

4 years agotest/run-unit-tests: make script compatible with python3.6
Zbigniew Jędrzejewski-Szmek [Tue, 18 May 2021 08:21:34 +0000 (10:21 +0200)]
test/run-unit-tests: make script compatible with python3.6

dataclasses were added in python3.7, but bionic has python3.6.
Yes, the new code is a travesty, but it does the job.

Fixes #19640.

(cherry picked from commit 6b908313ef4b57c4b23bb49aec55c84ef981f949)

4 years agotest: combine stdout/stderr from failed test
Dan Streetman [Fri, 30 Apr 2021 00:21:10 +0000 (20:21 -0400)]
test: combine stdout/stderr from failed test

Printing stdout and stderr from a failed test makes it harder to
interpret what the specific problem was; instead let's print out
the lines in order as we got them when the test was run

Also save failed test output to file if ARTIFACT_DIRECTORY is defined

(cherry picked from commit d57e871c60805e3f1f57729ea8022477a611697d)

4 years agoman: only the system manager does not pass vars in ManagerEnvironment=
Anita Zhang [Tue, 18 May 2021 08:23:36 +0000 (01:23 -0700)]
man: only the system manager does not pass vars in ManagerEnvironment=

User managers always pass their environment on to their children.
Make that clear in the description of ManagerEnvironment= which
states that none of those args will get passed to child processes of
service managers.

(cherry picked from commit c54cfef3968613f9e86e76a3337148360e20150e)

4 years agotest: Allow running only a subset of integration tests by setting SELECTED_TESTS
Balint Reczey [Mon, 10 May 2021 18:46:37 +0000 (20:46 +0200)]
test: Allow running only a subset of integration tests by setting SELECTED_TESTS

(cherry picked from commit 39f1bdecc20daae6a659a24408914b78bd65e423)

4 years agomkosi: stop pulling in workaround packages
Zbigniew Jędrzejewski-Szmek [Mon, 17 May 2021 07:59:02 +0000 (09:59 +0200)]
mkosi: stop pulling in workaround packages

libfido2 was pulled in recently [1], and the dependency on libzstd has been
present for a long time.

nano is now the default editor in Fedora [2], but we still want to pull it in
to have an editor in minimal images.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1949505
[2] https://fedoraproject.org/wiki/Changes/UseNanoByDefault

(cherry picked from commit 9578b472f47b733951b9ce107ade36dc33d4fe18)

4 years agoFixed a typo
ei-ke [Sun, 16 May 2021 16:12:12 +0000 (18:12 +0200)]
Fixed a typo

(cherry picked from commit 410477a78f598e753996e3b7ee40176b219b8379)

4 years agonetwork:dhcp4_server_configure returns if not able to get timezone v248.3
tramsay [Mon, 5 Apr 2021 22:12:49 +0000 (17:12 -0500)]
network:dhcp4_server_configure returns if not able to get timezone

When /etc/localtime is a symbolic link pointing to another symbolic
link, get_timezone will return -EINVAL instead of the timezone.
This issue can cause systemd-networkd DHCPServer to fail.

Instead of returning failure, log a warning indicating that that
the timezone will not be sent.

modified:   networkd-dhcp-server.c

(cherry picked from commit 7b5018ca9e6d3279887ec7113818f41d5b831c4d)