1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-21 18:03:41 +03:00

46610 Commits

Author SHA1 Message Date
Alexander Tsoy
737e1c09ca resolved: do not try to copy empty NSEC types bitmaps
dns_resource_record_copy() assumes that NSEC types bitmap is non-empty
which results in a null pointer dereference inside bitmap_copy() in some
cases. Fix this by calling bitmap_copy() conditionally.

(cherry picked from commit 1f00a50c695fe3b55dee38fbd02a902a6c703c87)
(cherry picked from commit fc7be6db131a5062dde76ee7857c2f91e1c402cb)
(cherry picked from commit 3422b16ef9a85ab0a31558a68db67f148961d4a1)
2021-07-20 18:15:14 +02:00
Zbigniew Jędrzejewski-Szmek
ae2ebb8c81 dbus-socket: fix check of Listen* arguments
We checked the wrong field, which was always NULL here, so we would always
reject the assignment. We would also print the wrong string in the error
message:

$ sudo systemd-run --socket-property ListenFIFO=/tmp/fifo3 cat
Failed to start transient socket unit: Invalid socket path: FIFO

(cherry picked from commit aeecab3804aae973577f36880af4b7799e4eb7d5)
(cherry picked from commit 78fb13b38572f6649f1e9822ef6acb8ca4952c12)
(cherry picked from commit 7bdc7ff0bb2d1dde1a81b2cbc76e424d1c50b7aa)
2021-07-20 18:15:10 +02:00
Mike Crowe
9cfda9da3b resolvectl: Only strip ifname suffixes when being resolvconf
Only treat interface names containing dots specially when resolvectl is
pretending to be resolvconf to fix
https://github.com/systemd/systemd/issues/20014 .

Move the special suffix-stripping behaviour of ifname_mangle out to the
new ifname_resolvconf_mangle to be called from resolvconf only.

(cherry picked from commit 7875170f01991a1d28cfe284cc7075630cd69055)
(cherry picked from commit 6ec5680beaa8df4b4b87e9aa614d29561c0e98fe)
(cherry picked from commit 0d18f706a3816464053003b706bb6b2c27de12d1)
2021-07-20 18:15:06 +02:00
Andrea Pappacoda
25f6fbdc3f docs: update autofs Kconfig name
(cherry picked from commit 0c651d32d49e66ea0152eea5e65dd19fe01e7a06)
(cherry picked from commit b6811758288fd53266028885d46f5a5f7d8c49a7)
(cherry picked from commit 7ebb0f11eaae93cbf54af40d66a6cab36ba29d72)
2021-07-20 18:15:02 +02:00
Lennart Poettering
78aaf43b59 sd-journal: add missing bracket in journal verify log message
(cherry picked from commit 6abd991c718dbc1480ab7e71103a8b3e886bd3a3)
(cherry picked from commit 3dabd7f816fa0465c08745ce76f459c4c2a7c3d5)
(cherry picked from commit 912ae8fa70888747273d7226e9cc9a22c962dd8f)
2021-07-20 18:14:57 +02:00
Yu Watanabe
707858990e sd-dhcp-client: tentatively ignore FORCERENEW command
This makes DHCP client ignore FORCERENEW requests, as unauthenticated
FORCERENEW requests causes a security issue (TALOS-2020-1142, CVE-2020-13529).

Let's re-enable this after RFC3118 (Authentication for DHCP Messages)
and/or RFC6704 (Forcerenew Nonce Authentication) are implemented.

Fixes #16774.

(cherry picked from commit 38e980a6a5a3442c2f48b1f827284388096d8ca5)
(cherry picked from commit 3ec1234d1e3195849088b2a3c70fbdefebeadc35)
(cherry picked from commit f53d610144ca729a7e727fc6d3e86e3a4a2a53ed)
2021-07-20 18:14:54 +02:00
Luca Boccassi
054f85328c completion: fix 'unbound variables' errors
Fixes https://github.com/systemd/systemd/issues/19987

