1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-03-10 00:58:20 +03:00

46547 Commits

Author SHA1 Message Date
Lennart Poettering
15ccdae7a0 nss-systemd: reset the right field
(cherry picked from commit 1fdfca4da739f47516513afc66d4c7008c9badfd)
(cherry picked from commit 18babc7b290de4c0108b2fe39400c3e9c471ef67)
(cherry picked from commit c3dfbd10da31324158363d6da50345ece24ccaf5)
2021-05-15 20:27:22 +02:00
Franck Bui
fe260f4d67 system-conf: drop reference to ShutdownWatchdogUsec=
Commit 65224c1d0e50667a87c2c4f840c49d4918718f80 renamed ShutdownWatchdogUsec
into RebootWatchdogUsec but left a reference of ShutdownWatchdogUsec in
system.conf.

(cherry picked from commit 45b1fc3a88b2f5102ecabfabdf0ee4f175aecd64)
(cherry picked from commit 54b5a1b21b69d674e55b69be79ef86e5b2215406)
(cherry picked from commit d582e0ca0bd8408449ec5408e7a4a644404fae30)
2021-05-15 20:27:19 +02:00
Zbigniew Jędrzejewski-Szmek
2a510add60 core/service: also reject deserialized commands with no argv[0]
I'm pretty sure that bad things would happen later on.

(cherry picked from commit 90204792461030dbc8645d8511e7ac8d1b4f1ca2)
(cherry picked from commit d113fd4e0756b1b6f5543a47d0943af4564293ff)
(cherry picked from commit 6c177c530027262aa87cfb026dd5537859d2ff8e)
2021-05-15 20:27:04 +02:00
Zbigniew Jędrzejewski-Szmek
6282413f78 core/service: fix deserialization of non-absolute commands
We'd fail with:
Apr 23 10:58:26 systemd[1]: Deserializing state...
Apr 23 10:58:26 systemd[1]: testsuite-01.service: Failed to parse serialized command "ExecStart 0 sh "sh" "-e" "-x" "-c" "systemctl --state=failed --no-legend --no-pager >/failed ; systemctl daemon-reload ; echo OK >/testok"": Invalid argument
Apr 23 10:58:26 systemd[1]: testsuite-01.service: Reinstalled deserialized job testsuite-01.service/start as 209

