Commit Graph
57095 Commits
Author SHA1 Message Date
Luca Boccassi f72f802118 update NEWS
Fix typo and list all user session settings that now are documented
to work
2022-03-24 22:46:14 +00:00
Lennart Poettering 60a777b575 update NEWS 2022-03-24 22:41:39 +01:00
Lennart Poettering 38639aa28f hostnamed: properly reset hw model/vendor props before re-reading them
Follow-up for 4fc7e4f374
2022-03-24 21:29:13 +01:00
Lennart Poettering 0924ea2b26 machine-info: rename VENDOR=/MODEL= → HARDWARE_VENDOR=/HARDWARE_MODEL=
Let's be more precise here. Otherwise people might think this describes
the software system or so. We already expose this via hostnamed as
HardwareVendor/HardwareModel hence use the exact same wording.

(Note that the relevant props on the dmi device are just VENDOR/MODEL,
but that's OK given that DMI really is about hardware anyway,
unconditionally, hence no chance of confusion there.)

Follow-up for 4fc7e4f374
2022-03-24 21:29:13 +01:00
Frantisek Sumsal a73c7a87ae Merge pull request #22855 from keszybz/test-68-reload-reload
TEST-68: replace daemon-reload with separate handler units
2022-03-24 19:52:16 +00:00
Lennart Poettering 3824ce0522 Merge pull request #22840 from poettering/efivars-tweaks
util-lib: efi variable access refactorings
2022-03-24 18:39:46 +01:00
Lennart Poettering e1f0c1367c NEWS: various tweaks 2022-03-24 17:59:25 +01:00
Yu Watanabe c02fb80479 udev: try to reload selinux label database less frequently
Previously, `event_run()` was called repeatedly in one `event_queue_start()`
invocation. Hence, the SELinux label database is reloaded many times needlessly.
Other settings, e.g. udev rules or hwdata, are tried to be reloaded in the
beginning of `event_queue_start()`. Let's also do so for the SELinux database.
2022-03-24 16:20:42 +01:00
Yu Watanabe 2d40f02ee4 udev: assume there is no blocker when failed to check event dependencies
Previously, if udevd failed to resolve event dependency, the event is
ignored and libudev listeners did not receive the event. This is
inconsistent with the case when a worker failed to process a event,
in that case, the original uevent sent by the kernel is broadcasted to
listeners.
2022-03-24 16:20:32 +01:00
Yu Watanabe ef400c3878 udev: only ignore ENOENT or friends which suggest the block device is not exist
The ENOENT, ENXIO, and ENODEV error can happen easily when a block
device appears and soon removed. So, it is reasonable to ignore the
error. But other errors should not occur here, and hence let's handle
them as critical.
2022-03-24 16:20:08 +01:00
Lennart Poettering 3f2ada89f3 errno-util: add ERRNO_IS_DEVICE_ABSENT() macro
Inspired by: https://github.com/systemd/systemd/pull/22717#discussion_r834254495
2022-03-24 16:19:48 +01:00
Yu Watanabe 4029328014 udev: remove /run/udev/queue in on_post()
When the last queued event is processed, information about subsequent
events may be already queued in the netlink socket of sd-device-monitor.
In that case, previously we once removed /run/udev/queue and touch the
file soon later, and `udevadm settle` mistakenly considered all events
are processed.

To mitigate such situation, this makes /run/udev/queue removed in on_post().
2022-03-24 16:19:36 +01:00
Yu Watanabe 9612da361a udev: use sd_event_source_disable_unref()
This should not change any behavior, as the event sources are not
shared. Just for safety.
2022-03-24 16:19:20 +01:00
Yu Watanabe 87afc766d1 udev: update comment and log message 2022-03-24 16:19:05 +01:00
Lennart Poettering 7be4b23649 efi-loader: split efi-api.[ch] from efi-loader.[ch]
Some refactoring: split efi-loader.[ch] in two: isolate the calls that
implement out boot loader interface spec, and those which implement
access to upstream UEFI firmware features.

They are quite different in nature and behaviour, and even semantically
it makes to keep these two separate. At the very least because the
previous name "efi-loader.[ch]" suggests all was about loader-specific
APIs, but much of it is generic uefi stuff...

While we are at it, I renamed a bunch of return parameters to follow our
usual ret_xyz naming. But besides renaming no real code changes.
2022-03-24 15:21:09 +01:00
Lennart Poettering 8fc5c44426 efivars: define efi variable flags less weirdly
The flags are actually 32bit values, but aligned with zeroes befitting a
64bit value. Let's fix that.
2022-03-24 15:21:03 +01:00
Lennart Poettering 187513fd3a efivarfs: rename a couple of return params to ret_xyz/ret 2022-03-24 15:20:57 +01:00
Lennart Poettering afd1a45a16 efivars: downgrade log level in systemd_efi_options_efivarfs_if_newer()
The only caller logs anyway, let's avoid duplicate logging above
LOG_DEBUG.
2022-03-24 15:20:53 +01:00
Lennart Poettering 83fe0be170 efivars: no need to convert ENOENT → ENODATA twice
read_efi_options_variable() already does this, don#t do it again.
2022-03-24 15:20:49 +01:00
Lennart Poettering bc5eb90015 efivars: tweak debug log message in efi_get_secure_boot_mode()
mention what we'll do as effect of the error we are seeing and eat up.
2022-03-24 15:20:45 +01:00
Lennart Poettering 3e09ad57c6 efivars: cache ENOENT as no efi secure boot
On systems lacking EFI or the SecureBoot efi var the caching of this
info didn#t work, since we'd see ENOENT when reading the var, and cache
that, which we then use as reason to retry next time.