(cherry picked from commit 36ec026830c6978be8bd39f3c6d1d7822495e07f)
(cherry picked from commit fe13c0bd40bc5ccdda61b8b474194920543a617b)
(cherry picked from commit 173d07a916f0a76a69b0ef4a26c0df5111cf9c70)
2021-07-20 18:14:49 +02:00
Luca Boccassi
9d1eb34a1d completion/systemd-delta,-resolve: autocomplete with parameters
(cherry picked from commit 6a0667d2b6f05682c2ced1b53132274049b9ea5c)
(cherry picked from commit 0aed618942b0bcc5946d15c91f3518fc5024789a)
(cherry picked from commit b9b3d623fc919757d48f89394c0c325355eefde9)
2021-07-20 18:14:45 +02:00
Anders Wenhaug
800aa7b0a4 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)
(cherry picked from commit e74329ce9fa7ccb025960f9b220dff9e556a80e5)
(cherry picked from commit f3f4ace8ea15ada14495a92b24e207769955b1e5)
2021-07-20 18:14:40 +02:00
Eric Cook
b28c0e61d5 shell-completion: revert c1072f6473bafa063cbf700c86524083d2857031
fixing https://github.com/systemd/systemd/issues/19689

(cherry picked from commit 682e043c42fe3ac0fee4ce727458aaeb0e638589)
(cherry picked from commit 2683e7a16024506b203092208ca1d28b953a111a)
(cherry picked from commit 8e00d92fc27df97c1fe578c35c82e096d0aa1670)
2021-07-20 18:14:23 +02:00
Michal Koutný
9dcdb1aa09 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)
(cherry picked from commit 94f501805db8b272fd2d8d2c4eab0c5291db50e0)
(cherry picked from commit 8712fc5a181d1453840014d765c20c45dbf83b5f)
2021-07-20 18:12:00 +02:00
nl6720
53d186048f kbd-model-map: add Latvian keyboard layout mapping
(cherry picked from commit 9dfb429a44b0c7e4c50f35f888ac8ba3c677a994)
(cherry picked from commit 9f7274055762c8ab31248489e7236c1a51154f62)
(cherry picked from commit 79f50bd61696e41fc45f31996ccafa2d7844cd81)
2021-07-20 18:11:56 +02:00
nerdopolis
5ab6d9fddc Clarify help information for --global
(cherry picked from commit 3c3335c7146a43137c46acfa18417cca101cb088)
(cherry picked from commit 12600fdc423c0d06906204795230314d5dbfde82)
(cherry picked from commit aed5fb1dc7688bb1cc24d9845140782bcf554ba5)
2021-07-20 18:11:52 +02:00
Lennart Poettering
3fe317a933 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)
(cherry picked from commit d804bcadcb448879f31c32363970d9b70b742b9a)
(cherry picked from commit 0f110a75efb789d131ec96cbc4967b7fb1b1d628)
2021-07-20 18:11:47 +02:00
Lennart Poettering
12fa360daa journal: add some careful overflow checking
(cherry picked from commit d8671b1c6f036ce270b9631973314e7de24e74b1)
(cherry picked from commit 84e1819ec104a168f7904134b6212669133c955f)
(cherry picked from commit 03af9b1476ff56c67cb84d14927f1ac7b1a534e3)
2021-07-20 18:11:28 +02:00
Lennart Poettering
31f6ae00f3 seccomp: add some recently added syscalls to filter groups
(cherry picked from commit 34254e599a28529bdb89f91571adeaf7c76d9f43)
(cherry picked from commit daaf9273294f133ab9c970b3172608686de6f86a)
(cherry picked from commit e2950d261dd45fa039ed8f305bf869d65a966cec)
2021-07-20 18:10:28 +02:00
Yu Watanabe
41c4cb6a56 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)
(cherry picked from commit 11acee8a00f1e04952f86088078041849d8f9819)
(cherry picked from commit 1f5600df9cf5c3dcd4b4ff822e2de916d137e5e2)
2021-07-20 18:10:02 +02:00
Lennart Poettering
b04462a747 udevadm: fix --tag-match help + description
(cherry picked from commit d27e6aee5050da17bc9531fb62ac11aba4b15ceb)
(cherry picked from commit 98af14bf53e0aeebf9d88b8f1c202a31ae7bb753)
(cherry picked from commit e8e2c93ed92b6cace68a4fd46bb6d6404a4f1353)
2021-07-20 18:09:54 +02:00
Zbigniew Jędrzejewski-Szmek
a9da581f2d 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)
(cherry picked from commit b1ce5653fac2766c4b4a070fec2126f211d49efa)
(cherry picked from commit 9a8023994ef873dcb2f27ce0a00f7ac9e5248fc2)
2021-07-20 18:09:50 +02:00
Franck Bui
5ba1adeb4f 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)
(cherry picked from commit 6a3a8c70686ab6da80dd87d0bd816a8c18980b71)
(cherry picked from commit 8d8b959cd418f1f91550c7ff5578bfc5af16dbd0)
2021-07-20 18:09:45 +02:00
Zbigniew Jędrzejewski-Szmek
aa262371fc 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)
(cherry picked from commit 399a00be3536cb5fbf3f96058c2a88a2a634d466)
(cherry picked from commit 4a78d0a80fe0eaf8bc0d6579ef96bb31e6afaf48)
2021-07-20 18:09:40 +02:00
Zbigniew Jędrzejewski-Szmek
1162a21a96 basic/glob-util: add helper to strip the glob part from a glob
(cherry picked from commit 1e472a6ce4747a1f10954fb239df73580c8e7411)
(cherry picked from commit 82fcf663cf2cec519185330964c9fdee956047d8)
(cherry picked from commit ae2ff72e34bf21d3d3e70dbfbe585470d18912ed)
2021-07-20 18:09:35 +02:00
Zbigniew Jędrzejewski-Szmek
5b48d5d5ce 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)
(cherry picked from commit a2861e9b9c60bb697854a1aa317c0c365204aab1)
(cherry picked from commit eafd9394b0d4ad6bf5b72f2959a0c54e319189e5)
2021-07-20 18:09:24 +02:00
Lennart Poettering
3e771f4b31 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)
(cherry picked from commit 5fbb002c65c5dbfb9e789caf3bea1dc6e63ee7ae)
(cherry picked from commit 0049b74fb7eeb275992f6a129d90fff82b7f3a9f)
2021-07-20 18:09:19 +02:00
Lennart Poettering
27037969be 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)
(cherry picked from commit 7f035c549fdc0660431d48f1f7dcb7fc41bad22c)
(cherry picked from commit 8a20311c6d145b0d6738a54d827b9df0b34f187e)
2021-07-20 18:08:44 +02:00
Yu Watanabe
b9a223cafa 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)
(cherry picked from commit cab22cae2addcbfaa42621440bd7cb4b1a56c84f)
(cherry picked from commit 1733a1fbb6aa30531445145f2b0e761c8363ba7d)
2021-07-20 18:08:40 +02:00
Yu Watanabe
6c1e9342bd 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)
(cherry picked from commit 93cf1abc60b774eb5c19e327a2079f67e80011df)
(cherry picked from commit 5930ef617350614df5cb71df8c66c54b0b2fa74a)
2021-07-20 18:08:35 +02:00
Zbigniew Jędrzejewski-Szmek
910be672a2 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)
(cherry picked from commit 688b311f5c6c0b20a3811f6a135bf87e11f36502)
(cherry picked from commit c2592a1b81eade894c28dbe874c0ca3d4cb81002)
2021-07-20 18:08:29 +02:00
Zbigniew Jędrzejewski-Szmek
9ae57d005d 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)
(cherry picked from commit 780768328a755057f955f36bac56e1da01e090f0)
(cherry picked from commit b80573f32b6c2c63e3f159d444c1b607401ae695)
2021-07-20 18:08:25 +02:00
Zbigniew Jędrzejewski-Szmek
37f3f07dda 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)
(cherry picked from commit b5691dd6f83d99e0588532940c1c24e5647662f7)
(cherry picked from commit f6203648f2e1231549da61ba63a3c92b398411b4)
2021-07-20 18:08:24 +02:00
Yu Watanabe
7fd086cc47 udev: ignore the case that the device is already removed
See #19788.

