Daan De Meyer [Sun, 15 Jan 2023 16:08:11 +0000 (17:08 +0100)]
ukify: Fix version string
Let's make sure we mimick the version of our other CLI tooling.
Luca Boccassi [Sun, 15 Jan 2023 20:11:23 +0000 (20:11 +0000)]
docs/man: remove reference to default vsock CID
This was dropped on reviewers' request in the revision that got merged,
but reference in two documents was not updated. Fix it.
Follow-up for: https://github.com/systemd/systemd/pull/25918
Ulrich Ölmann [Sun, 15 Jan 2023 17:04:35 +0000 (18:04 +0100)]
man: libudev: fix typo
Yu Watanabe [Fri, 13 Jan 2023 05:12:31 +0000 (14:12 +0900)]
busctl: fix introspecting DBus properties
Follow-up for
f2f7785d7a47ffa48ac929648794e1288509ddd8.
Fixes #26033.
Frantisek Sumsal [Fri, 13 Jan 2023 19:10:42 +0000 (20:10 +0100)]
test: support a non-default SysV directory
Since the directory is configurable via -Dsysvinit-path= during build,
it makes the test fail on Fedora/RHEL/CentOS, where it's set to
/etc/rc.d/init.d, instead of the default /etc/init.d. Since we can't get
the value at runtime (in a reasonable manner), let's just support the
two most common paths for now.
Follow up to
7fcf0fab078ed92a4f6c3c3658c0a9dfd67c9601.
Daan De Meyer [Fri, 13 Jan 2023 10:40:40 +0000 (11:40 +0100)]
open-file: Fix user-after-free
Yu Watanabe [Fri, 13 Jan 2023 05:46:58 +0000 (14:46 +0900)]
Merge pull request #26047 from yuwata/udev-node-cleanups
udev: several cleanups
Franck Bui [Wed, 4 Jan 2023 13:59:00 +0000 (14:59 +0100)]
udev: simplify a bit stack_directory_find_prioritized_devnode()
And make the new format the one we expect as it should replace the old one
pretty quickly.
Franck Bui [Tue, 3 Jan 2023 16:38:59 +0000 (17:38 +0100)]
udev: return ENODEV if link_directory_read_one() can't find the devnode
That's usually the errno code we return when a device cannot be found because
it's been unplugged.
Franck Bui [Wed, 14 Dec 2022 18:04:16 +0000 (19:04 +0100)]
udev: let stack_directory_open() convert a slink into a dirname itself
We likely always want to open the directory via a slink.
There's currently only one caller so it doesn't make any difference in practice
but I think it's still nicer.
No functional change.
Franck Bui [Tue, 3 Jan 2023 17:34:11 +0000 (18:34 +0100)]
udev: merge link_directory_lock() into link_directory_open()
These 2 operations are inseparable.
Ludwig Nussel [Thu, 12 Jan 2023 12:56:08 +0000 (13:56 +0100)]
bootspec: show efi entry too
Frantisek Sumsal [Thu, 12 Jan 2023 18:19:28 +0000 (19:19 +0100)]
test: explicitly create the /etc/init.d directory
On RHEL/CentOS/Fedora this directory is provided by the chkconfig or
initscripts package, which might not be installed:
testsuite-26.sh[1225]: + [[ -x /usr/lib/systemd/system-generators/systemd-sysv-generator ]]
testsuite-26.sh[1225]: + cat
testsuite-26.sh[2330]: /usr/lib/systemd/tests/testdata/units/testsuite-26.sh: line 299: /etc/init.d/issue-24990: No such file or directory
Follow-up to
5f882cc3ab32636d9242effb2cefad20d92d2ec2.
Michal Koutný [Thu, 29 Sep 2022 11:34:21 +0000 (13:34 +0200)]
cgroup: Do not emit compat message without memory limit
Previously mere MemoryLow= directive would lead to emitting the compat
message 'Applying MemoryMax=
18446744073709551615 as MemoryLimit=' even
though it carries little information.
Daan De Meyer [Wed, 11 Jan 2023 15:21:01 +0000 (16:21 +0100)]
dissect-image: Notify btrfs when we're done using a loop device
Let's explicitly let btrfs know when we're done using a loop device.
Otherwise, btrfs will keep the device UUID cached which will result
in mount() failures if we ever generate a device or filesystem with
the same UUID again.
Daan De Meyer [Thu, 12 Jan 2023 10:11:12 +0000 (11:11 +0100)]
ci: Fix PR labeling
Make sure we only add labels to open pull request and remove labels
from closed pull requests.
Zbigniew Jędrzejewski-Szmek [Thu, 12 Jan 2023 07:41:05 +0000 (08:41 +0100)]
Merge pull request #25661 from yuwata/systemctl-suppress-warning
systemctl: suppress warning about missing /proc/ when --no-warn
Daan De Meyer [Wed, 30 Nov 2022 15:13:23 +0000 (16:13 +0100)]
network: Show network and link file dropins in networkctl status
Fixes #24428
Alvin Šipraga [Wed, 21 Dec 2022 15:14:28 +0000 (16:14 +0100)]
network: fix race between RTM_NEWLINK and NL82011_CMD_NEW_INTERFACE
When a new wireless network interface is created by the kernel, it emits
both RTM_NEWLINK and NL80211_CMD_NEW_INTERFACE. These events can arrive
in either order and networkd must behave correctly in both cases.
The typical case is that RTM_NEWLINK is handled first, in which case
networkd creates a Link object and starts tracking it. When the
NL80211_CMD_NEW_INTERFACE message is handled, networkd then populates
the Link object with relevant wireless properties such as wireless
interface type (managed, AP, etc.).
In the event that the order is reversed however, networkd will fail to
populate these wireless properties because at the time of processing the
nl80211 message, the link is considered unknown. In that case, a debug
message is emitted:
systemd-networkd[467]: nl80211: received new_interface(7) message for link '109' we don't know about, ignoring.
This is problematic because after the subsequent RTM_NEWLINK message,
networkd will have an incomplete view of the link. In particular, if a
.network configuration matches on some of the missing wireless
properties, such as WLANInterfaceType=, then it will never match.
The above race can be reproduced by using the mac80211_hwsim driver.
Suppose that there exists a .network configuration:
[Match]
WLANInterfaceType=ap
...
Now loop the creation/destruction of such an AP interface:
while true
do
iw dev wlan0 interface add uap0 type __ap
iw dev uap0 del
done
The above debug message from networkd will then be observed very
quickly. And in that event, the .network file will fail to match.
To address the above race, have the nl80211 message handler store the
interface index in a set in case a Link object is not found on
NL80211_CMD_NEW_INTERFACE. The handler for RTM_NEWLINK can then query
this set, and explicitly request the wireless properties from nl80211
upon the creation of the Link object.
chris [Sun, 1 Jan 2023 13:59:20 +0000 (14:59 +0100)]
optionally set socket priority on DHCPv4 raw socket
Yu Watanabe [Tue, 13 Dec 2022 00:05:11 +0000 (09:05 +0900)]
shell-completion: systemctl: add --no-warn
Yu Watanabe [Wed, 7 Dec 2022 04:59:01 +0000 (13:59 +0900)]
systemctl: suppress warning about missing /proc/ when --no-warn
Follow-up for
0f958c8d4fc13ed1c1af928b2a7d91d31c7576eb.
systemctl is called many times by dnf or so, and missing /proc/ is not
a user's fault, but package manager's issue.
With this commit, we can suppress the warning by updating rpm macros if
necessary.
Luca Boccassi [Wed, 11 Jan 2023 23:05:27 +0000 (23:05 +0000)]
Merge pull request #26023 from keszybz/man-page-updates
Man page updates
Jan Engelhardt [Wed, 11 Jan 2023 17:05:29 +0000 (18:05 +0100)]
coredump: re-document raised default dump sizes
Commit
v250-767-ge677041e7a updated the built-in configuration, but
missed the accompanying documentation.
Lennart Poettering [Wed, 11 Jan 2023 12:52:12 +0000 (13:52 +0100)]
man: explain what kind of data is actually included in "systemd-analyze plot" output
Prompted by: https://lists.freedesktop.org/archives/systemd-devel/2023-January/048736.html
Jan Janssen [Tue, 10 Jan 2023 15:00:49 +0000 (16:00 +0100)]
man: Use ukify instead of objcopy in examples
These hardcoded VMA section offsets are a terrible thing and should
vanish from earth.
Franck Bui [Tue, 6 Dec 2022 19:15:43 +0000 (20:15 +0100)]
journal: give the ability to enable/disable systemd-journald-audit.socket
Before this patch the only way to prevent journald from reading the audit
messages was to mask systemd-journald-audit.socket. However this had main
drawback that downstream couldn't ship the socket disabled by default (beside
the fact that masking units is not supposed to be the usual way to disable
them).
Fixes #15777
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2023 16:03:48 +0000 (17:03 +0100)]
man: reword "string is extended into PCR"
Originally, people used "extend a PCR with a measurement" or
"measure some blob into the PCR". In our docs those uses got merged
into "extend a string into a PCR". The meaning is clear to developers, but
it's a very jargony syntax that wouldn't make any sense to somebody who encounters
it the first time. Let's return to the more natural original phrasing.
Also, change various "this is supposed to act as" to "this acts as". If it
doesn't work, we have a bug to fix. This indirection is not useful.
Also, "boot path" → "phase path" and other smaller cleanups.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2023 15:45:59 +0000 (16:45 +0100)]
man: fix issues reported by the manpage-l10n project
Fixes #25780.
> Man page: crypttab.5
> Issue 1: Missing fullstop
> Issue 2: I<cipher=>, I<hash=>, I<size=> → B<cipher=>, B<hash=>, B<size=>
>
> "Force LUKS mode\\&. When this mode is used, the following options are "
> "ignored since they are provided by the LUKS header on the device: "
> "I<cipher=>, I<hash=>, I<size=>"
Seems OK to me. The full stop is there and has been for at least a few years. And we use <option> for the markup, which is appropriate here.
> Man page: crypttab.5
> Issue 1: Missing fullstop
> Issue 2: I<cipher=>, I<hash=>, I<keyfile-offset=>, I<keyfile-size=>, I<size=> → B<cipher=>, B<hash=>, B<keyfile-offset=>, B<keyfile-size=>, B<size=>
>
> "Use TrueCrypt encryption mode\\&. When this mode is used, the following "
> "options are ignored since they are provided by the TrueCrypt header on the "
> "device or do not apply: I<cipher=>, I<hash=>, I<keyfile-offset=>, I<keyfile-"
> "size=>, I<size=>"
Same.
> Man page: journalctl.1
> Issue 1: make be → may be
Fixed.
> Issue 2: below\\&. → below:
Fixed.
> Man page: journalctl.1
> Issue: Colon at the end?
>
> "The following commands are understood\\&. If none is specified the default "
> "is to display journal records\\&."
> msgstr ""
> "Die folgenden Befehle werden verstanden\\&. Falls keiner festgelegt ist, ist "
> "die Anzeige von Journal-Datensätzen die Vorgabe\\&."
This is a bit awkward, but I'm not sure how to fix it.
> Man page: kernel-install.8
> Issue: methods a fallback → methods fallback
It was correct, but I added a comma to make the sense clearer.
> Man page: loader.conf.5
> Issue 1: secure boot variables → Secure Boot variables
> Issue 2: one → one for (multiple times)
>
> "Supported secure boot variables are one database for authorized images, one "
> "key exchange key (KEK) and one platform key (PK)\\&. For more information, "
> "refer to the \\m[blue]B<UEFI specification>\\m[]\\&\\s-2\\u[2]\\d\\s+2, "
> "under Secure Boot and Driver Signing\\&. Another resource that describe the "
> "interplay of the different variables is the \\m[blue]B<EDK2 "
> "documentation>\\m[]\\&\\s-2\\u[3]\\d\\s+2\\&."
"one of" would sound strange. "One this and one that" is OK.
> Man page: loader.conf.5
> Issue: systemd-boot → B<systemd-boot>(7)
Fixed.
> Man page: logind.conf.5
> Issue: systemd-logind → B<systemd-logind>(8)
We use <filename>systemd-logind</> on subsequent references… I think that's good enough.
> Man page: nss-myhostname.8
> Issue: B<getent> → B<getent>(1)
Fixed.
> Man page: nss-resolve.8
> Issue: B<systemd-resolved> → B<systemd-resolved>(8)
The first reference does this, subsequent are shorter.
> Man page: os-release.5
> Issue: Portable Services → Portable Services Documentation?
Updated.
> Man page: pam_systemd_home.8
> Issue: auth and account use "reason", while session and password do not?
Reworded.
> Man page: portablectl.1
> Issue: In systemd-portabled.service(8): Portable Services Documentation
Updated.
> Man page: repart.d.5
> Issue: The partition → the partition
Fixed.
> Man page: repart.d.5
> Issue: B<systemd-repart> → B<systemd-repart>(8)
The first reference does this. I also change this one, because it's pretty far down in the text.
> Man page: systemd.1
> Issue: kernel command line twice?
>
> "Takes a boolean argument\\&. If false disables importing credentials from "
> "the kernel command line, qemu_fw_cfg subsystem or the kernel command line\\&."
Apparently this was fixed already.
> Man page: systemd-boot.7
> Issue: enrollement → enrollment
Fixed.
> Man page: systemd-cryptenroll.1
> Issue: multiple cases: any specified → the specified
Reworded.
> Man page: systemd-cryptenroll.1
> Issue: If this this → If this
Fixed tree-wide.
> Man page: systemd-cryptsetup-generator.8
> Issue: and the initrd → and in the initrd
"Is honoured by the initrd" is OK, because we often speak about the initrd as a single unit. But in the same paragraph we also used "in the initrd", which makes the other use look sloppy. I changed it to "in the initrd" everywhere in that file.
> Man page: systemd.directives.7
> Issue: Why are these two quoted (but not others)?
>
> "B<\\*(Aqh\\*(Aq>"
>
> B<\\*(Aqs\\*(Aq>"
>
> "B<\\*(Aqy\\*(Aq>"
This is autogenerated from files… We use slightly different markup in different files, and it's just too hard to make it consistent. We gave up on this.
> Man page: systemd.exec.5
> Issue 1: B<at>(1p) → B<at>(1)
> Issue 2: B<crontab>(1p) → B<crontab>(1)
Fixed.
> Man page: systemd.exec.5
> Issue: B<select()> → B<select>(2)
Fixed.
> Man page: systemd.exec.5
> Issue: qemu → B<qemu>(1)
The man page doesn't seem to be in any of the canonical places on the web.
I added a link to online docs.
> Man page: systemd.exec.5
> Issue: variable → variables
Seems to be fixed already.
> Man page: systemd-integritysetup-generator.8
> Issue: systemd-integritysetup-generator → B<systemd-integritysetup-generator>
I changed <filename> to <command>.
> Man page: systemd-integritysetup-generator.8
> Issue: superfluous comma at the end
Already fixed.
> Man page: systemd-measure.1
> Issue: (see B<--pcr-bank=>) below → (see B<--pcr-bank=> below)
Reworded.
> Man page: systemd-measure.1
> Issue: =PATH> → =>I<PATH>
Fixed.
> Man page: systemd-measure.1.po
> Issue: B<--bank=DIGEST> → B<--bank=>I<DIGEST>
Fixed.
> Man page: systemd.netdev.5
> Issue: os the → on the
Appears to have been fixed already.
> Man page: systemd.netdev.5
> Issue: Onboard → On-board (as in previous string)
Updated.
> Man page: systemd.network.5
> Issue: B<systemd-networkd> -> B<systemd-networkd>(8)
First reference does this, subsequent do not.
> Man page: systemd.network.5
> Issue: B<netlabelctl> → B<netlabelctl>(8)
First reference does this, subsequent do not.
> Man page: systemd.network.5
> Issue: Missing verb (aquired? configured?) in the half sentence starting with "or by a "
I dropped the comma.
> Man page: systemd-nspawn.1
> Issue: All host users outside of that range → All other host users
Reworded.
> # FIXME no effect → no effect\\&.
> #. type: Plain text
> #: archlinux debian-unstable fedora-rawhide mageia-cauldron opensuse-tumbleweed
> msgid ""
> "Whichever ID mapping option is used, the same mapping will be used for users "
> "and groups IDs\\&. If B<rootidmap> is used, the group owning the bind "
> "mounted directory will have no effect"
A period is added. Not sure if there's some other issue.
> Man page: systemd-oomd.service.8
> Issue: B<systemd> → B<systemd>(1)
Done.
> Man page: systemd.path.5
> Issue 1: B<systemd.exec>(1) → B<systemd.exec>(5)
> Issue 2: This section does not (yet?) exist
Fixed.
> Man page: systemd-pcrphase.service.8
> Issue 1: indicate phases into TPM2 PCR 11 ??
> Issue 2: Colon at the end of the paragraph?
Fixed.
> Man page: systemd-pcrphase.service.8
> Issue: final boot phase → final shutdown phase?
Updated.
> Man page: systemd-pcrphase.service.8
> Issue: for the the → for the
Fixed tree-wide.
> Man page: systemd-portabled.service.8
> Issue: In systemd-portabled.service(8): Portable Services Documentation
Updated.
> Man page: systemd-pstore.service.8
> Issue: Here and the following paragraphs: . → \\&. // Upstream: What does this comment mean? // You normally write \\&. for a full dot (full stop etc.); here you write only "." (i.e. a plain dot).
>
> "and we look up \"localhost\", nss-dns will send the following queries to "
> "systemd-resolved listening on 127.0.0.53:53: first \"localhost.foobar.com\", "
> "then \"localhost.barbar.com\", and finally \"localhost\". If (hopefully) the "
> "first two queries fail, systemd-resolved will synthesize an answer for the "
> "third query."
Looks all OK to me.
> Man page: systemd.resource-control.5
> Issue: Missing closing bracket after link to Control Groups version 1
Fixed.
> Man page: systemd-sysext.8
> Issue: In systemd-portabled.service(8): Portable Services Documentation
Updated.
> Man page: systemd.timer.5
> Issue 1: B<systemd.exec>(1) → B<systemd.exec>(5)
> Issue 2: This section does not (yet?) exist
Fixed.
> Man page: systemd.unit.5
> Issue: that is → that are
Fixed.
> Man page: systemd-veritysetup-generator.8
> Issue: systemd-veritysetup-generator → B<systemd-veritysetup-generator>
>
> "systemd-veritysetup-generator implements B<systemd.generator>(7)\\&."
>
> "systemd-veritysetup-generator understands the following kernel command line "
> "parameters:"
Updated.
> Man page: systemd-volatile-root.service.8
> Issue: initrdyes → Initrd
Fixed.
> Man page: sysupdate.d.5
> Issue: : → \\&. (As above in TRANSFER)
Updated.
> Man page: sysupdate.d.5
> Issue: some → certain
Updated.
> Man page: sysupdate.d.5
> Issue 1: i\\&.e\\& → I\\&.e\\&
Fixed.
> Issue 2: the image → the system
"image" seems correct.
> Man page: tmpfiles.d.5
> Issue: systemd-tmpfiles → B<systemd-tmpfiles>(8)
Updated.
Zbigniew Jędrzejewski-Szmek [Wed, 11 Jan 2023 14:04:11 +0000 (15:04 +0100)]
github: use 'meson setup'
Meson started warning when 'setup' is not used:
WARNING: Running the setup command as `meson [options]` instead of `meson setup [options]` is ambiguous and deprecated.
Also add more quoting in output to make the message clearer.
Spindle Security [Wed, 11 Jan 2023 09:57:20 +0000 (09:57 +0000)]
hwdb: Add mount matrix for Linx 1020
Lennart Poettering [Wed, 11 Jan 2023 12:57:03 +0000 (13:57 +0100)]
Merge pull request #26016 from poettering/base64mem-ret-fix
base64mem() return type fix
Lennart Poettering [Wed, 11 Jan 2023 09:42:05 +0000 (10:42 +0100)]
tree-wide: fix return value handling of base64mem()
This returns an ssize_t, not an int. On populare archs that's the
difference between 64bit and 32bit. hence, let's be more careful here,
and not silently drop half the bits on the ground by assigning the
return value to "int".
As noticed by @malikabhi05:
https://github.com/systemd/systemd/pull/24754#discussion_r1062903159
Lennart Poettering [Wed, 11 Jan 2023 09:44:16 +0000 (10:44 +0100)]
hexdecoct: modernize base64mem() variable naming a bit
Just some renaming addressing the fact we otherwise always call return
parameters "ret", and the local error variable "r".
no change in behaviour.
Luca Boccassi [Wed, 11 Jan 2023 09:32:50 +0000 (09:32 +0000)]
Merge pull request #26014 from yuwata/network-l2tp-fixes
network: L2TP fixlets
Jan Janssen [Tue, 10 Jan 2023 14:13:22 +0000 (15:13 +0100)]
ukify: Fix tools detection if --tools was not passed
In
789a642738d28cf2a8ad3f65df9c0c136e83af09 llvm-objcopy was given
higher priority over objcopy, but this would only work if --tools was
also passed.
Lennart Poettering [Wed, 11 Jan 2023 08:23:47 +0000 (09:23 +0100)]
Merge pull request #25916 from poettering/reload-notify
pid1: add new Type=notify-reload service type for a service reload protocol based on SIGHUP
Yu Watanabe [Wed, 11 Jan 2023 04:11:36 +0000 (13:11 +0900)]
network/l2tp: parse address or address type from correct string
Fixes a bug introduced by
8b49ee2dcda04f8147650f7d9fb93662caf3ea2e.
Fixes #26011.
Yu Watanabe [Wed, 11 Jan 2023 04:11:00 +0000 (13:11 +0900)]
network/l2tp: fix error code in log message
Luca Boccassi [Tue, 10 Jan 2023 21:21:24 +0000 (21:21 +0000)]
Merge pull request #25986 from yuwata/test-netlink
test-netlink: cleanups
Lennart Poettering [Mon, 2 Jan 2023 15:48:51 +0000 (16:48 +0100)]
update TODO
Lennart Poettering [Tue, 3 Jan 2023 11:56:53 +0000 (12:56 +0100)]
test: add Type=notify-reload testcase
Lennart Poettering [Tue, 3 Jan 2023 11:55:50 +0000 (12:55 +0100)]
notify: add --stopping + --reloading switches
These wrap RELOADING=1 and STOPPING=1 messages. The former is
particularly useful, since we want to insert the MONOTONIC_USEC= field
into the message automatically, which is easy from C but harder from
shell.
Lennart Poettering [Mon, 2 Jan 2023 16:35:23 +0000 (17:35 +0100)]
logind: implement Type=notify-reload protocol properly
So close already. Let's add the two missing notifications too.
Fixes: #18484
Lennart Poettering [Mon, 2 Jan 2023 16:21:16 +0000 (17:21 +0100)]
udevd: implement the full Type=notify-reload protocol
We are basically already there, just need to add MONOTONIC_USEC= to the
RELOADING=1 message, and make sure the message is generated in really
all cases.
Lennart Poettering [Mon, 2 Jan 2023 16:25:46 +0000 (17:25 +0100)]
networkd: implement Type=notify-reload protocol
Lennart Poettering [Mon, 2 Jan 2023 14:01:56 +0000 (15:01 +0100)]
pid1: make sure we send our calling service manager RELOADING=1 when reloading
And send READY=1 again when we are done with it.
We do this not only for "daemon-reload" but also for "daemon-reexec" and
"switch-root", since from the perspective of an encapsulating service
manager these three operations are not that different.
Lennart Poettering [Mon, 2 Jan 2023 17:13:27 +0000 (18:13 +0100)]
man: document Type=notify-reload
Lennart Poettering [Mon, 2 Jan 2023 15:49:23 +0000 (16:49 +0100)]
pid1: add new Type=notify-reload service type
Fixes: #6162
Lennart Poettering [Mon, 2 Jan 2023 14:00:05 +0000 (15:00 +0100)]
manager: add one more assert()
Lennart Poettering [Tue, 10 Jan 2023 17:28:10 +0000 (18:28 +0100)]
Merge pull request #26003 from keszybz/efi-ifdefs
Fix one compile-time conditional and refactor SD_BOOT definition
Ludwig Nussel [Tue, 27 Dec 2022 14:28:27 +0000 (15:28 +0100)]
bootctl: honor $KERNEL_INSTALL_CONF_ROOT
Honor $KERNEL_INSTALL_CONF_ROOT for reading config files, as
kernel-install does.
Richard Phibel [Mon, 7 Nov 2022 16:13:15 +0000 (17:13 +0100)]
core: add OpenFile setting
Daan De Meyer [Tue, 10 Jan 2023 12:16:33 +0000 (13:16 +0100)]
ci: Remove a bunch of labels when a PR is merged
Lennart Poettering [Tue, 10 Jan 2023 11:09:58 +0000 (12:09 +0100)]
shutdown: don't close pipe fds.
Man, I royally screwed this one up! 😳
Fixes: #25998
Zbigniew Jędrzejewski-Szmek [Mon, 9 Jan 2023 20:24:52 +0000 (21:24 +0100)]
man: restore example formatting in systemd-coredump(8)
Fixup for
4f57f77267610388139272d9ab9ee64dd78e9720.
Daan De Meyer [Tue, 10 Jan 2023 13:30:53 +0000 (14:30 +0100)]
Merge pull request #24939 from msizanoen1/journal-realtime-enforce-consistency
journal: enforce strict consistency for realtime timestamps on write
Zbigniew Jędrzejewski-Szmek [Tue, 10 Jan 2023 13:25:57 +0000 (14:25 +0100)]
meson: use 0|1 for SD_BOOT
We converted to not using #ifdef for most of our defines because the syntax is
nicer and we are protected against typos and can set -Werror=undef. Let's do
the same for SD_BOOT. The define is nicely hidden in build.h for normal builds,
and for EFI builds we were already setting SD_BOOT on the commandline.
Zbigniew Jędrzejewski-Szmek [Tue, 10 Jan 2023 13:08:41 +0000 (14:08 +0100)]
fundamental: fix compile check for explicit_bzero
Our HAVE_* variables are defined to 0 or 1, so '#if defined(HAVE_*)' is always true.
The variable is not defined when compiling for EFI though, so we need the
additional guard.
Fixup for
3f92dc2fd4070b213e6bc85263a9bef06ec9a486.
(I don't want to do something like add -DHAVE_EXPLICIT_BZERO=0 to the commandline
in src/efi/boot/meson.build, because this quite verbose. Our compilation commandlines
are very long already. Let's instead keep this localized in this one spot in the
source file.)x
Ludwig Nussel [Thu, 5 Jan 2023 14:31:13 +0000 (15:31 +0100)]
kernel-install: refactor some variables
In preparation for plugin support
Yu Watanabe [Mon, 9 Jan 2023 12:00:53 +0000 (21:00 +0900)]
test-netlink: use dummy interface to test assigning new interface name
Fixes #25981.
Yu Watanabe [Tue, 10 Jan 2023 09:20:04 +0000 (18:20 +0900)]
shutdown: propagate the original errno
Follow-up for
b293bb23162534e0260ed07357c2478655541166.
Kai-Chuan Hsieh [Tue, 10 Jan 2023 08:36:51 +0000 (16:36 +0800)]
hwdb: Mark Dell platform accel sensor location to base
Dell would like to disable screen rotation for the platform eternally.
Mark the aceel sensor location base to disable it.
drosdeck [Mon, 9 Jan 2023 15:56:00 +0000 (11:56 -0400)]
Fix Positivo MASTER-N1110 key toggle touchpad
Lennart Poettering [Tue, 10 Jan 2023 08:44:42 +0000 (09:44 +0100)]
Merge pull request #25980 from yuwata/udev-fail-to-rename-netif
udev,pid1: gracefully handle failure in renaming network interface
Ulrich Ölmann [Tue, 10 Jan 2023 06:39:49 +0000 (07:39 +0100)]
man: exec,nspawn: fix typo
Yu Watanabe [Mon, 9 Jan 2023 07:02:09 +0000 (16:02 +0900)]
test: add tests for failure in renaming network interface
Yu Watanabe [Mon, 9 Jan 2023 07:11:52 +0000 (16:11 +0900)]
core/device: ignore failed uevents
When udevd failed to process the device, SYSTEMD_ALIAS or any other
properties may contain invalid values. Let's refuse to handle the uevent.
Yu Watanabe [Mon, 9 Jan 2023 07:11:04 +0000 (16:11 +0900)]
core/device: downgrade log level for ignored errors
Yu Watanabe [Mon, 9 Jan 2023 07:44:11 +0000 (16:44 +0900)]
sd-device: introduce device_get_property_int()
Yu Watanabe [Mon, 9 Jan 2023 05:58:58 +0000 (14:58 +0900)]
udev: restore syspath and properties on failure
Otherwise, invalid sysname or properties may be broadcast to udev
listeners.
Lennart Poettering [Mon, 9 Jan 2023 13:07:07 +0000 (14:07 +0100)]
shutdown: propagate mount() failures from child to parent
Let's propagate the actual error code up, as we usual do.
Inspired by: #25168
Lennart Poettering [Mon, 9 Jan 2023 17:59:20 +0000 (18:59 +0100)]
Merge pull request #25982 from mrc0mmand/curl-scheme
Fix build with the latest libcurl
Jan Janssen [Sat, 7 Jan 2023 21:16:52 +0000 (22:16 +0100)]
boot: Simplify object erasure
This erase_obj() machinery looks like voodoo and creates an awful lot of
noise as soon as we get back to building with -O0. We can do this in a
more simple way by introducing a struct that holds the information we
need on cleanup. When building with optimization enabled, all this gets
inlined and the eraser vanishes.
msizanoen1 [Mon, 9 Jan 2023 16:05:19 +0000 (23:05 +0700)]
journal: handle clock rollback error in managed_journal_file_open_reliably
-EREMCHG was introduced to denote a clock rollback detection error.
Handle this in managed_journal_file_open_reliably.
msizanoen1 [Wed, 12 Oct 2022 08:38:25 +0000 (15:38 +0700)]
test-journal-flush: don't fail on -EREMCHG
-EREMCHG on write is now used to denote clock rollback conditions
detected during journal write.
msizanoen1 [Sat, 8 Oct 2022 07:37:02 +0000 (14:37 +0700)]
journal: enforce strict consistency for realtime timestamps on write
Ensure all realtime timestamps in a journal file are strictly
ordered on write as a defense-in-depth measure. All known callers of
journal_file_append_entry and journal_file_copy_entry, which call this
function, should be able to handle the error by rotating the journal.
This is especially helpful for systems with RTC local time enabled,
where all log entries from initramfs might be recorded as several hours
later than it actually is, which won't get caught by journald during log
flushing. In those cases, the resulting inconsistency can cause libsystemd
to loop infinitely through journal files as observed in
`abrt-dump-journal-oops`.
Frantisek Sumsal [Mon, 9 Jan 2023 11:44:28 +0000 (12:44 +0100)]
import: use CURLOPT_PROTOCOLS_STR with libcurl >= 7.85.0
CURLOPT_PROTOCOLS [0] was deprecated in libcurl 7.85.0 with
CURLOPT_PROTOCOLS_STR [1] as a replacement, causing build warnings/errors:
../build/src/import/curl-util.c: In function ‘curl_glue_make’:
../build/src/import/curl-util.c:255:9: error: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
255 | if (curl_easy_setopt(c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_FILE) != CURLE_OK)
| ^~
In file included from ../build/src/import/curl-util.h:4,
from ../build/src/import/curl-util.c:6:
/usr/include/curl/curl.h:1749:3: note: declared here
1749 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Since there's no grace period between the two symbols, let's resort
to a light if-def-ery to resolve this.
[0] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
[1] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html
Lennart Poettering [Mon, 9 Jan 2023 11:58:09 +0000 (12:58 +0100)]
man: make clearer that sd_bus_get_timeout() returns an absolute time-out
Prompted by:
https://lists.freedesktop.org/archives/systemd-devel/2023-January/048714.html
Frantisek Sumsal [Mon, 9 Jan 2023 09:09:52 +0000 (10:09 +0100)]
import: use CURLINFO_SCHEME instead of CURLINFO_PROTOCOL
CURLINFO_PROTOCOL has been deprecated in curl 7.85.0 causing compilation
warnings/errors:
../build/src/import/pull-job.c: In function ‘pull_job_curl_on_finished’:
../build/src/import/pull-job.c:142:9: error: ‘CURLINFO_PROTOCOL’ is deprecated: since 7.85.0. Use CURLINFO_SCHEME [-Werror=deprecated-declarations]
142 | code = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
| ^~~~
In file included from ../build/src/import/curl-util.h:4,
from ../build/src/import/pull-job.h:6,
from ../build/src/import/pull-common.h:7,
from ../build/src/import/pull-job.c:16:
/usr/include/curl/curl.h:2896:3: note: declared here
2896 | CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Since both CURLINFO_SCHEME and CURLINFO_PROTOCOL were introduced in
the same curl version (7.52.0 [0][1]) we don't have to worry about
backwards compatibility.
[0] https://curl.se/libcurl/c/CURLINFO_SCHEME.html
[1] https://curl.se/libcurl/c/CURLINFO_PROTOCOL.html
Yu Watanabe [Mon, 9 Jan 2023 11:33:35 +0000 (20:33 +0900)]
test: modernize test-netlink.c
Lennart Poettering [Mon, 9 Jan 2023 08:56:04 +0000 (09:56 +0100)]
Merge pull request #25979 from yuwata/coverity-fixes
Coverity fixes
Jan Janssen [Sun, 8 Jan 2023 08:07:22 +0000 (09:07 +0100)]
boot: Remove option TPM PCR compat option
It says remove in 2023; happy to oblige.
Yu Watanabe [Mon, 9 Jan 2023 06:00:30 +0000 (15:00 +0900)]
udev: move device_rename() from device-private.c
The function is used only by udevd.
Yu Watanabe [Mon, 9 Jan 2023 05:07:16 +0000 (14:07 +0900)]
sd-device: do not directly access entry in sd-device object
No functional change, just refactoring.
Yu Watanabe [Mon, 9 Jan 2023 05:00:09 +0000 (14:00 +0900)]
sd-device: make device_set_syspath() clear sysname and sysnum
Otherwise, when a new syspath is assigned to the sd-device object,
sd_device_get_sysname() or _sysnum() will provide an outdated device
name or number.
Yu Watanabe [Mon, 9 Jan 2023 02:20:35 +0000 (11:20 +0900)]
udev: align table
Yu Watanabe [Mon, 9 Jan 2023 02:00:53 +0000 (11:00 +0900)]
bootctl: 'tmp' is always non-NULL
Fixes CID#
1502330.
Yu Watanabe [Mon, 9 Jan 2023 01:58:10 +0000 (10:58 +0900)]
bootctl: fix indentation
Yu Watanabe [Mon, 9 Jan 2023 01:53:20 +0000 (10:53 +0900)]
tmpfile: make failure in path_extract_filename() non-critical
Yu Watanabe [Mon, 9 Jan 2023 01:52:30 +0000 (10:52 +0900)]
tmpfile: fix resource leak
Fixes CID#
1501687.
Siddhesh Poyarekar [Sun, 8 Jan 2023 00:30:32 +0000 (19:30 -0500)]
alloc-util: Disallow inlining of expand_to_usable
Explicitly set __attribute__ ((noinline)) so that the compiler does not
attempt to inline expand_to_usable, even with LTO.
Luca Boccassi [Sat, 7 Jan 2023 16:56:14 +0000 (17:56 +0100)]
Merge pull request #25915 from poettering/arm-timer-rel
pid1: rework service_arm_timer() to optionally take a relative time v…
Luca Boccassi [Sat, 7 Jan 2023 16:52:49 +0000 (17:52 +0100)]
Merge pull request #25936 from poettering/emergaction-fix
EmergencyAction parsing fix
Frantisek Sumsal [Sat, 7 Jan 2023 09:27:05 +0000 (10:27 +0100)]
oss-fuzz: include generated corpora in the final zip file
Since the files with generated directives are now automatically
generated during build, they're now under the respective build directory
which the current oss-fuzz CI script didn't account for.
Follow-up to: #24958
Resolves: #25859
Lennart Poettering [Fri, 6 Jan 2023 18:02:16 +0000 (19:02 +0100)]
man: improve docs about systemd-notify invocations and NotifyAccess= settings
Fixes: #24516
dependabot[bot] [Fri, 6 Jan 2023 18:48:52 +0000 (18:48 +0000)]
build(deps): bump stefanbuck/github-issue-parser from 2.0.4 to 3.0.1
Bumps [stefanbuck/github-issue-parser](https://github.com/stefanbuck/github-issue-parser) from 2.0.4 to 3.0.1.
- [Release notes](https://github.com/stefanbuck/github-issue-parser/releases)
- [Commits](https://github.com/stefanbuck/github-issue-parser/compare/
f80b14f78892a66d7a35bba44f0a7d63bee03602...
c1a559d78bfb8dd05216dab9ffd2b91082ff5324)
---
updated-dependencies:
- dependency-name: stefanbuck/github-issue-parser
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:06 +0000 (09:01 +0000)]
build(deps): bump ossf/scorecard-action from 2.0.6 to 2.1.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.6 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/
99c53751e09b9529366343771cc321ec74e9bd3d...
e38b1902ae4f44df626f11ba0734b14fb91f8f86)
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:09 +0000 (09:01 +0000)]
build(deps): bump github/super-linter from 4.9.6 to 4.9.7
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.9.6 to 4.9.7.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/
01d3218744765b55c3b5ffbb27e50961e50c33c5...
bb2d833b08b6c288608686672b93a8a4589cdc49)
---
updated-dependencies:
- dependency-name: github/super-linter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:18 +0000 (09:01 +0000)]
build(deps): bump actions/checkout from 3.0.2 to 3.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...
755da8c3cf115ac066823e79a1e1788f8940201b)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>