Let's fix that and convert ENOENT to "secure boot", because that's what
it really means. All other errors are left as is (and reason to retry).
But let's add some debug logging for that case.
2022-03-24 15:18:52 +01:00
Zbigniew Jędrzejewski-Szmek 74fbb24f64 TEST-68: instead of calling daemon-reload, just use different cleanup units
On a very slow machine, things are executed out-of-order, and something
pins the previously-exited unit. Instead of fighting with this with daemon-reload,
let's just use a different cleanup unit.

Hopefully fixes #22755.
2022-03-24 14:11:54 +01:00
Lennart Poettering d01133125c bpf-firewall: invert test
Following our coding style of exiting early (instead of deep nesting),
let's invert the if check here.

Inspired by: https://github.com/systemd/systemd/pull/21602#pullrequestreview-919960060
2022-03-24 13:54:50 +01:00
David Tardon bbd2620022 logind-user: log about the right unit 2022-03-24 13:53:31 +01:00
Yu Watanabe f7adeaeb89 journal-remote: refuse to specify --trust option when gnutls is disabled
and check_permission() should not be called in that case.

Replaces #22847.
2022-03-24 13:53:04 +01:00
Zbigniew Jędrzejewski-Szmek 6741235430 TEST-68: get rid of unnecessary descriptions
The name of the unit already says all, no need to duplicate this.
And the comments can easily get out of date, as they did.
2022-03-24 13:45:38 +01:00
Antonio Alvarez Feijoo 7500c6cbef cryptsetup: fix typo 2022-03-24 12:08:54 +00:00
Lennart Poettering dca92ca300 update TODO 2022-03-24 09:44:52 +01:00
Yu Watanabe bc7a6ee4af Merge pull request #22800 from poettering/safe-ptr-sub1
Add helper macro PTR_SUB1() to deal with backwards iteration through arrays without UB
2022-03-24 06:34:09 +09:00
Yu Watanabe 2859932bd6 network: do not enable IPv4 ACD for IPv4 link-local address if ACD is disabled explicitly
The commit 1cf4ed142d makes the IPv4 ACD
enabled unconditionally for IPv4 link-local addresses even if users
explicitly disable ACD.

This makes the IPv4 ACD is enabled by default, but honor user setting.

Fixes #22763.
2022-03-23 17:59:38 +01:00
Frantisek Sumsal 000096f4c6 lgtm: disable cpp/missing-return (again)
It looks like the fix for https://github.com/github/codeql/issues/8409
is not yet in production (and the respective query needs to be enabled
in both the main and the PR branch to get results for it, hence why it
passed in #22837).
2022-03-23 16:40:33 +00:00
Heiko Becker 43a5fd98a5 meson: Detect python instead of hard-coding python3
It allows to specify the desired python executable (and version) via
meson's native file if there are multiple versions available.
2022-03-23 22:15:23 +09:00
Frantisek Sumsal 4da5e99a8f Revert "lgtm: disable cpp/missing-return"
This reverts commit 6f4bffb586.

Should be, hopefully, fixed by https://github.com/github/codeql/issues/8409.
2022-03-23 22:11:24 +09:00
Yu Watanabe 007950dcd1 dns-domain: use PTR_SUB1() macro 2022-03-23 21:57:59 +09:00
Yu Watanabe 93e04eb43b test: add tests for device id 2022-03-23 21:57:39 +09:00
Yu Watanabe 13659527ef sd-device: use path_find_last_component() to set driver subsystem 2022-03-23 21:57:39 +09:00
Yu Watanabe 3066293dd3 path-util: use PTR_SUB1() macro in path_find_last_component() 2022-03-23 21:57:39 +09:00
Yu Watanabe e7bf2fcab0 core/namespace: inline one more iterator variable 2022-03-23 21:57:39 +09:00
Lennart Poettering 3e3ee42072 tree-wide: use PTR_SUB1() at two places where appropriate 2022-03-23 21:57:25 +09:00
Lennart Poettering 13a5ffa477 doc: two markdown markup fixes 2022-03-23 13:47:15 +01:00
Lennart Poettering 50996f04ad macro: add macro that simplifies going backwards through an array via pointers
Inspired by #22797, let's avoid some UB when iterating through arrays.
2022-03-23 21:46:08 +09:00
Zbigniew Jędrzejewski-Szmek 4053d11006 various: inline some iterator variables 2022-03-23 21:46:05 +09:00
Lennart Poettering 3f4ead8d5f doc: add a bunch of missing <br> 2022-03-23 13:44:25 +01:00
Yu Watanabe 904447ce5a Merge pull request #22835 from keszybz/foreach_string-inline-iterator
Inline the iterator declaration in FOREACH_STRING
2022-03-23 21:43:02 +09:00
Zbigniew Jędrzejewski-Szmek 5c09daf8ff Merge pull request #22836 from poettering/more-build-image-docs
docs: more tweaks for the image building docs
2022-03-23 12:42:47 +01:00
Lennart Poettering f1a147f2be update TODO 2022-03-23 12:29:20 +01:00
Lennart Poettering 3976da0265 docs: extend BUILDING_IMAGES with a section about IMAGE_ID=/IMAGE_VERSION=
Also, beef up links everywhere.
2022-03-23 12:25:01 +01:00
Lennart Poettering 8f39ecf6aa docs: link up new image building docs a bit 2022-03-23 12:25:01 +01:00
Lennart Poettering a43d2229bb docs: make man page links in markdown Links section use teletype font, as we usually do 2022-03-23 12:25:01 +01:00
Zbigniew Jędrzejewski-Szmek b9fbff7403 systemctl: use the right name in error message 2022-03-23 11:50:18 +01:00