(cherry picked from commit 6be1feb1d7e30c0e7591121b74d4c3c7079de6b3)
(cherry picked from commit b4ad8b418f65e8fbe8719344415758e6e62602f6)
(cherry picked from commit 20d8495281acfe0f202bb2fed0e1acb3e0d7438d)
2021-07-20 18:08:15 +02:00
Yu Watanabe
22fa169f18 efi: include endian.h to handle endian correctly
The macro __BYTE_ORDER__ is defined in endian.h.

(cherry picked from commit 72dc626b3d6905b105ae61ca2c60f51a6f74070e)
(cherry picked from commit 326e3ae2af0254c0d489ee053610fbbdc60a1f8b)
(cherry picked from commit cebb255e6afec63bcd6ba9ec1d2c9718b54ffc8a)
2021-07-20 18:08:10 +02:00
Yu Watanabe
d6ba281373 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)
(cherry picked from commit d31347080272128e9b5c5f922a3f098ba62b059e)
(cherry picked from commit dcc23771b0c9f05330f14fe995a96964d3672004)
2021-07-20 18:08:06 +02:00
Lennart Poettering
b6d993ff1a 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)
(cherry picked from commit 264f179b692843fbb5de2e111b85e6e8bb837e68)
(cherry picked from commit 71b879ad15cbd5d76d1006cce44757de780165cd)
2021-07-20 18:08:02 +02:00
Lennart Poettering
8fee2e617f 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)
(cherry picked from commit f564342089ab56e44bf7240d19b860f2ed003e58)
(cherry picked from commit ed9ab6a264d3dfb344b233e32269d46ae83f75d3)
2021-07-20 18:07:57 +02:00
Lennart Poettering
7b6b7abf46 unit-name: generate a clear error code when converting an overly long fs path to a unit name
(cherry picked from commit 9d5acfab20c5f1177d877d0bec18063c0a6c5929)
(cherry picked from commit 1579dce2c2a162bb09afb9a8a46fd4f7e8fbf1d5)
(cherry picked from commit 0488b743e9c6ab1e885933eebda4ba9232003a2a)
2021-07-20 18:07:52 +02:00
Zbigniew Jędrzejewski-Szmek
1f594aa20b 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)
(cherry picked from commit 0af5a8921f6019dc35057482711f0fbe347b0c06)
(cherry picked from commit 050dd460e83ca10b56b11533a60b6a5f40d42203)
2021-07-20 18:07:45 +02:00
Lennart Poettering
3acf1d976b logind-dbus: correctly calculate when to create /etc/nologin file in all cases
Fixes: #19258
(cherry picked from commit cbb6c000c7f08f97fca28db990cd6aeb7aad7f4a)
(cherry picked from commit e55a705af5bfe53c754727138455599798a573bf)
(cherry picked from commit 270716d95ad5c4838de8d344400e2f234ab30e29)
2021-07-20 18:07:39 +02:00
Yu Watanabe
d986423249 basic/unit-file: fix use-after-free
This fixes a bug introduced by e8630e695232bdfcd16b55f3faafb4329c961104.