This was missed in 5008da1ec1, and apparently nobody noticed until now :(

(cherry picked from commit 1a128a468ddd1070651478c36eae76e31f580b67)
(cherry picked from commit 27606d5448dcaef17d256ced7e89b963a13cfec4)
(cherry picked from commit 3b7a2cf026b6c810dde54683561dbc5ee31c59c1)
2021-05-15 20:27:01 +02:00
Yu Watanabe
1f6aaced6f network: update comment and log message
After 4b30f2e135ee84041bb597edca7225858f4ef4fb, reading stable_secret
sysctl property fails with -ENOMEM, instead of -EIO.
This is due to read_full_virtual_file() uses read() as the backend while
read_one_line_file() uses fgetc(). And each functions return different
error on fails.

Anyway, the failure is harmless here. So, the log message and comment is
updated.

Closes one of the issues in #19410.

(cherry picked from commit 0e27527170aa0179f2a4b3b55b78ddc049f815b9)
(cherry picked from commit 2417e9b59aa654e4b3def3399576ebbc2cdd7c95)
(cherry picked from commit 0d80d62a87862f46f62c6c17ad6d682ad6228049)
2021-05-15 20:26:58 +02:00
Yangyang Shen
75a1ee74ec journald: enforce longer line length limit during "setup" phase of stream protocol
This PR made modification on Lennart Poettering's basis. Fix the LineMax's function failure problem.

Signed-off-by: Yangyang Shen <shenyangyang4@huawei.com>
(cherry picked from commit 80e9720616df0eeaba75874fd86fbfbe8b7a03a7)
(cherry picked from commit 9d5c5e4fab6e4816babbd4b74787b43fa5e4440a)
(cherry picked from commit 655ba5aade32e49a73596fcfb2bbd1e787bce235)
2021-05-15 20:26:06 +02:00
Lennart Poettering
ac44b63ef1 sd-device: use right clock when comparing initialization usec
we actually use CLOCK_MONOTONIC for the timestamp, hence when
comparing/subtracting it from the current time, also use
CLOCK_MONOTONIC.

(cherry picked from commit 02ef01ade3b16c05dfc8698181d7f562f4934ef3)
(cherry picked from commit 873ad71291e942054dd96ca1a9000cc98f21487a)
(cherry picked from commit 4cf613b3f92ed541ff289c037febbeb80d5742b9)
2021-05-15 20:25:58 +02:00
Lennart Poettering
8d5b7b955a sd-device: use right type for usec_initialized
(cherry picked from commit a156eb89c827206ee5b51d53016ba63be0c90449)
(cherry picked from commit d6b0efcdd83a937363267ed751fd9a1085505394)
(cherry picked from commit 434d22b7c6ebb0c2f9eb33afa28cb4d2f744adea)
2021-05-15 20:25:55 +02:00
Yu Watanabe
cd6fcc4962 wifi-util: do not set zero errno to log_debug_errno()
(cherry picked from commit 66205cb3f597e43c8446d122fa4cc849c4f101d7)
(cherry picked from commit 8eaf2da0f6c9fbea42d44343c30361dcf79702bf)
(cherry picked from commit e3640b026a7b26931d7760b0cec5fb51f65797bf)
2021-05-15 20:25:49 +02:00
Peter Hutterer
b3b0155479 shell-completion: use base.lst, not xorg.lst
Since 2005 xorg.lst has been the legacy symlink to the real file base.lst.

(cherry picked from commit 7a4afd3a15f201a2230dce1f640fc37d18bc39ac)
(cherry picked from commit 6b5621353981ee36280e6c4f08540fc24c19ca26)
(cherry picked from commit f66253f0e3bca4bb5e3a4ce9a54c3f1de7d3e886)
2021-05-15 20:25:24 +02:00
Jason Francis
b0a888d937 sd-login: fix wrong constructor used in sd_login_monitor manpage example
(cherry picked from commit 941c5275eaaf8d22915eb876045d2173bdbb7d4c)
(cherry picked from commit 17cb088d6dd3ac940a299c6c7201085252f1367d)
(cherry picked from commit b52a4350de4931603ab45234614fe1fe17ebdf6a)
2021-05-15 20:25:21 +02:00
Jason Francis
2618ec8e46 sd-login: correct prototype of sd_peer_get_cgroup
(cherry picked from commit a8310e39e996b9b5f63d897879aecf8988261bdb)
(cherry picked from commit fa7f835f79d4da8ee6d7403be43a0ba4d24b9fb2)
(cherry picked from commit 60d3eeef5e803997e1c9356d543d460a61f1b4dc)
2021-05-15 20:25:18 +02:00
Zbigniew Jędrzejewski-Szmek
9cd02cbcb7 journald: fix %m usage
(cherry picked from commit cf5a2ee82517429a34d9f5bef853cabe055e3e59)
(cherry picked from commit 4186be9a05e162c04d1b72a9ba95224c0a9aa2c3)
(cherry picked from commit 58f2b2bd2e7e8ec9c08df6c90bb633e939b80392)
2021-05-15 20:24:58 +02:00
Zbigniew Jędrzejewski-Szmek
bc0336f378 shared/module-util: fix errno value passed to log function
If r == 0, no harm done. But if r > 0, this would be interpreted as an
errno value, wrongly.

(cherry picked from commit a2eb2267e44580446ecad37e7206e729cfd78155)
(cherry picked from commit e70a773f85ceb64435de3d47c12b07c08605f591)
(cherry picked from commit c6d3623e9e53cc4c1b3e05fa665d2c8791212b74)
2021-05-15 20:24:55 +02:00
Zbigniew Jędrzejewski-Szmek
31589c6b36 partition, random-seed, logind: fix log messages with %m
We would print "...: Success", which is not too terrible, but not pretty
either.

(cherry picked from commit 111a3aae71fa019710216cc5b7aa95b7c8db0937)
(cherry picked from commit c032a26df67903e0c65150b5cc68ade35aa47c03)
(cherry picked from commit 7b535fcda495ca8a73133526484340925d754bf6)
2021-05-15 20:24:52 +02:00
Zbigniew Jędrzejewski-Szmek
16501c1c70 sd-device: improve log message and tweak style
We shouldn't say the attribute is missing right after ruling out ENOENT.

(cherry picked from commit aca591ac55e5ee364905aec975388c5e30d0476c)
(cherry picked from commit e31914aa17df889ae10f0964a8bbc8c00e0f045b)
(cherry picked from commit 645c85022ac6c035ccdd0590db687c5be1147e85)
2021-05-15 20:24:48 +02:00
Luca Boccassi
dde6f2081f test: use systemd-run --wait in TEST-44-LOG-NAMESPACE
The test appears to be occasionally failing. It uses systemd-run to echo
'hello world' into a namespaced journal and then uses journalctl to look for it,
but it doesn't wait.
In the failed runs it can't find it, but the automated journal dump shows
the message at the end.

Use --wait to avoid races.

(cherry picked from commit cf9844ffabd7fd51f22e729692b79d55cd7bdd76)
(cherry picked from commit 2c17e13ae48b94a0fd02c7746d723b26a0f3dc65)
(cherry picked from commit bed66a8d19566adf94386482fe5ee0216b66f848)
2021-05-15 20:24:44 +02:00
Zbigniew Jędrzejewski-Szmek
62aca69360 libsystemd-network: fix dhcp option buffer confusion
We were writing to the wrong buffer with a wrong offset :(
Bug present since the original introduction of the code in
04b28be1a306fd2ba454d3ee333d63df71aa3873.

(cherry picked from commit 828b603a791edd04a5c3603456aa8caca44ce67e)
(cherry picked from commit cd1fc467f72e607bcd2464651b68f31bd2a8791a)
(cherry picked from commit 3def84156c37b9a873c29bb93afe5ddaa341c698)
2021-05-15 20:24:40 +02:00
Sevan Janiyan
4a4b77d357 meson.build: typo
(cherry picked from commit d5b3e5104448ebfecd334c26dbdd3a8274440b1e)
(cherry picked from commit 812384ce37acd909d70f9295a3b0fce98c8cf840)
(cherry picked from commit dfe66e7b9778062a879511facb0da602f2ffa012)
2021-05-15 20:24:35 +02:00
Yu Watanabe
c7c0af303c network: add missing default setting in networkd.conf
(cherry picked from commit 6bfadad9bb6eaf614da92eba0a9b6243e8645018)
(cherry picked from commit ee24f9346630b6d59e88ef0989f943444e752569)
(cherry picked from commit 5d91d5a61a88d4b5a2b92d5f665a5dd5dd99d6bd)
2021-05-15 20:24:26 +02:00
gaoyi
f48fb2bb1e udev: delete useless codes
It seems no one will touch queue.bin

(cherry picked from commit 993eb00016a75cf085eed85cf626a6995e96ab3d)
(cherry picked from commit a511010f380397e8bb08816288e31b1666dc11b9)
(cherry picked from commit 74ae332b68785b878b25facac43d166d1c85e575)
2021-05-15 20:24:20 +02:00
Francois Gervais
b31844123e load-fragment: parse specifiers in CPUAffinity= (#19281)
(cherry picked from commit 54cfe9a75f0e84d0604d39b87b1d919542336809)
(cherry picked from commit bf3bd598136397b5371188bcdec0127e56a1db9a)
(cherry picked from commit 595b1cefbb71397ba08b770136e461022d774d1f)
2021-05-15 20:24:14 +02:00
Zbigniew Jędrzejewski-Szmek
a6dd369b7f meson: do not fail if rsync is not installed with meson 0.57.2
https://github.com/mesonbuild/meson/issues/8641

Our CI started to fail. Even if the change is reverted in meson,
we need a quick workaround here.

(cherry picked from commit 7c5fd25119a495009ea62f79e5daec34cc464628)
(cherry picked from commit f6435a07c1ca4b895573eba4a64dcf4bef3fb92b)
(cherry picked from commit f4a1812f95d0c215ef3a9fec24e055bc976c41f1)
2021-05-15 20:24:06 +02:00
Julia Kartseva
8e6acd9a8a bpf-firewall: attach with BPF_F_ALLOW_MULTI if kernel supports
Reduced version of [0].
Use BPF_F_ALLOW_MULTI attach flag for bpf-firewall if kernel supports
it.

Aside from addressing security issue in [0] attaching with 'multi'
allows further attaching of cgroup egress, ingress hooks specified by
BPFProgram=.

[0] 4e42210d40

(cherry picked from commit a442ccb4ebdbc3a9ff9d4504eb9724092149fd42)
(cherry picked from commit 0af3810d4b1c8bb4f0683758f47e042e8cb76972)
(cherry picked from commit baff489b82bb33c1b13249993f940721fef7671e)
2021-05-15 20:23:53 +02:00
gaoyi
3aafd07d39 man: fix discriptions for --exec-delay
There are two ambiguity in the original description:
1. It will delay all RUN instructions, include builtin.
2. It will delay before running RUN, not each of RUN{program} instructions.

(cherry picked from commit 45f5efdea7e5e94bd47fc24b9bd404c77b5771a0)
(cherry picked from commit cb92f5601ad169e8f86a61319b73a8fd9e19950b)
(cherry picked from commit 58a56b6a14d5cc9b7ecdd397d7ab6b76170fad08)
2021-05-15 20:23:47 +02:00
Zbigniew Jędrzejewski-Szmek
fee5ae3e5f TEST-22-TMPFILES: add reproducer for bug with X
(cherry picked from commit 1672be86021b5ae8e80d095409a4fffcba7cbb75)
(cherry picked from commit 280b157fca7b44b19ec0067ebb88d2c16df1b6e1)
(cherry picked from commit 2fb262636cdf0440fd612ca2a4b6afad68bf655a)
2021-05-15 20:23:26 +02:00
Zbigniew Jędrzejewski-Szmek
11dcff6efe man: fix quickhelp listing in tmpfiles.d(5)
Unlike many other small/big letter combos, this one has the recursive
version attached to the lowercase letter.

(cherry picked from commit 3dd61ee5be0291380d341571e138713d2f89125a)
(cherry picked from commit ba8032c414dcf7c627cee3e979654bc5e294def3)
(cherry picked from commit ebe12d8493e2e8d292e8f7b8ac2b0987d1a815d6)
2021-05-15 20:23:21 +02:00
Masahiro Matsuya
72e945946d tmpfiles: use a entry in hashmap as ItemArray in read_config_file()
[zjs: squash commits and use size_t as appropriate.

Bug seems to have been introduced in 811a15877825da9e53f9a2a8603da34589af6bbb.
Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1944468.]

(cherry picked from commit bec890e3cd6dac249cb12ce9430fdb78b6cf546b)
(cherry picked from commit b266eeb0aee24a0c5868c3a46066c0329b2d1141)
(cherry picked from commit dbfb698668578da0b53812c6ee5b4d410b5dc546)
2021-05-15 20:21:50 +02:00
Luca Boccassi
4d3df24895 mkosi.arch: add rsync build dependency
Program rsync found: NO

man/meson.build:187:0: ERROR: Program 'rsync' not found

(cherry picked from commit a7b7cab66df8c0a701bc6da3a309fa80c90a880b)
(cherry picked from commit dca590b4b54b3f88919d78645e8c9a4febede850)
(cherry picked from commit 651e479e29c470663d8862344c0c4239d69a9d26)
2021-05-15 20:18:14 +02:00
Oleg Popov
527d07e3fa Extend characters set for PKCS11 URI
There are tokens with dots (and other symbols) in PKCS11 URI:

pkcs11:model=Rutoken%20ECP;manufacturer=Aktiv%20Co.;serial=3xxxxxxb;token=livelace
pkcs11:model=PRO;manufacturer=Aladdin%20R.D.;serial=CC62FB25;token=val%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00;id=%33%32%31%30%33%61%36%37%36%65%32%34%35%62%32%31;type=private
(cherry picked from commit b204bdd4ccae2c76422e7383bd51b664d7e2cfd3)
(cherry picked from commit 27eec0eb045b62b19657b7662dd10594362515a2)
(cherry picked from commit 9eb7e9808f565b727f2a12d02fb87e55534466b6)
2021-05-15 20:18:00 +02:00
Lennart Poettering
1fe2a8ccc2 resolved: add RFC 8375 "home.arpa" to list of default NTA
RFC 8375 introduced "home.arpa" as special TLD for home networks. Let's
hence add it to our default list of NTAs.

(cherry picked from commit 1065501406d6ca608444c3bd19db546e82009450)
(cherry picked from commit 8d55dcd0b89c21538ce388da559b0b4b87be7f20)
(cherry picked from commit c616c2121465d38f894cc2c03b6ef2127d9aab56)
2021-05-15 20:17:55 +02:00
gaoyi
c22556f7db gpt-auto-generator: don't generate systemd-cryptsetup@.service when --Dlibcryptsetup=false
(cherry picked from commit 5b1375035b617bbee8b22a997be527d1b7a392f8)
(cherry picked from commit aa6b8490870d3a793becf41cc63479043a934a73)
(cherry picked from commit a4b1e176b264f1dc67ef4422d065ae95ecb8c89e)
2021-05-15 20:17:37 +02:00
Lennart Poettering
60327e0a52 proc-cmdline: allow backslash escapes when parsing /proc/cmdline
So far when parsing /proc/cmdline we'd consider backslashes as
mechanisms for escaping whitepace or quotes. This changes things so that
they are retained as they are instead. The kernel itself doesn't allow such
escaping, and hence we shouldn't do so either (see lib/cmdline.c in the
kernel sources; it does support "" quotes btw).

This fix is useful to allow specifying backslash escapes in the "root="
cmdline option to be passed through to systemd-fstab-generator. Example:

    root=/dev/disk/by-partlabel/Root\x20Partition

Previously we'd eat up the "\" so that we'd then look for a device
/dev/disk/by-partlabel/Rootx20Partition which never shows up.

(cherry picked from commit d997861ea7dae633174cd80ab55552c020526b62)
(cherry picked from commit 0e6d3243ad3c5ae719c23e14b159c27344523583)
(cherry picked from commit 634c0e5e1034b58ef99bc8729db7c68219c947ab)
2021-05-15 20:17:32 +02:00
Sibo Dong
1e198d7617 bash-completion: localize words and cword variables
The words and cword variables are not localized in all Bash completion
scripts that call _init_completion.

cur, prev, words, and cword (and split if using the -s flag) are all
variables that should be localized in Bash completion scripts before
calling _init_completion (even if they don't otherwise appear in the
calling script). This is done for cur and prev, but not for words and
cword. Letting words and cword remain unlocalized may clobber variables
the user is using for other purposes, which is bad.

This issue can be resolved by declaring words and cword as local
variables.

Resolves #19188.

(cherry picked from commit f34173a048061b3f7e551e9a7c04f00e5a106fac)
(cherry picked from commit 90aee910f6e6d54e78651ee8a9d95823b88b527d)
(cherry picked from commit d62208c253daa55128adfa4f43886298bea28b01)
2021-05-15 20:16:50 +02:00
Frantisek Sumsal
2e2459e873 fuzzer: add a test case for #19178
(cherry picked from commit 080a602771ef51230a51f247b8b728d0483e2f28)
(cherry picked from commit 98365420f25a3b0fdc01937b767e0ef530d2dce7)
(cherry picked from commit 08f829762736f8d43a219ebd212ab9dd9b5a662b)
2021-05-15 20:16:31 +02:00
Carlo Teubner
0aeab2639a docs: use current spelling "macOS" not "OS X" etc.
(cherry picked from commit 6d3831cee58dcbdb7ea8a86ca621fec38f5b279b)
(cherry picked from commit b819fff474661d6d43ee47b41031462f9c0a9af4)
(cherry picked from commit 5854761fc553855a0796d873ac1891d928c7ab45)
2021-05-15 20:16:27 +02:00
Joerg Behrmann
1f31fdff01 systemd-notify: Fix return value of --booted
(cherry picked from commit 8ab34a49dbf75fd731973359a6f24c212682f479)
(cherry picked from commit 480fd82088ad6e44644c568fe37c5d945738a61b)
(cherry picked from commit cf76ba7b6eb189fe4e5c7f57afc35e06a0179af3)
2021-05-15 20:16:24 +02:00
Zbigniew Jędrzejewski-Szmek
12542b5d10 shared/conf-parser: fix unitialized variable
Introduced in 4f9ff96a55187927a4164a19df580329f4c6522b.

(cherry picked from commit 9fd8d678ba41ad39348758d5d329fe8d4451813f)
(cherry picked from commit 5ea1cd471149acdce4588a5ca7071d8adbd26adc)
(cherry picked from commit af68c3063589886f2b3ca3caf2ad6b81480a59f9)
2021-05-15 20:15:24 +02:00
Anita Zhang
7c8416f1bb shutdown: log on container exit
(cherry picked from commit 016f36ae72611210d6517b37429bfbdc26c5e31c)
(cherry picked from commit d51d8172d66506448fb1612c85df7b452264e08e)
(cherry picked from commit 23f4361f8ca15775403e6addcbbf6024731e479d)
2021-05-15 20:15:16 +02:00
Anita Zhang
21697fa702 shutdown: set always_reopen_console
Back in v232 systemd-shutdown would log to /dev/console. However after
the addition of always_reopen_console (v233) it would log to STDERR.
This caused some debugging issues as container systemd-shutdown logs
weren't being logged to console as the arg `--log-target=console` suggested.

Since it appears that always_reopen_console was intended for pid1, set
it in systemd-shutdown as well so logs will go to /dev/console.

(cherry picked from commit f975f1cc748929942188ae1490cf8480f8a64877)
(cherry picked from commit baa8bd89efa752633805c5b04b02d1dbde5ea0bb)
(cherry picked from commit 499bea62091f7b672f0e296ec67623a155e2a1d6)
2021-05-15 20:15:11 +02:00
Fangrui Song
c7ef99035b sd-bus: set retain attribute on BUS_ERROR_MAP_ELF_REGISTER
LLD 13 and GNU ld 2.37 support -z start-stop-gc which allows garbage
collection of C identifier name sections despite the __start_/__stop_
references.  Simply set the retain attribute so that GCC 11 (if
configure-time binutils is 2.36 or newer)/Clang 13 will set the
SHF_GNU_RETAIN section attribute to prevent garbage collection.

Without the patch, there are linker errors like the following with -z
start-stop-gc.

```
ld: error: undefined symbol: __start_SYSTEMD_BUS_ERROR_MAP
>>> referenced by bus-error.c:93 (../src/libsystemd/sd-bus/bus-error.c:93)
>>>               sd-bus_bus-error.c.o:(bus_error_name_to_errno) in archive src/libsystemd/libsystemd_static.a
```

(cherry picked from commit 945317a4b69d33752c9513bb8994fe8d5a786ea6)
(cherry picked from commit a360526852eadb2f14f5d4632771c3719a1c4dcf)
2021-05-15 20:14:49 +02:00
Zbigniew Jędrzejewski-Szmek
1f7e8e8594 basic/log: fix log_trace()
log_trace() was always on. It's supposed to be opt-in.

(cherry picked from commit e355fb6fb1c926d0ac109c35704b301e37172c4e)
(cherry picked from commit 1f2b3e1c07881b451b1c78ce299f6cc50f696973)
2021-05-15 20:14:42 +02:00
David Tardon
a5a50b4f53 use the right member to define property
(cherry picked from commit cb6c4f37dc4ade1ed1dea461803ebdceab1e5941)
(cherry picked from commit 6256d6b4e7f9f9a96853be9a72745d72a70f591a)
2021-05-15 20:14:11 +02:00
Lennart Poettering
947e7de10c resolved: upgrade log level to LOG_NOTICE if we switch to fallback server (or back)
This is inspired by a recent thread on fedora-devel: it's noteworthy
when we switch to the fallback servers, since it might (or might not)
indicate some configuration problem.

Fixes: #18788
(cherry picked from commit 9b564bbca5fcfb251b7990c8642c82846d09338b)
(cherry picked from commit d6231fde7dd3a1a05da34c722cc66a87fb197660)
2021-05-15 20:14:02 +02:00
Lennart Poettering
eef1be6938 userdb: honour USERDB_AVOID_SHADOW flag also when iterating
(cherry picked from commit 7c67419117f19a85cf3e7e1513c072be2b767a74)
(cherry picked from commit 74fbb83ac2613930f9939f31c9633a97a28da4eb)
(cherry picked from commit 662d14c5af342edbfee5b0b8cf9dc892228a58b9)
2021-05-15 20:12:07 +02:00
Lennart Poettering
8d076fdfe5 userdb: add missing 'else'
(cherry picked from commit d4f560df4f75d8bc5816a515c000f62cb796fa9f)
(cherry picked from commit c8abe13637cadcd8b91179ab3d8106d91b53ea88)
(cherry picked from commit 2837aa9750951e8ad4e18124c2f1c204bfd04d36)
2021-05-15 20:12:04 +02:00
Lennart Poettering
e347f0496a userdb: remove unnecesary repeated if check
(cherry picked from commit 77fe7d15931cc17c933ae8778c4161112783dc79)
(cherry picked from commit dd8454c17694e6857447f0dd8fb3ff4b409b3bdc)
(cherry picked from commit be316678b32eecaf2f24cabf111015b20d07e111)
2021-05-15 20:12:01 +02:00
Lennart Poettering
94871f1c5e userdb: count NSS records too
(cherry picked from commit 27a5a22f0354568e1c7e6292689ad947aa16aaac)
(cherry picked from commit 31844743c6b1333317c154e017d7121c5d689f8f)
(cherry picked from commit 8f9943ee804aae9c5a7822c7c2e34026b44e3f46)
2021-05-15 20:11:57 +02:00
Zbigniew Jędrzejewski-Szmek
fdb7308b84 sd-device: reject empty driver name
If ":" was the last char in the string, we would call access() on ".../drivers/", which
would pass. It probably doesn't matter, but let's reject this anyway.

(cherry picked from commit 52a89a5f08230439f07c043d59ded1270842137b)
(cherry picked from commit 92e5ba438d48a798807104d8aed4e480c58c6465)
(cherry picked from commit 19b1a0f24a781235393b30aff23127efa7a242d7)
2021-05-15 20:11:54 +02:00
Zbigniew Jędrzejewski-Szmek
72d2918b34 sd-device: use memdupa_suffix0() where appropriate
No functional change intended.

(cherry picked from commit 3e2d0c6ab2abc0ab85440580931b2462bb73cfda)
(cherry picked from commit 37eeb9c03f86227e94d8e1fa046ca0c0d2b6d237)
(cherry picked from commit 63c2aba7cec5e2ac72b23d7e5c51d6f91408fc10)
2021-05-15 20:11:50 +02:00