summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* dns-query: export CNAME_MAX, so that we can use it in other files, toov247.7Lennart Poettering2021-05-152-2/+3
| | | | | | | | | | 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)
* resolved: fix braino with reference counting and linked listsZbigniew Jędrzejewski-Szmek2021-05-151-10/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 0e0fd08fc832b8f42e567d722d388eba086da5ff I added reference counts to keep track of the DnsQueryCandidate objects. Unfortunately, dns_query_unref_candidates() was written as while (q->candidates) dns_query_candidate_unref(q->candidates); i.e. it would keep dropping the reference count as many times as needed for it to hit 0, making the patch less than fully effective. dns_query_unref_candidates() is renamed to dns_query_detach_candidates() and changed to drop exactly one reference from each of the linked candidates. Example failure: ==463== Invalid read of size 8 ==463== at 0x419C93: dns_query_candidate_go (resolved-dns-query.c:159) ==463== by 0x41A143: dns_query_candidate_notify (resolved-dns-query.c:304) ==463== by 0x434BD6: dns_transaction_complete (resolved-dns-transaction.c:437) ==463== by 0x436A0F: dns_transaction_process_dnssec (resolved-dns-transaction.c:976) ==463== by 0x4378C1: dns_transaction_process_reply (resolved-dns-transaction.c:1387) ==463== by 0x437CE9: on_dns_packet (resolved-dns-transaction.c:1444) ==463== by 0x4B2DC9B: source_dispatch (sd-event.c:3512) ==463== by 0x4B2FB1F: sd_event_dispatch (sd-event.c:4077) ==463== by 0x4B2FFFA: sd_event_run (sd-event.c:4138) ==463== by 0x4B301D6: sd_event_loop (sd-event.c:4159) ==463== by 0x464A24: run (resolved.c:92) ==463== by 0x464B3C: main (resolved.c:99) ==463== Address 0x5f409d0 is 32 bytes inside a block of size 72 free'd ==463== at 0x48410E4: free (vg_replace_malloc.c:755) ==463== by 0x418EDF: mfree (alloc-util.h:48) ==463== by 0x4197E8: dns_query_candidate_free (resolved-dns-query.c:67) ==463== by 0x4198B7: dns_query_candidate_unref (resolved-dns-query.c:70) ==463== by 0x41A2E3: dns_query_unref_candidates (resolved-dns-query.c:337) ==463== by 0x41C5FE: dns_query_cname_redirect (resolved-dns-query.c:1028) ==463== by 0x41CA04: dns_query_process_cname_one (resolved-dns-query.c:1128) ==463== by 0x41CA80: dns_query_process_cname_many (resolved-dns-query.c:1157) ==463== by 0x40C0BD: bus_method_resolve_hostname_complete (resolved-bus.c:198) ==463== by 0x41B312: dns_query_complete (resolved-dns-query.c:562) ==463== by 0x41C1AC: dns_query_accept (resolved-dns-query.c:922) ==463== by 0x41C2C4: dns_query_ready (resolved-dns-query.c:955) ==463== by 0x41A162: dns_query_candidate_notify (resolved-dns-query.c:314) ==463== by 0x434BD6: dns_transaction_complete (resolved-dns-transaction.c:437) ==463== by 0x438995: dns_transaction_prepare (resolved-dns-transaction.c:1728) ==463== by 0x43921D: dns_transaction_go (resolved-dns-transaction.c:1928) ==463== by 0x419C7C: dns_query_candidate_go (resolved-dns-query.c:163) ==463== by 0x41A143: dns_query_candidate_notify (resolved-dns-query.c:304) ==463== by 0x434BD6: dns_transaction_complete (resolved-dns-transaction.c:437) ==463== by 0x436A0F: dns_transaction_process_dnssec (resolved-dns-transaction.c:976) ==463== by 0x4378C1: dns_transaction_process_reply (resolved-dns-transaction.c:1387) ==463== by 0x437CE9: on_dns_packet (resolved-dns-transaction.c:1444) ==463== by 0x4B2DC9B: source_dispatch (sd-event.c:3512) ==463== by 0x4B2FB1F: sd_event_dispatch (sd-event.c:4077) ==463== by 0x4B2FFFA: sd_event_run (sd-event.c:4138) ==463== by 0x4B301D6: sd_event_loop (sd-event.c:4159) ==463== by 0x464A24: run (resolved.c:92) ==463== by 0x464B3C: main (resolved.c:99) ==463== Block was alloc'd at ==463== at 0x483E86F: malloc (vg_replace_malloc.c:380) ==463== by 0x418F81: malloc_multiply (alloc-util.h:96) ==463== by 0x419378: dns_query_candidate_new (resolved-dns-query.c:23) ==463== by 0x41B42C: dns_query_add_candidate (resolved-dns-query.c:582) ==463== by 0x41BB7A: dns_query_go (resolved-dns-query.c:762) ==463== by 0x40CE3A: bus_method_resolve_hostname (resolved-bus.c:464) ==463== by 0x4A84B86: method_callbacks_run (bus-objects.c:414) ==463== by 0x4A87961: object_find_and_run (bus-objects.c:1323) ==463== by 0x4A87FEE: bus_process_object (bus-objects.c:1443) ==463== by 0x4AA3434: process_message (sd-bus.c:2964) ==463== by 0x4AA3623: process_running (sd-bus.c:3006) ==463== by 0x4AA4110: bus_process_internal (sd-bus.c:3226) ==463== by 0x4AA41EF: sd_bus_process (sd-bus.c:3253) ==463== by 0x4AA5343: io_callback (sd-bus.c:3604) ==463== by 0x4B2DC9B: source_dispatch (sd-event.c:3512) ==463== by 0x4B2FB1F: sd_event_dispatch (sd-event.c:4077) ==463== by 0x4B2FFFA: sd_event_run (sd-event.c:4138) ==463== by 0x4B301D6: sd_event_loop (sd-event.c:4159) ==463== by 0x464A24: run (resolved.c:92) ==463== by 0x464B3C: main (resolved.c:99) Fixes #19376. (cherry picked from commit c856ef0457c35e9edfdbf085b69ec81c126d48e5) (cherry picked from commit 89324e233eef767334d9bfe5eed96956c973c2ad)
* network:dhcp4_server_configure returns if not able to get timezonetramsay2021-05-151-7/+9
| | | | | | | | | | | | | | 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) (cherry picked from commit 37c4cfde0ce613f0f00544d3f4e2e72bf93d9c76)
* meson: call find_program() once and reuse the variable everywhereZbigniew Jędrzejewski-Szmek2021-05-159-32/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Meson 0.58 has gotten quite bad with emitting a message every time a quoted command is used: Program /home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh found: YES (/home/zbyszek/src/systemd-work/tools/meson-make-symlink.sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program sh found: YES (/usr/bin/sh) Program xsltproc found: YES (/usr/bin/xsltproc) Configuring custom-entities.ent using configuration Message: Skipping bootctl.1 because ENABLE_EFI is false Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Message: Skipping journal-remote.conf.5 because HAVE_MICROHTTPD is false Message: Skipping journal-upload.conf.5 because HAVE_MICROHTTPD is false Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Message: Skipping loader.conf.5 because ENABLE_EFI is false Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) Program ln found: YES (/usr/bin/ln) ... Let's suffer one message only for each command. Hopefully we can silence even this when https://github.com/mesonbuild/meson/issues/8642 is resolved. (cherry picked from commit 596f5101f29c10256208132bfa9c502bf898fd8b)
* run: update checks to allow running with a user's busAnita Zhang2021-05-151-5/+5
| | | | | | | | | systemd-run is documented to as being able to connect and run on a specific user bus with "--user --machine=lennart@.host" arguments. This PR updates some logic that prevented this from working. (cherry picked from commit cbdc29492097e24ef3320280bc2a8dedbce02d9a) (cherry picked from commit cc589cce9815cabb0bed6d0695ec3ff77beebd06)
* resolved.conf.in: add missing Quad9 serversMichael Catanzaro2021-05-151-1/+1
| | | | | | | The example configuration is missing half of Quad9's addresses. (cherry picked from commit aa2b370dddc7e37df33769a488d6c3dce89b4e17) (cherry picked from commit 4b8d52f4f09fe7f514cc982ad945153565503127)
* resolved: be more careful with weird links with low MTUsLennart Poettering2021-05-151-4/+13
| | | | | | | | | | | | | | | | | | | Apparently CAN links will show up in rtnetlink with very low MTUs. We shouldn't consider them relevant if no IP is spoken over them, since these MTUs are irrelevant for us then. Hence, let's check if there's an address assigned to the link before considering its MTU. As additional safety net filter out MTUs smaller than the minimum DNS packet size, too. Finally, in case we don't find any suitable interface MTU, let's default to 1500 as the generic Ethernet MTU. Fixes: #19396 (cherry picked from commit 5a0d0b8f9cdfcbb82c4a89b28f0ebce414c9ecfe) (cherry picked from commit 3fd268d20979850a70453ed5f8891a0f03344bf2)
* resolved: add udp_header_size() helperLennart Poettering2021-05-152-6/+24
| | | | (cherry picked from commit 4565863fff974e69d23a7c5a5237528bc5573a17)
* core: don't accidentally unref a varlink connection twiceLennart Poettering2021-05-151-2/+5
| | | | | | | | | | | | Let's make sure that our close handler unrefs a connection again that we are already unreffing a few stack frames up by invalidating the pointer first, and dropping the ref counter only after that. Replaces: 39ad3f1c092b5dffcbb4b1d12eb9ca407f010a3c Fixes: #18025 (cherry picked from commit d65e974e67e47222cdebd9d0b6becd6642547ce2) (cherry picked from commit 68da6997a9323c127a45ca019d32fa97ff0d7cca)
* Revert "varlink: avoid using dangling ref in varlink_close_unref()"Lennart Poettering2021-05-151-24/+6
| | | | | | | This reverts commit 39ad3f1c092b5dffcbb4b1d12eb9ca407f010a3c. (cherry picked from commit cc6b0a18ff73325e2ecf0c5d857f4fdca75d97b4) (cherry picked from commit 906b89a284308a64e599e7e4230763bb60a16895)
* pam: fix typo try_authtok → use_authtokLennart Poettering2021-05-153-3/+4
| | | | | | | | | | This was a copy/paste mistae apparently, there's not "try_authtok" and this was supposed to copy what Fedora uses, which uses "use_authtok" correctly. Hence adjust this. Fixes: #19369 (cherry picked from commit 971c07fc6812315c2b27015dfcc652a747f919ed) (cherry picked from commit ca276dcddc4def7348e2cb897fbf7a8b26bfc5ed)
* bootctl: same entry path check case-insensitivezsien2021-05-151-1/+5
| | | | | | | | Some motherboards convert the path to uppercase under certain circumstances (e.g. after booting into the Boot Menu in the ASUS ROG STRIX B350-F GAMING). (cherry picked from commit 5c2e5957678462d871c5c2ea5261becec5f8f80f) (cherry picked from commit 379679f807072b4d554711bc61b769d72ecc98d6)
* man: network: use `networkctl list` instead of `status` to list network ↵Lucas Magasweran2021-05-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface type To determine the network interface type for use in the `Type=` directive, it is more concise to use the `list` command. Whereas, the `status` command requires an interface parameter. For example, on a RaspberryPi 4 the following shows that the `wlan0` interface type `wlan` is more coveniently listed by the `list` command. ``` root@raspberrypi4-64:~# networkctl list IDX LINK TYPE OPERATIONAL SETUP 1 lo loopback carrier unmanaged 2 eth0 ether routable configured 3 wlan0 wlan off unmanaged 3 links listed. ``` Whereas the `networkctl status` command doesn't include this information. ``` root@raspberrypi4-64:~# networkctl status ● State: routable Address: 192.168.1.141 on eth0 fd8b:8779:b7a4::f43 on eth0 fd8b:8779:b7a4:0:dea6:32ff:febe:d1ce on eth0 fe80::dea6:32ff:febe:d1ce on eth0 Gateway: 192.168.1.1 (CZ.NIC, z.s.p.o.) on eth0 DNS: 192.168.1.1 May 07 14:17:18 raspberrypi4-64 systemd-networkd[212]: eth0: Gained carrier May 07 14:17:19 raspberrypi4-64 systemd-networkd[212]: eth0: Gained IPv6LL May 07 14:17:19 raspberrypi4-64 systemd-networkd[212]: eth0: DHCPv6 address fd8b:8779:b7a4::f43/128 timeout preferred -1 valid -1 May 07 14:17:21 raspberrypi4-64 systemd-networkd[212]: eth0: DHCPv4 address 192.168.1.141/24 via 192.168.1.1 ``` To get the interface type using the `status` command you need to specify an additional argument. ``` root@raspberrypi4-64:~# networkctl status wlan0 ● 3: wlan0 Link File: /lib/systemd/network/99-default.link Network File: n/a Type: wlan State: off (unmanaged) Path: platform-fe300000.mmcnr Driver: brcmfmac HW Address: dc:a6:32:be:d1:cf (Raspberry Pi Trading Ltd) MTU: 1500 (min: 68, max: 1500) QDisc: noop IPv6 Address Generation Mode: eui64 Queue Length (Tx/Rx): 1/1 ``` (cherry picked from commit 2480ca95bac0f1bed350ba8d5aef1ef92be0f8a4) (cherry picked from commit 56ba53b17338f37c211a1c1ee0686ff4e5c09d28)
* network: examples: use wlan for Type instead of wifiLucas Magasweran2021-05-153-3/+3
| | | | | (cherry picked from commit b419e8776bc2dc1ca113c8332ed465724bff053a) (cherry picked from commit bf3d671b379cc683375d62f109f133c1703dd828)
* resolve: remove RRs from zones before an updateRoman Beranek2021-05-151-3/+4
| | | | | | | | | | | | During an update of RRs, the records of each DNS-SD service are replaced with new ones. However the old RRs can only be removed from the mDNS scopes as long as they remain accessible from the DnssdService structures, otherwise they remain stuck there. Therefore the removal must take place before the update. (cherry picked from commit ee3713b71ddf182852a399953968a2b39af22104) (cherry picked from commit 46ee05ed1fca9c5637ec5cfbb4f71c84f94b3db6)
* nss-systemd: properly handle empty membership listsLennart Poettering2021-05-152-4/+7
| | | | | | | | | | When we are queried for membership lists on a system that has exactly zero, then we'll return ESRCH immediately instead of at EOF. Which is OK, but we need to handle this in various places, and not get confused by it. (cherry picked from commit a1aa41e4e175c2712b97600d7e10e9d6c58e5543) (cherry picked from commit d0f8a01a74e5a1bed4d687339abde774cb944579)
* nss-systemd: reset the right fieldLennart Poettering2021-05-151-1/+1
| | | | | (cherry picked from commit 1fdfca4da739f47516513afc66d4c7008c9badfd) (cherry picked from commit 18babc7b290de4c0108b2fe39400c3e9c471ef67)
* system-conf: drop reference to ShutdownWatchdogUsec=Franck Bui2021-05-151-1/+0
| | | | | | | | | 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)
* systemctl: hide some empty properties without --allFrantisek Sumsal2021-05-152-4/+8
| | | | | | Fixes: #19423 (cherry picked from commit 1ceaad69378272c64da4ecaab0d59ebb7a92ca0a) (cherry picked from commit af3a3dd2f1360973560d21d1aeec9531e953162a)
* core/service: also reject deserialized commands with no argv[0]Zbigniew Jędrzejewski-Szmek2021-05-151-2/+3
| | | | | | | I'm pretty sure that bad things would happen later on. (cherry picked from commit 90204792461030dbc8645d8511e7ac8d1b4f1ca2) (cherry picked from commit d113fd4e0756b1b6f5543a47d0943af4564293ff)
* core/service: fix deserialization of non-absolute commandsZbigniew Jędrzejewski-Szmek2021-05-151-3/+0
| | | | | | | | | | | | 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)
* network: update comment and log messageYu Watanabe2021-05-151-2/+3
| | | | | | | | | | | | | | | | 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)
* core: allow services stuck in reloading state to exitPeter Morrow2021-05-151-0/+9
| | | | | | | | | | | | | | | If a service is in reloading state but has exited do not delay the final exit until the service reload timer expires. Instead allow the service to exit immediately since we can't expect the service to ever transition out of reloading state. For example if a service sent RELOADING=1 but crashed before it could send READY=1 then it should be restarted if the service had Restart= configured. Signed-off-by: Peter Morrow <pemorrow@linux.microsoft.com> (cherry picked from commit bbe19f68846bb3cd5fcf3e4f612268064df53b53) (cherry picked from commit f5ea4ced2e4fb61bc2940b1b82540bb87e3fa0c9)
* fix: point to the correct drop-ins subdirectory for confsJóhann B. Guðmundsson2021-05-1513-13/+13
| | | | | (cherry picked from commit eb34cce1787259de4cea1430fa017b6bd25bc4c1) (cherry picked from commit 3d896e8b03b39c5bd68ef026536acb7496ae995f)
* man: dedent examples in sd-id128 to 2 columnsZbigniew Jędrzejewski-Szmek2021-05-151-16/+16
| | | | | | | | | | | In man pages, horizontal space it at premium, and everything should generally be indented with 2 spaces to make it more likely that the examples fit on a user's screen. C.f. 798d3a524ea57aaf40cb53858aaa45ec702f012d. (cherry picked from commit e0a41aa4c6674f04723388c05b7cd81cc2ffd613) (cherry picked from commit 80a7922d16c9f4b7964342dcd99d66f1ab006777)
* journald: enforce longer line length limit during "setup" phase of stream ↵Yangyang Shen2021-05-151-7/+28
| | | | | | | | | | 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)
* sd-device: use right clock when comparing initialization usecLennart Poettering2021-05-151-2/+2
| | | | | | | | | 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)
* sd-device: use right type for usec_initializedLennart Poettering2021-05-151-1/+1
| | | | | (cherry picked from commit a156eb89c827206ee5b51d53016ba63be0c90449) (cherry picked from commit d6b0efcdd83a937363267ed751fd9a1085505394)
* document DefaultOOMPolicyMiroslav Suchý2021-05-151-0/+1
| | | | | | | | | | | the `man systemd.service` say: Defaults to the setting DefaultOOMPolicy= in systemd-system.conf(5) is set to but there is no such line in this config. This is the default value I extracted from systemctl show --property=DefaultOOMPolicy (cherry picked from commit 0084d4f6b58f70c9955fa2259c29d65d87e1e855) (cherry picked from commit 48027216bdc1d77f208f3606c05489046ea30ace)
* wifi-util: do not set zero errno to log_debug_errno()Yu Watanabe2021-05-151-2/+2
| | | | | (cherry picked from commit 66205cb3f597e43c8446d122fa4cc849c4f101d7) (cherry picked from commit 8eaf2da0f6c9fbea42d44343c30361dcf79702bf)
* dissect: ext4 and loopback files are unimpressed by read-only accessLennart Poettering2021-05-151-0/+21
| | | | | | | | | | | | | | Even if we set up a loopback device read-only and mount it read-only this means nothing, ext4 will still write through to the backing storage file. Yes, I lost 6h debugging time on this. Apparently, we have to specify "norecovery" when mounting such file systems, to force them into truly read-only mode. Let's do so. (cherry picked from commit b620bf332f575ba9b8e4cd60c93446a0c35c23e8) (cherry picked from commit 8c7bc71e772899a401b377711b63de32a67c951d)
* repart: deal with empty partition label sensiblyLennart Poettering2021-05-151-9/+10
| | | | | | | | | | libfdisk appears to return NULL when encountering an empty partition label, let's handle this sanely, and treat NULL and "" for the current label as the same, but for the new label as distinct: there NULL means nothing is set, and "" means an actual empty label. (cherry picked from commit be9ce0188ebb414319f0c003f805ea02b5eb473e) (cherry picked from commit b3b84982d0e72d3160ff7ecb6193c6439c1fc27e)
* repart: handle DISCARD failing with EBUSY gracefullyLennart Poettering2021-05-151-0/+5
| | | | | (cherry picked from commit 22163eb51b682afe969f9381d56315dade874ec1) (cherry picked from commit da72383bf769e83af7ba94d51dad8ac62b5754eb)
* repart: fix incorrect error code propagationLennart Poettering2021-05-151-1/+1
| | | | | (cherry picked from commit a0ff9971802b664aaa12481c46cec11eae77ea51) (cherry picked from commit a9b9f49b089f297b8ba2acf2b71f7fbd71f65e21)
* shell-completion: use base.lst, not xorg.lstPeter Hutterer2021-05-151-1/+1
| | | | | | | 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)
* sd-login: fix wrong constructor used in sd_login_monitor manpage exampleJason Francis2021-05-151-1/+1
| | | | | (cherry picked from commit 941c5275eaaf8d22915eb876045d2173bdbb7d4c) (cherry picked from commit 17cb088d6dd3ac940a299c6c7201085252f1367d)
* sd-login: correct prototype of sd_peer_get_cgroupJason Francis2021-05-151-1/+1
| | | | | (cherry picked from commit a8310e39e996b9b5f63d897879aecf8988261bdb) (cherry picked from commit fa7f835f79d4da8ee6d7403be43a0ba4d24b9fb2)
* fileio: use take_fdopen_unlocked()Yu Watanabe2021-05-151-5/+2
| | | | | | | | | | | | | | This fixes maybe-uninitialized warning: ``` ../src/basic/fileio.c: In function ‘chase_symlinks_and_fopen_unlocked’: ../src/basic/fileio.c:1026:19: warning: ‘f’ may be used uninitialized in this function [-Wmaybe-uninitialized] 1026 | *ret_file = f; | ~~~~~~~~~~^~~ ``` (cherry picked from commit 6604fb0207ee10e8dc05d67f6fe45de0b193b5c4) (cherry picked from commit 277277cbf0386be082555f92b5fce0521fee17b3)
* man: correct requirements for systemd-oomd.serviceAnita Zhang2021-05-151-4/+3
| | | | | | Fixes: #19331 (cherry picked from commit 169be51f94b7017fea1394dcb412d3afdfd7cea5) (cherry picked from commit 7208e7465b6cb1563cad46f568c78c725790d237)
* journald: fix %m usageZbigniew Jędrzejewski-Szmek2021-05-151-2/+2
| | | | | (cherry picked from commit cf5a2ee82517429a34d9f5bef853cabe055e3e59) (cherry picked from commit 4186be9a05e162c04d1b72a9ba95224c0a9aa2c3)
* shared/module-util: fix errno value passed to log functionZbigniew Jędrzejewski-Szmek2021-05-151-5/+4
| | | | | | | | 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)
* partition, random-seed, logind: fix log messages with %mZbigniew Jędrzejewski-Szmek2021-05-153-4/+4
| | | | | | | | We would print "...: Success", which is not too terrible, but not pretty either. (cherry picked from commit 111a3aae71fa019710216cc5b7aa95b7c8db0937) (cherry picked from commit c032a26df67903e0c65150b5cc68ade35aa47c03)
* sd-device: improve log message and tweak styleZbigniew Jędrzejewski-Szmek2021-05-151-3/+2
| | | | | | | We shouldn't say the attribute is missing right after ruling out ENOENT. (cherry picked from commit aca591ac55e5ee364905aec975388c5e30d0476c) (cherry picked from commit e31914aa17df889ae10f0964a8bbc8c00e0f045b)
* test: use systemd-run --wait in TEST-44-LOG-NAMESPACELuca Boccassi2021-05-151-1/+1
| | | | | | | | | | | | | 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)
* libsystemd-network: fix dhcp option buffer confusionZbigniew Jędrzejewski-Szmek2021-05-151-1/+2
| | | | | | | | | 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)
* meson.build: typoSevan Janiyan2021-05-151-1/+1
| | | | | (cherry picked from commit d5b3e5104448ebfecd334c26dbdd3a8274440b1e) (cherry picked from commit 812384ce37acd909d70f9295a3b0fce98c8cf840)
* rfkill: add some casts to silence -Werror=sign-compareLuca Boccassi2021-05-151-4/+4
| | | | | | | | (cherry picked from commit ab1aa6368a883bce88e3162fee2bea14aacedf23) Fixes https://github.com/systemd/systemd-stable/issues/101. (cherry picked from commit 074475abc1d6187de88b77dcc4fe0c4d2ab804f5)
* network: add missing default setting in networkd.confYu Watanabe2021-05-151-0/+1
| | | | | (cherry picked from commit 6bfadad9bb6eaf614da92eba0a9b6243e8645018) (cherry picked from commit ee24f9346630b6d59e88ef0989f943444e752569)
* udev: delete useless codesgaoyi2021-05-151-2/+0
| | | | | | | It seems no one will touch queue.bin (cherry picked from commit 993eb00016a75cf085eed85cf626a6995e96ab3d) (cherry picked from commit a511010f380397e8bb08816288e31b1666dc11b9)
* load-fragment: parse specifiers in CPUAffinity= (#19281)Francois Gervais2021-05-151-1/+11
| | | | | (cherry picked from commit 54cfe9a75f0e84d0604d39b87b1d919542336809) (cherry picked from commit bf3bd598136397b5371188bcdec0127e56a1db9a)