Fixes CID#1453292.

(cherry picked from commit 7f1238bd04000f3333e8e2fcb82c9c6e18ee3ffc)
(cherry picked from commit 218117da2a8b4f1eccfc61353fdbe01219696378)
(cherry picked from commit 5c86f9e0381dadc06650492cd68b28ed800d376d)
2021-07-20 18:07:31 +02:00
Yu Watanabe
9702878676 core/service: do not set zero error to log_unit_debug_errno()
Fixes #19725.

(cherry picked from commit 95599cacd3944073f7d944a8b3973e1308d1d57f)
(cherry picked from commit 1af2dba1d3d2d6ffba6816d8ff59eb034074cc18)
(cherry picked from commit 13426b7801116cd706b0b0fed8237c6e43ad9dfd)
2021-07-20 18:07:12 +02:00
Mantas Mikulėnas
69b747dd97 README: point at IRC channel on the new network
(cherry picked from commit fb906b00c68e34b8692e207a658bcfa3df62456c)
(cherry picked from commit 2aefb7beff0601c8785625784ace2f0d93214321)
(cherry picked from commit 6eeeaa533ad4aa86540af2abb79798c45f05370d)
2021-07-20 18:06:57 +02:00
Lennart Poettering
a49997bb1d systemctl: re-align colon in status output
(cherry picked from commit 1d406dceb769da2123417e6a06c85a99ebead7b1)
(cherry picked from commit 409c6a89e475e05776003cd43cb032050b6efa1e)
(cherry picked from commit ff298cffcce97c8976a0912ec518a7ffbc6425e2)
2021-07-20 18:06:34 +02:00
Zbigniew Jędrzejewski-Szmek
f8cb5d4d5f systemctl: avoid crash when pattern expands to empty unit list
Fixes #19652.

