]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agotest: add some basic area tests 36149/head
Lennart Poettering [Fri, 24 Jan 2025 13:52:29 +0000 (14:52 +0100)] 
test: add some basic area tests

9 months agodocs: document the new area functionality
Lennart Poettering [Fri, 24 Jan 2025 08:33:24 +0000 (09:33 +0100)] 
docs: document the new area functionality

9 months agohomectl: make default area configurable
Lennart Poettering [Fri, 24 Jan 2025 12:35:01 +0000 (13:35 +0100)] 
homectl: make default area configurable

9 months agorun0: add explicit support for opening sessions in specific areas
Lennart Poettering [Fri, 24 Jan 2025 09:24:09 +0000 (10:24 +0100)] 
run0: add explicit support for opening sessions in specific areas

9 months agopam: introduce multiple per-user "areas", i.e. "sub-home-directories" of sorts
Lennart Poettering [Fri, 3 Jan 2025 20:10:25 +0000 (21:10 +0100)] 
pam: introduce multiple per-user "areas", i.e. "sub-home-directories" of sorts

9 months agouser-record: add new 'default_area' field, but don't hook it up yet
Lennart Poettering [Fri, 3 Jan 2025 17:21:14 +0000 (18:21 +0100)] 
user-record: add new 'default_area' field, but don't hook it up yet

9 months agojson-util: add generic json_dispatch_filename() dispatch helper
Lennart Poettering [Fri, 3 Jan 2025 17:20:05 +0000 (18:20 +0100)] 
json-util: add generic json_dispatch_filename() dispatch helper

9 months agoexec-invoke: respect $HOME set via PAM
Lennart Poettering [Fri, 24 Jan 2025 10:17:55 +0000 (11:17 +0100)] 
exec-invoke: respect $HOME set via PAM

This follows the same recent change in util-linux:

https://github.com/util-linux/util-linux/pull/3354

i.e. we generally want that PAM modules can override $HOME and it is
honoured for the CWD after login.

(This renames the 'home' variable we maintained sofar to 'pwent_home',
to clarify that it's the home directory listed in the struct passwd
entry, and thus not necessarily the one actually used)

9 months agoboot: several follow-ups for .efifw section support (#36230)
Yu Watanabe [Thu, 6 Feb 2025 05:53:12 +0000 (14:53 +0900)] 
boot: several follow-ups for .efifw section support (#36230)

Follow-ups for #35091.

9 months agohwdb: fix screen rotation for EXO Wings 2in1 w1125 (#36283)
Trollimpo [Thu, 6 Feb 2025 00:44:14 +0000 (21:44 -0300)] 
hwdb: fix screen rotation for EXO Wings 2in1 w1125 (#36283)

9 months agoudevadm: several cleanups for command line option parsers (#36241)
Yu Watanabe [Thu, 6 Feb 2025 00:39:03 +0000 (09:39 +0900)] 
udevadm: several cleanups for command line option parsers (#36241)

9 months agoudev-builtin: several trivial cleanups (#36239)
Yu Watanabe [Thu, 6 Feb 2025 00:38:39 +0000 (09:38 +0900)] 
udev-builtin: several trivial cleanups (#36239)

- introduces UDEV_BUILTIN_DESTRUCTOR macro,
- normalize log messages on initialize/finalize,
- explicitly initialize global variable,
- drop using _UDEV_BUILTIN_INVALID.

9 months agoupdate TODO
Lennart Poettering [Wed, 5 Feb 2025 22:37:07 +0000 (23:37 +0100)] 
update TODO

9 months agoresolved: fix DNSSEC `missing-key` error
Fabian Möller [Wed, 22 Jan 2025 12:33:12 +0000 (13:33 +0100)] 
resolved: fix DNSSEC `missing-key` error

Skip unsupport/invalid `DS` and `DNSKEY` combinations during verification.

Fixes: #12545
9 months agohomectl: fix typos in help text (#36279)
Luca Boccassi [Wed, 5 Feb 2025 19:54:08 +0000 (19:54 +0000)] 
homectl: fix typos in help text (#36279)

I noticed two small typos while reading the help text for homectl.
The `-P` option is described as "Same as
--enforce-password-**password**=no" when the option's name is
`--enforce-password-policy`.
While checking the man page to check if the typo was also there, i
noticed another typo where `--enforce-password-policy=no` has 3 dashes
instead of 2 in the description for `-P`.

9 months agohomectl: fix typo in man page 36279/head
Matthieu LAURENT [Wed, 5 Feb 2025 16:31:15 +0000 (17:31 +0100)] 
homectl: fix typo in man page

9 months agohomectl: fix typo in help text
Matthieu LAURENT [Wed, 5 Feb 2025 16:28:37 +0000 (17:28 +0100)] 
homectl: fix typo in help text

9 months agorepart: Don't fail when we're unable to read file attributes
Daan De Meyer [Wed, 5 Feb 2025 11:42:39 +0000 (12:42 +0100)] 
repart: Don't fail when we're unable to read file attributes

We're getting EOVERFLOW when reading file attributes trying to get
mkosi running in a docker container (don't ask). I have a suspicion
this is coming from fuse-overlayfs. Anyway, since the file attributes
stuff is supposed to be purely optional, let's not fail when we can't
read file attributes for whatever reason.

9 months agonetwork/route: improve Gateway=_dhcp4 handling (#36183)
Luca Boccassi [Wed, 5 Feb 2025 12:19:01 +0000 (12:19 +0000)] 
network/route: improve Gateway=_dhcp4 handling (#36183)

- Also configures route to the gateway and prefix route in the specified
table, if necessary.
- Also set preferred source address of the route.

Closes #36168.

9 months agoupdate TODO
Lennart Poettering [Wed, 5 Feb 2025 10:51:31 +0000 (11:51 +0100)] 
update TODO

9 months agoupdate TODO
Lennart Poettering [Mon, 3 Feb 2025 11:47:57 +0000 (12:47 +0100)] 
update TODO

9 months agoman/udevadm: several minor cleanups (#36267)
Daan De Meyer [Wed, 5 Feb 2025 08:52:29 +0000 (09:52 +0100)] 
man/udevadm: several minor cleanups (#36267)

9 months agonetwork/routing-policy-rule: fix compare function (#36268)
Daan De Meyer [Wed, 5 Feb 2025 08:50:59 +0000 (09:50 +0100)] 
network/routing-policy-rule: fix compare function (#36268)

Fixes a regression caused by fc58350aa464cd2414b6fe9fec089412120c7d52
(v257).
Fixes #35874.

9 months agoman/udevadm: rebreak and reindent lines 36267/head
Yu Watanabe [Wed, 5 Feb 2025 00:01:28 +0000 (09:01 +0900)] 
man/udevadm: rebreak and reindent lines

9 months agoman/udevadm: list --version as a common option
Yu Watanabe [Wed, 5 Feb 2025 00:00:20 +0000 (09:00 +0900)] 
man/udevadm: list --version as a common option

Then, drop --version and --help from each sub commands.

9 months agostub: Mention that VirtualSize should be <= SizeOfRawData
Daan De Meyer [Tue, 4 Feb 2025 13:52:02 +0000 (14:52 +0100)] 
stub: Mention that VirtualSize should be <= SizeOfRawData

9 months agoTwo test readme improvements (#36265)
Yu Watanabe [Wed, 5 Feb 2025 01:08:00 +0000 (10:08 +0900)] 
Two test readme improvements (#36265)

9 months agotest-network: add test case for issue #35874 36268/head
Yu Watanabe [Wed, 5 Feb 2025 00:40:31 +0000 (09:40 +0900)] 
test-network: add test case for issue #35874

9 months agonetwork/routing-policy-rule: fix compare func
Yu Watanabe [Wed, 5 Feb 2025 00:14:51 +0000 (09:14 +0900)] 
network/routing-policy-rule: fix compare func

Previously, when comparing an existing and requested routing policy
rules, `all` flag was unset, thus the from and to addresses in the two
rules were not compared. Hence, a new request with from and/or to
addresses might be considered as it already exists even the addresses of
existing one were different from the newly requested one.

All existing rules have valid family, i.e. AF_INET or AF_INET6. And,
all requesting rules with from and/or to addresses also have a valid
family. Hence, even `all` flag is unset, the addresses can be and must
be compared in that case.

Fixes a regression caused by fc58350aa464cd2414b6fe9fec089412120c7d52 (v257).
Fixes #35874.

9 months agotest: Move external packages section down and reword a little 36265/head
Daan De Meyer [Tue, 4 Feb 2025 19:46:11 +0000 (20:46 +0100)] 
test: Move external packages section down and reword a little

This is advanced level stuff that regular contributors don't care
about in the slightest, so move it further down. Also reword the
section a little while we're at it.

9 months agotest: Move NO_BUILD instructions to a separate section
Daan De Meyer [Tue, 4 Feb 2025 19:24:17 +0000 (20:24 +0100)] 
test: Move NO_BUILD instructions to a separate section

This isn't relevant for regular development, so let's move it to a
separate section.

9 months agotest: Drop -Dremote=enabled instructions from readme
Daan De Meyer [Tue, 4 Feb 2025 19:21:36 +0000 (20:21 +0100)] 
test: Drop -Dremote=enabled instructions from readme

The test commands now use mkosi sandbox which always makes sure the
required dependencies for systemd-journal-remote are enabled so no
need to reconfigure meson explicitly anymore.

9 months agomachine: introduce io.systemd.MachineImage.CleanPool (#35928)
Daan De Meyer [Tue, 4 Feb 2025 17:43:23 +0000 (18:43 +0100)] 
machine: introduce io.systemd.MachineImage.CleanPool (#35928)

This PR introduces io.systemd.MachineImage.CleanPool method which is
alternative to DBus's CleanPool.

9 months agoukify/measure: Revert changes to use SizeOfImage from Linux PE binary
Daan De Meyer [Tue, 4 Feb 2025 08:24:26 +0000 (09:24 +0100)] 
ukify/measure: Revert changes to use SizeOfImage from Linux PE binary

With 19812661f1f65ebe777d1626b5abf6475faababc, we make sure at runtime
in the stub itself that SizeOfImage from the Linux EFISTUB PE binary is
taken into account, so there's no need to take this into account in ukify
itself. By reverting the ukify change, we again ensure that Misc_VirtualSize
reflects the actual size of the Linux EFISTUB PE binary in the .linux section
which lots of tooling depends on. It also makes sure we don't measure a bunch
of extra zeroes in the stub which should fix systemd-pcrlock measurements as
well.

This effectively reverts 2188c759f97e40b97ebe3e94e82239f36b525b10 and
0005411352f9bda0d9887c37b9e75a2bce6c1133.

Fixes #35851

9 months agomachine: tests for io.systemd.MachineImage.CleanPool 35928/head
Ivan Kruglov [Wed, 8 Jan 2025 15:02:26 +0000 (16:02 +0100)] 
machine: tests for io.systemd.MachineImage.CleanPool

9 months agomachine: introduce io.systemd.MachineImage.CleanPool
Ivan Kruglov [Wed, 8 Jan 2025 12:56:14 +0000 (13:56 +0100)] 
machine: introduce io.systemd.MachineImage.CleanPool

9 months agomachine: use image_clean_pool_operation() in dbus
Ivan Kruglov [Wed, 8 Jan 2025 11:41:45 +0000 (12:41 +0100)] 
machine: use image_clean_pool_operation() in dbus

9 months agomachine: image_clean_pool_operation()
Ivan Kruglov [Tue, 7 Jan 2025 15:30:17 +0000 (16:30 +0100)] 
machine: image_clean_pool_operation()

9 months agomachine: rename machine_copy_from_to() -> machine_copy_from_to_operation()
Ivan Kruglov [Wed, 8 Jan 2025 12:48:19 +0000 (13:48 +0100)] 
machine: rename machine_copy_from_to() -> machine_copy_from_to_operation()

This is done to make it clear that machine_copy_from_to() use and
returns an Operation object.

9 months agosysupdate: Update example mode to 644 instead of 444
Daan De Meyer [Tue, 4 Feb 2025 10:42:42 +0000 (11:42 +0100)] 
sysupdate: Update example mode to 644 instead of 444

The UKI file has to be writable to be able to do boot counting in
the UEFI firmware which involves renaming the file by writing to
the file metadata which requires the file to be writable in the FAT
filesystem.

Fixes #36170

9 months agomeson: add install tag for systemctl
Vyacheslav Yurkov [Sun, 2 Feb 2025 09:13:38 +0000 (10:13 +0100)] 
meson: add install tag for systemctl

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
9 months agodocs: Update CPE fields in package metadata spec (#36251)
Dimitri John Ledkov [Mon, 3 Feb 2025 22:14:56 +0000 (22:14 +0000)] 
docs: Update CPE fields in package metadata spec (#36251)

Update osCPE field example to use cpe 2.3 format, as is in active use by
AmazonLinux 2023 for example.

Add appCPE field example to document the upstream application CPE for
the applicable CVEs. Often distribution source package names are
different from the upstream CPE. For example adding/removing "lib"
prefix, or adding version stream "-3" suffix. This typically leads to
guessing or fuzzy matching. Adding appCPE in such cases can help to
disambiguate (or collate) correct application CPEs; especially beyond
the lifetime of osCPE support timeframes. This also will help a lot with
packaging multiple alternative source packages of the same software
(e.g. nginx-full nginx-core); different version streams (e.g.
openssl-1.1, openssl-3); or alternative builds of upstream software with
largely the same CVEs with multiple version streams (e.g.
openjdk-{22,17,11..}, corretto-{22,17,11..}, temurin-{22,17,11..}, etc).

9 months agopo: Translated using Weblate (Bulgarian)
Alexander Shopov [Mon, 3 Feb 2025 14:38:39 +0000 (15:38 +0100)] 
po: Translated using Weblate (Bulgarian)

Currently translated at 87.5% (225 of 257 strings)

Co-authored-by: Alexander Shopov <ash@kambanaria.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/bg/
Translation: systemd/main

9 months agohomectl: Fix empty checks
Daan De Meyer [Mon, 3 Feb 2025 15:17:00 +0000 (16:17 +0100)] 
homectl: Fix empty checks

9 months agoUpdate TODO
Daan De Meyer [Mon, 3 Feb 2025 16:09:21 +0000 (17:09 +0100)] 
Update TODO

9 months agoSymlink NVD CPE search 36251/head
Dimitri John Ledkov [Mon, 3 Feb 2025 12:00:24 +0000 (12:00 +0000)] 
Symlink NVD CPE search

9 months agodocs: Update CPE fields in package metadata spec
Dimitri John Ledkov [Mon, 3 Feb 2025 10:55:20 +0000 (10:55 +0000)] 
docs: Update CPE fields in package metadata spec

Update osCPE field example to use cpe 2.3 format, as is in active use by
AmazonLinux 2023 for example.

Add appCPE field example to document the upstream application CPE for the
applicable CVEs. Often distribution source package names are different from the
upstream CPE. For example adding/removing "lib" prefix, or adding version
stream "-3" suffix. This typically leads to guessing or fuzzy matching. Adding
appCPE in such cases can help to disambiguate (or collate) correct application
CPEs; especially beyond the lifetime of osCPE support timeframes.

9 months agouser-runtime-dir: Log the quota limit in the warning message on failure
Daan De Meyer [Mon, 3 Feb 2025 08:48:35 +0000 (09:48 +0100)] 
user-runtime-dir: Log the quota limit in the warning message on failure

9 months agoukify: Calculate section size more correctly (#36215)
Zbigniew Jędrzejewski-Szmek [Mon, 3 Feb 2025 09:17:37 +0000 (10:17 +0100)] 
ukify: Calculate section size more correctly (#36215)

We should only use Misc_VirtualSize if it's smaller than SizeOfRawData,
since in that case it'll be the non-aligned section size. Otherwise we
have to use SizeOfRawData to get the size on disk.

9 months agoMerge remote-tracking branch 'weblate/main' into HEAD
Yu Watanabe [Sun, 2 Feb 2025 07:21:10 +0000 (16:21 +0900)] 
Merge remote-tracking branch 'weblate/main' into HEAD

9 months agopo: Added translation using Weblate (Interlingua)
Emilio Sepulveda [Sun, 2 Feb 2025 05:37:08 +0000 (06:37 +0100)] 
po: Added translation using Weblate (Interlingua)

Co-authored-by: Emilio Sepulveda <emism.translations@gmail.com>
9 months agoudevadm-verify: document '--resolve-names=late' and accept 'never' as is 36241/head
Yu Watanabe [Sun, 2 Feb 2025 06:28:15 +0000 (15:28 +0900)] 
udevadm-verify: document '--resolve-names=late' and accept 'never' as is

When '--resolve-names=late', systemd-udevd resolves user/group names
during each event being processed, and does not verify names on parse.
When '--resolve-names=never', systemd-udevd refuses any user/group names
on parse. Hence, the parser of udev rules behaves diffrently. Let's not
convert 'never' -> 'late' silently, and use the specified option as is.

This also updates man page and shell completion for --resolve-names
option.

9 months agoudevadm: introduce parse_resolve_name_timing()
Yu Watanabe [Sun, 2 Feb 2025 06:24:17 +0000 (15:24 +0900)] 
udevadm: introduce parse_resolve_name_timing()

9 months agoudevadm: several cleanups around parse_device_action()
Yu Watanabe [Sun, 2 Feb 2025 04:30:26 +0000 (13:30 +0900)] 
udevadm: several cleanups around parse_device_action()

- drop unnecessary one line function dump_device_action_table(),
- make parse_device_action() log about invalid action string,
- rename output argument of parse_device_action().

9 months agopo: sort languages
Yu Watanabe [Sun, 2 Feb 2025 06:44:10 +0000 (15:44 +0900)] 
po: sort languages

9 months agopo: Added translation using Weblate (Interlingua)
Emilio Sepulveda [Sun, 2 Feb 2025 05:37:08 +0000 (06:37 +0100)] 
po: Added translation using Weblate (Interlingua)

Co-authored-by: Emilio Sepulveda <emism.translations@gmail.com>
9 months agoudev: replace '!= _UDEV_BUILTIN_INVALID' -> '>= 0' 36239/head
Yu Watanabe [Sun, 2 Feb 2025 04:08:53 +0000 (13:08 +0900)] 
udev: replace '!= _UDEV_BUILTIN_INVALID' -> '>= 0'

No functional change, just refactoring.

9 months agoudev-builtin-hwdb: explicitly initialize global variable
Yu Watanabe [Sun, 2 Feb 2025 03:44:57 +0000 (12:44 +0900)] 
udev-builtin-hwdb: explicitly initialize global variable

9 months agoudev-builtin: normalize load/unload log messages by builtins
Yu Watanabe [Sun, 2 Feb 2025 03:38:00 +0000 (12:38 +0900)] 
udev-builtin: normalize load/unload log messages by builtins

9 months agoudev: introduce UDEV_BUILTIN_DESTRUCTOR macro
Yu Watanabe [Sun, 2 Feb 2025 03:35:38 +0000 (12:35 +0900)] 
udev: introduce UDEV_BUILTIN_DESTRUCTOR macro

9 months agoman: systemd-repart: factory=reset typo
andhe [Sat, 1 Feb 2025 23:07:06 +0000 (00:07 +0100)] 
man: systemd-repart: factory=reset typo

9 months agobuild(deps): bump super-linter/super-linter from 7.1.0 to 7.2.1
dependabot[bot] [Sat, 1 Feb 2025 09:54:18 +0000 (09:54 +0000)] 
build(deps): bump super-linter/super-linter from 7.1.0 to 7.2.1

Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.1.0 to 7.2.1.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/b92721f792f381cedc002ecdbb9847a15ece5bb8...85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agobuild(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.1
dependabot[bot] [Sat, 1 Feb 2025 09:54:20 +0000 (09:54 +0000)] 
build(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.1

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/01570a1f39cb168c169c802c3bceb9e93fb10974...c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agobuild(deps): bump coverallsapp/github-action from 2.3.4 to 2.3.6
dependabot[bot] [Sat, 1 Feb 2025 09:54:27 +0000 (09:54 +0000)] 
build(deps): bump coverallsapp/github-action from 2.3.4 to 2.3.6

Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.3.4 to 2.3.6.
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](https://github.com/coverallsapp/github-action/compare/cfd0633edbd2411b532b808ba7a8b5e04f76d2c8...648a8eb78e6d50909eff900e4ec85cab4524a45b)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agokernel-install: install addons in 90-uki-copy.install if they are present
Luca Boccassi [Fri, 6 Dec 2024 23:46:12 +0000 (23:46 +0000)] 
kernel-install: install addons in 90-uki-copy.install if they are present

mkosi now has a kernel-install plugin to build addons, mkosi-addon.
If there are addons in <uki>.extra.d/ install them too to
the ESP.

9 months agoRevert "Reduce priority of "cleared HibernateLocation" message"
Mike Yuan [Thu, 30 Jan 2025 09:53:14 +0000 (10:53 +0100)] 
Revert "Reduce priority of "cleared HibernateLocation" message"

This reverts commit 9f575145ea27daca9bc3ac86d1c4f42273b4306a.

9 months agouserdb: fix typo
Yu Watanabe [Sat, 1 Feb 2025 05:09:03 +0000 (14:09 +0900)] 
userdb: fix typo

Follow-up for 7419291670dd4066594350cce585031f60bc4f0a.

9 months agoboot: rename efifirmware.[ch] -> efi-firmware.[ch] 36230/head
Yu Watanabe [Sat, 1 Feb 2025 04:39:49 +0000 (13:39 +0900)] 
boot: rename efifirmware.[ch] -> efi-firmware.[ch]

This also
- renames efifirmware_match_by_fwid() -> efi_firmware_match_by_fwid(),
- drops unnecessary wrapper efifw_get_fwid(),
- drops unnecessary inclusion of header <endian.h>,
- sort files in meson.build.

No functional change, just refactoring and follow-ups for
83bf58f39dbe947c1b4f394667f42a0c557fd94c.

9 months agoman: update tags in systemd-stub(7)
Yu Watanabe [Sat, 1 Feb 2025 04:37:45 +0000 (13:37 +0900)] 
man: update tags in systemd-stub(7)

- use <literal> for section name,
- use <command> for systemd-stub,
- drop '=' suffix from EFI variable name.

9 months agouki: introduce support for a .efifw section
Ani Sinha [Fri, 8 Nov 2024 06:31:51 +0000 (12:01 +0530)] 
uki: introduce support for a .efifw section

UKIs can be used to bundle uefi firmwares that can be measured and
used on a confidential computing environment. There can be more than one
firmware blob bundle, each one for a specific platform. Also firmware images
can themselves be containers like IGVM files that can in turn bundle the
actual firmware blob. This change is specifically for uefi firmwares, not
IGVM container files.

This change adds support to introduce a .efifw section in UKI that can be
used for firmware blobs/images. There can be multiple such sections and each
section can contain a single firmware image.

The matching .hwids entry for a specific platform can be used to select the
most appropriate firmware blob.

ukify tool has been also changed to support addition of a firmware image
in UKI.

Since firmware gets measured automatically, we do not need to measure it
separately as a part of the UKI.

9 months agofirstboot: fix crash when hostname question is skipped
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jan 2025 14:25:38 +0000 (15:25 +0100)] 
firstboot: fix crash when hostname question is skipped

9 months agodns-domain: accept encoded domain names without terminating zero label
Beniamino Galvani [Wed, 29 Jan 2025 10:51:18 +0000 (11:51 +0100)] 
dns-domain: accept encoded domain names without terminating zero label

Commit 1be9b30a3b17 ("dhcp6: use dns_name_from_wire_format") introduced a
stricter validation of domains received via DHCPv6, by using function
dns_name_from_wire_format() which rejects the domain when it is missing the
terminating zero label. According to RFC 4704 § 4.2, DHCPv6 servers should
always add the zero label:

   To send a fully qualified domain name, the Domain Name field is set
   to the DNS-encoded domain name including the terminating zero-length
   label.  To send a partial name, the Domain Name field is set to the
   DNS-encoded domain name without the terminating zero-length label.

   [...]

   Servers SHOULD send the complete fully qualified domain name in
   Client FQDN options.

In practice, there is at least on common DHCPv6 server implementation (dnsmasq)
that sends the FQDN option without the ending zero-length label; after
upgrading to the new systemd, the client cannot parse the option and therefore
the machine doesn't get the hostname provided by dnsmasq.

This commit restores the old behavior that considers a domain valid even when
it's missing the terminating zero label.

Here's a quick reproducer:

--8<--

ip link add veth0 type veth peer name veth1
ip netns add ns1
ip link set veth1 netns ns1
ip link set veth0 address 00:11:22:33:44:55
ip link set veth0 up
ip -n ns1 link set veth1 up
ip -n ns1 address add dev veth1 fd01::1/64

ip netns exec ns1 dnsmasq \
   --pid-file=/tmp/dnsmasq.pid --no-hosts \
   --bind-interfaces --interface veth1 --except-interface lo \
   --dhcp-range=fd01::100,fd01::200 --enable-ra \
   --dhcp-host 00:11:22:33:44:55,foobar &

cat <<EOF > /etc/systemd/network/veth0.network
[Match]
Name=veth0

[Network]
DHCP=ipv6
EOF

networkctl reload
networkctl up veth0
sleep 5
hostname

--8<--

Without this change, systemd-networkd prints the following message and doesn't
set the hostname from DHCP:

  veth0: DHCPv6 client: Failed to parse FQDN option, ignoring: Bad message

9 months agocryptenroll/repart/creds: no longer default to binding against literal PCR 7 (#36200)
Luca Boccassi [Thu, 30 Jan 2025 14:57:15 +0000 (14:57 +0000)] 
cryptenroll/repart/creds: no longer default to binding against literal PCR 7 (#36200)

PCR 7 covers the SecureBoot policy, in particular "dbx", i.e. the
denylist of bad actors. That list is pretty much as frequently updated
as firmware these days (as fwupd took over automatic updating). This
means literal PCR 7 policies are problematic: they likely break soon,
and are as brittle as any other literal PCR policies.

hence, pick safer defaults, i.e. exclude PCR 7 from the default mask.
This means the mask is now empty.

Generally, people should really switch to signed PCR policies covering
PCR 11, in combination with systemd-pcrlock for the other PCRs.

9 months agoFix tense in SD_MESSAGE_SHUTDOWN_STR
Andrew Sayers [Wed, 29 Jan 2025 11:03:00 +0000 (11:03 +0000)] 
Fix tense in SD_MESSAGE_SHUTDOWN_STR

This is printed by bus_manager_log_shutdown() in logind-dbus.c,
near the start of the shutdown process.

Clarify that events *will* happen, long after this message is sent.

9 months agoReduce priority of "cleared HibernateLocation" message
Andrew Sayers [Wed, 29 Jan 2025 13:13:04 +0000 (13:13 +0000)] 
Reduce priority of "cleared HibernateLocation" message

This message appears when a computer hibernates, then awakens, then reboots,
and everything goes OK.  It's a normal progress message the user doesn't need
to know about, but it distracts them from important startup messages and could
even train them to ignore the warning when the procedure fails.

Reduce the level to LOG_INFO.

9 months agocryptenroll,repart: print a log message if no access restrictions are applied to... 36200/head
Lennart Poettering [Wed, 29 Jan 2025 14:13:35 +0000 (15:13 +0100)] 
cryptenroll,repart: print a log message if no access restrictions are applied to TPM-based encryption

9 months agocryptenroll/repart/creds: no longer default to binding against literal PCR 7
Lennart Poettering [Tue, 28 Jan 2025 08:48:48 +0000 (09:48 +0100)] 
cryptenroll/repart/creds: no longer default to binding against literal PCR 7

PCR 7 covers the SecureBoot policy, in particular "dbx", i.e. the
denylist of bad actors. That list is pretty much as frequently updated
as firmware these days (as fwupd took over automatic updating). This
means literal PCR 7 policies are problematic: they likely break soon,
and are as brittle as any other literal PCR policies.

hence, pick safer defaults, i.e. exclude PCR 7 from the default mask.
This means the mask is now empty.

Generally, people should really switch to signed PCR policies covering
PCR 11, in combination with systemd-pcrlock for the other PCRs.

9 months agope: do not warn about .initrd addons
Luca Boccassi [Thu, 30 Jan 2025 01:51:05 +0000 (01:51 +0000)] 
pe: do not warn about .initrd addons

We now support them, so stop warning about them.

9 months agoFix inversion of timesyncd_usec/epoch_usec variables in clock-warp.c
Devilish Spirits [Wed, 29 Jan 2025 20:54:27 +0000 (21:54 +0100)] 
Fix inversion of timesyncd_usec/epoch_usec variables in clock-warp.c

In clock_apply_epoch() function, the /usr/lib/clock-epoch timestamp was set to timesyncd_usec instead of epoch_usec and vice-versa which produced a misleading log message about the clock source systemd used for early clock sanitization. This trivial commit fix the mistake.

9 months agotree-wide: remove some spurious newlines
Nick Rosbrook [Wed, 29 Jan 2025 13:57:44 +0000 (08:57 -0500)] 
tree-wide: remove some spurious newlines

Specifically, remove double newlines, and newlines before '}'.

9 months agomeson: generate keyboard-keys-list from local input.h
Alex Xu (Hello71) [Tue, 28 Jan 2025 22:17:01 +0000 (17:17 -0500)] 
meson: generate keyboard-keys-list from local input.h

otherwise it will use the system input.h which will fail to build if
newer than the bundled version

Fixes: 0a73c8e7b8 ("linux: import input.h and friends")
9 months agoukify: Calculate section size more correctly 36215/head
Daan De Meyer [Wed, 29 Jan 2025 13:44:27 +0000 (14:44 +0100)] 
ukify: Calculate section size more correctly

We should only use Misc_VirtualSize if it's smaller than SizeOfRawData,
since in that case it'll be the non-aligned section size. Otherwise we
have to use SizeOfRawData to get the size on disk.

9 months agoukify: Fix two typing issues
Daan De Meyer [Wed, 29 Jan 2025 13:43:06 +0000 (14:43 +0100)] 
ukify: Fix two typing issues

9 months agodocs: fix plural form
Lennart Poettering [Wed, 29 Jan 2025 12:13:31 +0000 (13:13 +0100)] 
docs: fix plural form

Addresses: https://github.com/systemd/systemd/pull/36133#discussion_r1932816287

9 months agouserdb: move filter of user/group records to the varlink server side (#36133)
Lennart Poettering [Wed, 29 Jan 2025 12:11:38 +0000 (13:11 +0100)] 
userdb: move filter of user/group records to the varlink server side (#36133)

In v257 userdbctl gained support for filtering user records with fuzzy
matching and some other parameters. It was done on the client side only.
This PR adds server-side matching, by exendting the generic userdb
varlink api.

The api is generic any may have many other implementors, hence care is
taken to fallback to exclusively client side filtering in case the
service does not support the new parameters.

In fact I even opted to not actually implement server-side filtering in
any services but systemd-userdbd.service, because it's probably not too
much an optimization in relevant services (we might want to revisit this
later). By implementing it in userdbd the primary entrypoint for userdb
is however covered: the multiplexer interface which provides a single
interface for the multitude of backends. Or in other words: the
multiplexer itself supports server-side filtering even if its own
backends don't, and will hide this neatly away.

One nice side effect from not implementing server side filtering for all
our backends is that the fallback codepaths are comprehensively tested.

Note that this adds some unit tests but not new integration test for all
this, as the filtering tests for userdbctl already existed before, we
just move their implementation from the client to the server side.

9 months agoupdate TODO
Lennart Poettering [Tue, 28 Jan 2025 16:41:13 +0000 (17:41 +0100)] 
update TODO

9 months agoman: Update nss-myhostname.xml to reflect files
AndreFerreiraMsc [Tue, 28 Jan 2025 13:11:58 +0000 (14:11 +0100)] 
man: Update nss-myhostname.xml to reflect files

9 months agonetwork: bridge: add support for configuring locked ports (#36150)
Yu Watanabe [Tue, 28 Jan 2025 19:16:20 +0000 (04:16 +0900)] 
network: bridge: add support for configuring locked ports (#36150)

"Recently" (as of 5.18) the Linux kernel gained the ability of locking
bridge ports to restrict network access to authenticated hosts only.

This is implemented by disabling automated learning and dropping
incoming traffic from unknown hosts. User space is then expected to add
fdb entries for authenticated hosts. Once a fdb entry exist, traffic for
that host will be forwarded as expected.

This was later extended with "Mac Authentication Bypass", where the
locking was extended to fdb entries. In this mode the kernel adds fdb
entries again automatically, but they are locked by default.

To properly configure this, add two network options and one netdev
option:

* `LinkLocalLearning=` to prevent the kernel from creating unlocked
entries based on link-local traffic, which would bypass any
authentication. Needed when enabling learning on a locked port.
* `Locked=` to allow setting a bridge port to locked.
* `MACAuthenticationBypass=` to allow enabling Mac Authentication
 Bypass on a port. Requires learning to be enabled on the port as well
 (and consequently `LinkLocalLearning` disabled on the bridge).

An authenticator (e.g. hostapd) is still needed to do the actual
authentication, the kernel only provides the access control.

9 months agoMinor fixes for ukify tests (#36197)
Luca Boccassi [Tue, 28 Jan 2025 18:49:42 +0000 (18:49 +0000)] 
Minor fixes for ukify tests (#36197)

9 months agowait-online: add initial support for waiting for DNS (#34640)
Luca Boccassi [Tue, 28 Jan 2025 17:33:39 +0000 (17:33 +0000)] 
wait-online: add initial support for waiting for DNS (#34640)

Add a new flag, `--dns`, to systemd-networkd-wait-online to allow
waiting for DNS to be configured. The `--dns` flag respects the `--ipv4`
and `--ipv6` flags, as well as `--interface=` and `--any`.

9 months agotest: support slow test-ukify on Debian/Ubuntu 36197/head
Luca Boccassi [Sun, 26 Jan 2025 17:35:06 +0000 (17:35 +0000)] 
test: support slow test-ukify on Debian/Ubuntu

Kernels are installed in /boot/ so find them there too

9 months agotest: use local stub if available in test-ukify
Luca Boccassi [Sun, 26 Jan 2025 19:50:22 +0000 (19:50 +0000)] 
test: use local stub if available in test-ukify

It might not be available on a CI system in the system
path, so use the local one if it was built

9 months agoukify: Add --sign-profile
Daan De Meyer [Tue, 28 Jan 2025 08:38:26 +0000 (09:38 +0100)] 
ukify: Add --sign-profile

Let's allow configuring which UKI profiles we generate signed PCR
measurements for since there are various types of profiles for
which we do not want to generate signed PCR measurements so that they
can not unlock the encrypted rootfs.

Fixes #36173.

9 months agobootctl: move print block device path calls to command section of its own
Lennart Poettering [Tue, 28 Jan 2025 14:24:51 +0000 (15:24 +0100)] 
bootctl: move print block device path calls to command section of its own

9 months agotest: install stub package for test-ukify unit test
Luca Boccassi [Sun, 26 Jan 2025 20:06:36 +0000 (20:06 +0000)] 
test: install stub package for test-ukify unit test

9 months agonetworkd-test: add basic tests for systemd-networkd-wait-online --dns 34640/head
Nick Rosbrook [Tue, 22 Oct 2024 14:00:49 +0000 (10:00 -0400)] 
networkd-test: add basic tests for systemd-networkd-wait-online --dns

9 months agotest: add test for resolved SubscribeDNSConfiguration API
Nick Rosbrook [Tue, 22 Oct 2024 14:06:11 +0000 (10:06 -0400)] 
test: add test for resolved SubscribeDNSConfiguration API

9 months agotest: cleanup after testcase_12_resolvectl2
Nick Rosbrook [Wed, 23 Oct 2024 20:31:00 +0000 (16:31 -0400)] 
test: cleanup after testcase_12_resolvectl2

9 months agowait-online: add support for waiting for DNS configuration
Nick Rosbrook [Thu, 19 Sep 2024 19:59:50 +0000 (15:59 -0400)] 
wait-online: add support for waiting for DNS configuration

Add a new flag to systemd-networkd-wait-online, --dns, to allow waiting
for DNS to be configured.

DNS is considered configured when at least one DNS server is accessible.
If a link has the property DefaultRoute=yes (either by explicit
configuration, or because there are no routing-only domains), or if the
search domain '.' is configured, wait for link-specific DNS to be
configured. Otherwise, global DNS servers may be considered.

9 months agonetwork: bridge: add support for IFLA_BRPORT_MAB 36150/head
Jonas Gorski [Fri, 24 Jan 2025 12:15:06 +0000 (13:15 +0100)] 
network: bridge: add support for IFLA_BRPORT_MAB

Since linux commit a35ec8e38cdd1766f29924ca391a01de20163931 ("bridge:
Add MAC Authentication Bypass (MAB) support"), included since v6.2, it
is possible to enable MAC Authentication Bypass for bridge ports. In
this mode the locked port learns again, but the learned fdb entries are
locked, allowing user space to unlock hosts based seen MAC addresses.

This requires learning to be enabled on the port, and link-local
learning disabled for the bridge.

Add support to systemd-network for setting the new attribute for bridge
ports.