(cherry picked from commit ffcd68385226d4b499dbff0123271e1d3fb8f516)
(cherry picked from commit 9a24f5edcc1c16f2afaa943dfd39f413322a5a0a)
(cherry picked from commit ec52cddcce818b0033469ebbe40a500cd83d2664)
2021-07-20 18:05:47 +02:00
наб
a859aec05f 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)
(cherry picked from commit 954f6ae49a6dc8a7994ff7ca3c86551a8748c2d1)
(cherry picked from commit 68ccbef7f0c6b6a81e5d8ad21f1ab9618e3000c5)
2021-07-20 18:04:23 +02:00
Roshan Shariff
42dd7d509d 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)
(cherry picked from commit 1151d6f55dd5cc4925a52e0faeca98963114df9b)
(cherry picked from commit 219710d990e5ea8add3819aa239e15d13e518b04)
2021-07-20 18:04:19 +02:00
Luca Boccassi
88fc50db08 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)
(cherry picked from commit b97c113704056c386574c047928e410c6c1e89ae)
(cherry picked from commit f7b76d56968811b5ee7951f9d29261748c81a337)
2021-07-20 18:04:14 +02:00
Yu Watanabe
70ff91375f network: fix an infinite loop
Fixes #19467.

(cherry picked from commit e8f99f4e249916e12c09ee5cc9a108cba6a2b5c0)
(cherry picked from commit b234ee7859de556c272c36fc691cee4cb08f7230)
(cherry picked from commit a4a7a90a79b6bb379ac8bb9c637e5df3d18b9341)
2021-07-20 18:03:56 +02:00
Franck Bui
c44e740133 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)
(cherry picked from commit 644a8ca3e026d22e71cb1f37034e6713bb8ee982)
(cherry picked from commit b47bc5bd13e79dde173740d894c6d06d596c1003)
2021-07-20 18:03:42 +02:00
ei-ke
8fa9e11e55 Fixed a typo
(cherry picked from commit 410477a78f598e753996e3b7ee40176b219b8379)
(cherry picked from commit d6f6f9e578ed120222e84d2ebfda5e37d6827e58)
(cherry picked from commit 1c6da0da3f428989d26d83a12b36710fd47984aa)
2021-07-20 18:03:28 +02:00
Lennart Poettering
37229afc8c dns-query: export CNAME_MAX, so that we can use it in other files, too
Let's rename it a bit, to be more explanatory while exporting it.

(And let's bump the CNAME limit to 16 — 8 just sounded so little)

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

(cherry picked from commit e0ae456a554d0fce250f9a009c561b97f20c41f8)
(cherry picked from commit 0e1e59674da060af421aed4f2a6a97b899e20054)
v246.14
2021-05-15 21:20:58 +02:00