]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agohashmap: drop hashmap_free_free() and friends 36107/head
Yu Watanabe [Wed, 22 Jan 2025 02:37:06 +0000 (11:37 +0900)] 
hashmap: drop hashmap_free_free() and friends

9 months agotest: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 02:10:10 +0000 (11:10 +0900)] 
test: use hash ops with destructor

9 months agoremount-fs: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 01:51:13 +0000 (10:51 +0900)] 
remount-fs: use hash ops with destructor

9 months agoexec-util: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 01:49:07 +0000 (10:49 +0900)] 
exec-util: use hash ops with destructor

9 months agonetwork: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 01:46:09 +0000 (10:46 +0900)] 
network: use hash ops with destructor

9 months agosd-journal: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 01:39:35 +0000 (10:39 +0900)] 
sd-journal: use hash ops with destructor

9 months agojournal-file: use hash ops with destructor
Yu Watanabe [Tue, 21 Jan 2025 22:24:03 +0000 (07:24 +0900)] 
journal-file: use hash ops with destructor

This also makes JournalFile.chain_cache allocated when necessary.

9 months agosd-bus: use hash ops with destructor
Yu Watanabe [Tue, 21 Jan 2025 21:29:23 +0000 (06:29 +0900)] 
sd-bus: use hash ops with destructor

This also makes vtable_methods and vtable_properties managed by Set,
as the key and value of each entry are equivalent.

9 months agodelta: use hash ops with destructor
Yu Watanabe [Tue, 21 Jan 2025 21:06:38 +0000 (06:06 +0900)] 
delta: use hash ops with destructor

This also makes it use RET_GATHER().

9 months agobootctl: use hash ops with destructor
Yu Watanabe [Tue, 21 Jan 2025 20:41:37 +0000 (05:41 +0900)] 
bootctl: use hash ops with destructor

This also makes the hashmap allocated when necessary.

9 months agocatalog: modernize code
Yu Watanabe [Tue, 21 Jan 2025 20:24:35 +0000 (05:24 +0900)] 
catalog: modernize code

- set destructors to catalog_hash_ops,
- acquire OrderedHashmap when necessary,
- gracefully handle NULL catalog directories and output stream,
- rename function output arguments,
- add many many assertions,
- use RET_GATHER().

9 months agowait-online: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 02:08:25 +0000 (11:08 +0900)] 
wait-online: use hash ops with destructor

9 months agoudev: use hash ops with destructor
Yu Watanabe [Wed, 22 Jan 2025 02:08:07 +0000 (11:08 +0900)] 
udev: use hash ops with destructor

9 months agoudevadm-monitor: use hash ops with destructor
Yu Watanabe [Tue, 21 Jan 2025 19:15:49 +0000 (04:15 +0900)] 
udevadm-monitor: use hash ops with destructor

This also make it use STATIC_DESTRUCTOR_REGISTER() macro, and logs OOM
error.

9 months agohash-funcs: introduce several basic hash_ops with value destructor
Yu Watanabe [Tue, 21 Jan 2025 21:05:53 +0000 (06:05 +0900)] 
hash-funcs: introduce several basic hash_ops with value destructor

9 months agoClarify that Conflicts= only applies when starting units
Andrew Sayers [Thu, 23 Jan 2025 08:06:57 +0000 (08:06 +0000)] 
Clarify that Conflicts= only applies when starting units

The "vice versa" in the old text could be interpreted as either
(wrong) "stopping the former will start the latter", or
(right) "starting the latter will stop the former".

Rephrase to avoid that ambiguity.

9 months agorun: add --job-mode= argument (#34708)
Yu Watanabe [Thu, 23 Jan 2025 09:11:30 +0000 (18:11 +0900)] 
run: add --job-mode= argument (#34708)

systemctl has a --job-mode= argument, and adding the same argument to
systemd-run is useful for starting transient scopes with dependencies.
For example, if a transient scope BindsTo a service that is stopping,
specifying --job-mode=replace will wait for the service to stop before
starting it again, while the default job mode of "fail" will cause the
systemd-run invocation to fail.

9 months agorun: add --job-mode= argument 34708/head
Gavin Li [Thu, 10 Oct 2024 20:07:16 +0000 (16:07 -0400)] 
run: add --job-mode= argument

systemctl has a --job-mode= argument, and adding the same argument to
systemd-run is useful for starting transient scopes with dependencies.
For example, if a transient scope BindsTo a service that is stopping,
specifying --job-mode=replace will wait for the service to stop before
starting it again, while the default job mode of "fail" will cause the
systemd-run invocation to fail.

9 months agopkg-config: add Requires.private: libcap
Luca Boccassi [Wed, 22 Jan 2025 21:16:05 +0000 (21:16 +0000)] 
pkg-config: add Requires.private: libcap

The two shared libraries for now link against libcap,
so add it to the Requires.private as it's a dependency

Fixes https://github.com/systemd/systemd/issues/36117

9 months agocore/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS= (#35869)
Yu Watanabe [Thu, 23 Jan 2025 00:04:12 +0000 (09:04 +0900)] 
core/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS= (#35869)

Let consider the following udev rules:
```
PROGRAM="/usr/bin/systemd-escape foo-bar-baz", ENV{SYSTEMD_WANTS}+="test1@$result.service"
PROGRAM="/usr/bin/systemd-escape aaa-bbb-ccc", ENV{SYSTEMD_WANTS}+="test2@$result.service"
```
Then, a device expectedly gains a property:
```
SYSTEMD_WANTS=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
```
After the event being processed by udevd, PID1 processes the device, the
property previously was parsed with
`extract_first_word(EXTRACT_UNQUOTE)`, then the device unit gained the
following dependencies:
```
Wants=test1@foox2dbarx2dbaz.service test2@aaax2dbbbx2dccc.service
```
So both `%i` and `%I` for the template services did not match with the
original data, and it was hard to use `systemd-escape` in `PROGRAM=`
udev rule token.

This makes the property parsed with
`extract_first_word(EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE)`, hence the
device unit now gains the following dependencies:
```
Wants=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
```
and `%I` for the template services match with the original data.

Fixes a bug caused by ceed8f0c8b9a46300eccd1afa2dd8d3c2cb6b47c (v233).

Fixes #16735.
Replaces #16737 and #35768.

9 months agomkosi: Update to latest (#36114)
Yu Watanabe [Thu, 23 Jan 2025 00:00:39 +0000 (09:00 +0900)] 
mkosi: Update to latest (#36114)

9 months agopretty-print: fix handling of line continuation in cat_file() (#35886)
Yu Watanabe [Wed, 22 Jan 2025 23:59:24 +0000 (08:59 +0900)] 
pretty-print: fix handling of line continuation in cat_file() (#35886)

Fixes #35878.

9 months agonetwork/ndisc: allow to configure route option preference (#35213)
Yu Watanabe [Wed, 22 Jan 2025 23:58:30 +0000 (08:58 +0900)] 
network/ndisc: allow to configure route option preference (#35213)

Continuation of #35212.
Closes #35714.

9 months agocore/job: never consider reload jobs redundant
Mike Yuan [Wed, 22 Jan 2025 18:36:27 +0000 (19:36 +0100)] 
core/job: never consider reload jobs redundant

Follow-up for 656bbffc6c45bdd8d5c28a96ca948ba16c546547

The commit reworked job merging logic so that reload jobs
won't get merged. However, they might get dropped from
transaction due to being deemed redundant, i.e. way before
it even hits job_install(). Let's make sure reload jobs
are always kept during transaction construction stage, too.

9 months agomkosi: switch rootfs to ext4
Luca Boccassi [Wed, 22 Jan 2025 19:11:55 +0000 (19:11 +0000)] 
mkosi: switch rootfs to ext4

btrfs is currently broken for nspawn on recent kernels, so switch
to the best filesystem until that is solved

9 months agomkosi: Update to latest 36114/head
Daan De Meyer [Wed, 22 Jan 2025 14:58:13 +0000 (15:58 +0100)] 
mkosi: Update to latest

With the latest mkosi, mkosi takes care of making sure it is
available within mkosi sandbox so we get rid of all the --preserve-env=
options when we invoke mkosi sandbox with sudo as these are not
required anymore. It also doesn't matter anymore if mkosi is installed
in /usr on the host so we get rid of the documentation around that as
well.

9 months agomkosi: Run two more mkosi commands with sudo
Daan De Meyer [Wed, 22 Jan 2025 21:24:36 +0000 (22:24 +0100)] 
mkosi: Run two more mkosi commands with sudo

Running some mkosi commands as root and other not can lead to cache
invalidations with the latest version, so make sure we run everything
as root after we've built the tools tree.

9 months agoudev-dump: also show written sysfs attributes and sysctl entries (#36091)
Luca Boccassi [Wed, 22 Jan 2025 20:56:31 +0000 (20:56 +0000)] 
udev-dump: also show written sysfs attributes and sysctl entries (#36091)

Split-out of #35968.

9 months agoOBS: switch to new top-level namespace (#36121)
Luca Boccassi [Wed, 22 Jan 2025 20:50:44 +0000 (20:50 +0000)] 
OBS: switch to new top-level namespace (#36121)

https://build.opensuse.org/project/show/system:systemd

9 months agodocs: mention packages in HACKING.md 36121/head
Luca Boccassi [Wed, 22 Jan 2025 20:37:23 +0000 (20:37 +0000)] 
docs: mention packages in HACKING.md

9 months agotest-network: add test case for [IPv6RoutePrefix] Preference= 35213/head
Yu Watanabe [Mon, 18 Nov 2024 05:57:27 +0000 (14:57 +0900)] 
test-network: add test case for [IPv6RoutePrefix] Preference=

9 months agonetwork/radv: add [IPv6RoutePrefix] Preference= setting
Yu Watanabe [Mon, 18 Nov 2024 05:48:35 +0000 (14:48 +0900)] 
network/radv: add [IPv6RoutePrefix] Preference= setting

9 months agonetwork/radv: modernize config_parse_router_preference()
Yu Watanabe [Mon, 18 Nov 2024 05:45:03 +0000 (14:45 +0900)] 
network/radv: modernize config_parse_router_preference()

9 months agoudevadm-test: allow to specify extra directories to load udev rules files
Yu Watanabe [Sat, 11 Jan 2025 08:54:43 +0000 (17:54 +0900)] 
udevadm-test: allow to specify extra directories to load udev rules files

This adds -D/--extra-rules-dir=DIR switch for 'udevadm test' command.
When specified, udev rules files in the specified directory will be also
loaded. This may be useful for debugging udev rules by copying some udev
rules files to a temporary directory.

9 months agorpm: mark udevd for reloading when an rules file is installed/updated
Yu Watanabe [Tue, 7 Jan 2025 19:19:45 +0000 (04:19 +0900)] 
rpm: mark udevd for reloading when an rules file is installed/updated

Then, we can avoid using udevadm (especially udev control socket) in
processing rpm.

9 months agoudev: add systemd tag to devices tagged with security-device
Nick Rosbrook [Wed, 22 Jan 2025 16:59:36 +0000 (11:59 -0500)] 
udev: add systemd tag to devices tagged with security-device

This ensures that device units are created for these, which is
convenient for other units that want to declare dependencies on
such devices.

9 months agoTEST-65-ANALYZE: add detailed test case for cat-config 35886/head
Yu Watanabe [Wed, 8 Jan 2025 18:35:02 +0000 (03:35 +0900)] 
TEST-65-ANALYZE: add detailed test case for cat-config

9 months agopretty-print: make cat_file() also highlight the trailing backslash for line continuation
Yu Watanabe [Mon, 6 Jan 2025 19:06:35 +0000 (04:06 +0900)] 
pretty-print: make cat_file() also highlight the trailing backslash for line continuation

9 months agopretty-print: fix handling of line continuation in cat_file()
Yu Watanabe [Mon, 6 Jan 2025 19:02:53 +0000 (04:02 +0900)] 
pretty-print: fix handling of line continuation in cat_file()

Fixes #35878.

9 months agopretty-print: cleanups for cat_file()
Yu Watanabe [Mon, 6 Jan 2025 18:59:55 +0000 (03:59 +0900)] 
pretty-print: cleanups for cat_file()

- add one missing assertion,
- always logs on error,
- simplify the logic to make it easy to understand,
- add several more comments.

Preparation for later commits. No functional change.

9 months agouserdb: add comments to userdb varlink IDL
Lennart Poettering [Tue, 21 Jan 2025 09:24:44 +0000 (10:24 +0100)] 
userdb: add comments to userdb varlink IDL

9 months agomachine-id-setup: actually unlink /run/machine-id if write/mount fails (#36105)
Lennart Poettering [Wed, 22 Jan 2025 20:41:57 +0000 (21:41 +0100)] 
machine-id-setup: actually unlink /run/machine-id if write/mount fails (#36105)

Follow-up for 64d52739c59e28a5eb453f749e24f23b2d2ec06a

Fixes CID#1590374 and CID#1590375

9 months agopidfd-util: preferably acquire pidfd inode id through name_to_handle_at()
Mike Yuan [Wed, 22 Jan 2025 02:00:32 +0000 (03:00 +0100)] 
pidfd-util: preferably acquire pidfd inode id through name_to_handle_at()

See rationales described in kernel commit:
https://github.com/torvalds/linux/commit/b3caba8f7a34a2bbaf45ffc6ff3a49b70afeb192

9 months agouserdb: two small fixes (#36115)
Lennart Poettering [Wed, 22 Jan 2025 20:41:28 +0000 (21:41 +0100)] 
userdb: two small fixes (#36115)

9 months agofs-util: at_flags_normalize_nofollow() follow-up (#36116)
Lennart Poettering [Wed, 22 Jan 2025 20:41:14 +0000 (21:41 +0100)] 
fs-util: at_flags_normalize_nofollow() follow-up (#36116)

Just some extension to 6981203f3a824ac3ceeb5a23c66942d5a284d9bb

9 months agotest: add test cases for parsing SYSTEMD_WANTS=/SYSTEMD_USER_WANTS= 35869/head
Yu Watanabe [Mon, 6 Jan 2025 10:16:23 +0000 (19:16 +0900)] 
test: add test cases for parsing SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=

9 months agocore/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=
Yu Watanabe [Mon, 6 Jan 2025 08:26:52 +0000 (17:26 +0900)] 
core/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=

Let consider the following udev rules:
===
PROGRAM="/usr/bin/systemd-escape foo-bar-baz", ENV{SYSTEMD_WANTS}+="test1@$result.service"
PROGRAM="/usr/bin/systemd-escape aaa-bbb-ccc", ENV{SYSTEMD_WANTS}+="test2@$result.service"
===
Then, a device expectedly gains a property:
===
SYSTEMD_WANTS=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
===
After the event being processed by udevd, PID1 processes the device, the
property previously was parsed with extract_first_word(EXTRACT_UNQUOTE),
then the device unit gained the following dependencies:
===
Wants=test1@foox2dbarx2dbaz.service test2@aaax2dbbbx2dccc.service
===
So both '%i' and '%I' for the template services did not match with the original
data, and it was hard to use systemd-escape in PROGRAM= udev rule token.

This makes the property parsed with extract_first_word(EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE),
hence the device unit now gains the following dependencies:
===
Wants=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
===
and '%I' for the template services match with the original data.

Fixes a bug caused by ceed8f0c8b9a46300eccd1afa2dd8d3c2cb6b47c (v233).

Fixes #16735.
Replaces #16737 and #35768.

9 months agoOBS: switch to new top-level namespace
Luca Boccassi [Wed, 22 Jan 2025 20:34:04 +0000 (20:34 +0000)] 
OBS: switch to new top-level namespace

https://build.opensuse.org/project/show/system:systemd

9 months agoudev-dump: also show written sysfs attributes and sysctl entries 36091/head
Yu Watanabe [Sat, 11 Jan 2025 07:38:02 +0000 (16:38 +0900)] 
udev-dump: also show written sysfs attributes and sysctl entries

This should be useful to know what is changed by processing an event.

9 months agoudev-dump: voidify one function call
Yu Watanabe [Wed, 22 Jan 2025 16:48:04 +0000 (01:48 +0900)] 
udev-dump: voidify one function call

Fixes CID#1590377.

9 months agofs-util: also add an at_flags_normalize_follow() helper 36116/head
Lennart Poettering [Wed, 22 Jan 2025 10:54:34 +0000 (11:54 +0100)] 
fs-util: also add an at_flags_normalize_follow() helper

This is the reverse of at_flags_normalize_follow()

9 months agoxattr-util: use at_flags_normalize_nofollow() at one more place
Lennart Poettering [Wed, 22 Jan 2025 10:54:50 +0000 (11:54 +0100)] 
xattr-util: use at_flags_normalize_nofollow() at one more place

9 months agouserdb: reset errno before getpwent() 36115/head
Lennart Poettering [Wed, 22 Jan 2025 15:44:12 +0000 (16:44 +0100)] 
userdb: reset errno before getpwent()

errno handling for NSS is always a bit weird since NSS modules generally
are not particularly careful with it. Hence let's initialize errno
explicitly before we invoke getpwent() so that we know it's in a
reasonable state afterwards on failure, or zero if not.

We do this in most places we use NSS, including in userdb when it comes
to getgrent(), just for getpwent() we don't so far. Address that.

9 months agouserdbctl: don't expect argument to --fuzzy
Lennart Poettering [Wed, 22 Jan 2025 10:55:24 +0000 (11:55 +0100)] 
userdbctl: don't expect argument to --fuzzy

The getopt() parser was completely wrong, it expected an argument where
wasn't expected or processes.

The test cases only passed by accident because they use the "user" verb
which is also the default verb. It would be accidently read as argument
for --fuzzy and ignored.

Fix that.

9 months agotest: Make sure we run lcov from the meson source directory
Daan De Meyer [Wed, 22 Jan 2025 13:55:45 +0000 (14:55 +0100)] 
test: Make sure we run lcov from the meson source directory

In ac75c5192797082c1965ab30be4711490f2937bc, we accidentally changed
the working directory that the tools executed in the wrapper script
are invoked in. This broke our invocations of lcov. Let's explicitly
run those in the meson source directory again to fix the coverage
workflow.

9 months agopo: Translated using Weblate (French)
Léane GRASSER [Wed, 22 Jan 2025 13:29:51 +0000 (14:29 +0100)] 
po: Translated using Weblate (French)

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main

9 months agomachine-id-setup: fix typo 36105/head
Mike Yuan [Wed, 22 Jan 2025 13:47:57 +0000 (14:47 +0100)] 
machine-id-setup: fix typo

9 months agomachine-id-setup: actually unlink /run/machine-id if write/mount fails
Mike Yuan [Wed, 22 Jan 2025 01:16:15 +0000 (02:16 +0100)] 
machine-id-setup: actually unlink /run/machine-id if write/mount fails

Follow-up for 64d52739c59e28a5eb453f749e24f23b2d2ec06a

Fixes CID#1590374 and CID#1590375

9 months agonetworkd-test: unconditionally stop previous invocation of networkd before starting...
Yu Watanabe [Tue, 21 Jan 2025 18:45:11 +0000 (03:45 +0900)] 
networkd-test: unconditionally stop previous invocation of networkd before starting new one

When networkd is already running, creating some .network files and
friends and starting networkd does not take any effect. Let's always
restart networkd when we want to start a new invocation.

9 months agomountpoint-util: several tweaks for fd_is_mount_point(), drop support for kernels...
Lennart Poettering [Wed, 22 Jan 2025 08:37:25 +0000 (09:37 +0100)] 
mountpoint-util: several tweaks for fd_is_mount_point(), drop support for kernels without /proc/pid/fdinfo/ (#36093)

9 months agomountpoint-util: port path_is_mount_point() to chase_and_open_parent() 36093/head
Mike Yuan [Mon, 20 Jan 2025 22:02:00 +0000 (23:02 +0100)] 
mountpoint-util: port path_is_mount_point() to chase_and_open_parent()

9 months agomountpoint-util: rename fd_is_mount_point() to is_mount_point_at()
Mike Yuan [Mon, 20 Jan 2025 20:53:43 +0000 (21:53 +0100)] 
mountpoint-util: rename fd_is_mount_point() to is_mount_point_at()

fd_* functions in our codebase usually mean fd-specific operations,
while this one actually takes openat()-style params. Rename it
accordingly hence.

9 months agomountpoint-util: some tweaks for fd_is_mount_point()
Mike Yuan [Mon, 20 Jan 2025 20:48:27 +0000 (21:48 +0100)] 
mountpoint-util: some tweaks for fd_is_mount_point()

- Drop fstat() fallback path now that we assume fdinfo
  is available
- Use at_flags_normalize_nofollow()
- Accept empty path the same way as NULL
- Accept fd being AT_FDCWD and filename being "."

9 months agomountpoint-util: our baseline includes fdinfo and mnt_id now
Mike Yuan [Mon, 11 Nov 2024 17:55:10 +0000 (18:55 +0100)] 
mountpoint-util: our baseline includes fdinfo and mnt_id now

9 months agomountpoint-util: check >= 0 for success
Mike Yuan [Mon, 20 Jan 2025 20:43:39 +0000 (21:43 +0100)] 
mountpoint-util: check >= 0 for success

9 months agomountpoint-util: update comment in is_name_to_handle_at_fatal_error()
Mike Yuan [Mon, 20 Jan 2025 21:26:47 +0000 (22:26 +0100)] 
mountpoint-util: update comment in is_name_to_handle_at_fatal_error()

We can now assume name_to_handle_at() syscall is available,
however the underlying fs can still lack support for it.

9 months agofs-util: introduce at_flags_normalize_nofollow() helper
Mike Yuan [Mon, 20 Jan 2025 20:15:46 +0000 (21:15 +0100)] 
fs-util: introduce at_flags_normalize_nofollow() helper

9 months agoupdate TODO
Lennart Poettering [Tue, 21 Jan 2025 11:42:37 +0000 (12:42 +0100)] 
update TODO

9 months agovarlink: fix error name
Lennart Poettering [Tue, 21 Jan 2025 17:34:21 +0000 (18:34 +0100)] 
varlink: fix error name

The documentation and code agree on the same name, since always, but
when I put together the IDL I made a mistake and insert a "Not" that
wasn't supposed to be there.

Let's correct that.

9 months agotree-wide: always include our own headers with "" rather than <>
Lennart Poettering [Tue, 21 Jan 2025 15:08:47 +0000 (16:08 +0100)] 
tree-wide: always include our own headers with "" rather than <>

We got this almost always right. Fix this for a few outliers.

9 months agomkosi: Various tools tree fixes (#36059)
Daan De Meyer [Tue, 21 Jan 2025 14:17:36 +0000 (15:17 +0100)] 
mkosi: Various tools tree fixes (#36059)

9 months agoTEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM 36059/head
Daan De Meyer [Tue, 21 Jan 2025 12:48:13 +0000 (13:48 +0100)] 
TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM

On CentOS Stream 9/10 booting mkosi qemu with --firmware=linux doesn't
add the virtual TPM to the virtual machine which means TEST-74-AUX-UTILS.run.sh
fails because it requires a TPM.

Let's move the systemd-pcrlock logic that requires a TPM to
TEST-70-TPM.pcrlock to avoid the problem.

9 months agouser-record/home: add concept of alias names for accounts (#36041)
Lennart Poettering [Tue, 21 Jan 2025 11:57:52 +0000 (12:57 +0100)] 
user-record/home: add concept of alias names for accounts (#36041)

9 months agotest: Look for qemu in /usr/libexec/qemu-kvm as well
Daan De Meyer [Tue, 21 Jan 2025 11:29:56 +0000 (12:29 +0100)] 
test: Look for qemu in /usr/libexec/qemu-kvm as well

On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use
that if it's available.

9 months agomkosi: Run more commands as root
Daan De Meyer [Mon, 20 Jan 2025 12:57:02 +0000 (13:57 +0100)] 
mkosi: Run more commands as root

zypper has some new rather questionable userspace level permission
checking that blows ups completely when operating as root on an
cache directory owned by a non-root user, so let's build the tools
tree and set up meson as root to avoid the issue.

(https://github.com/openSUSE/libzypp/issues/603)

Also drop a leftover debug message from coverage.yml while we're at
it.

9 months agomkosi: Don't set -O ^orphan_file in centos stream 9 tools tree
Daan De Meyer [Fri, 17 Jan 2025 15:39:09 +0000 (16:39 +0100)] 
mkosi: Don't set -O ^orphan_file in centos stream 9 tools tree

9 months agomkosi: lcov and shellcheck are not in EPEL 10
Daan De Meyer [Fri, 17 Jan 2025 14:35:37 +0000 (15:35 +0100)] 
mkosi: lcov and shellcheck are not in EPEL 10

Let's drop these from CentOS Stream tools trees as they are not in
EPEL 10 yet.

9 months agomkosi: Use a bigger variety of tools tree distributions
Daan De Meyer [Fri, 17 Jan 2025 12:28:47 +0000 (13:28 +0100)] 
mkosi: Use a bigger variety of tools tree distributions

Let's add more coverage for building with tools trees by building
each image with a tools tree of the same distribution and release.

Because not every tools tree distribution has a newer meson yet, we
only use --max-lines= when meson actually knows the option.

9 months agomkosi: Update to latest
Daan De Meyer [Fri, 17 Jan 2025 14:12:46 +0000 (15:12 +0100)] 
mkosi: Update to latest

9 months agoupdate TODO 36041/head
Lennart Poettering [Thu, 16 Jan 2025 12:58:14 +0000 (13:58 +0100)] 
update TODO

9 months agotest: add test for homed alias and realm user resolution
Lennart Poettering [Thu, 16 Jan 2025 14:18:45 +0000 (15:18 +0100)] 
test: add test for homed alias and realm user resolution

9 months agohomectl: add support for creating users with alias names
Lennart Poettering [Thu, 16 Jan 2025 13:01:15 +0000 (14:01 +0100)] 
homectl: add support for creating users with alias names

9 months agohomed: support user record aliases
Lennart Poettering [Thu, 16 Jan 2025 13:08:51 +0000 (14:08 +0100)] 
homed: support user record aliases

9 months agopam_systemd_home: support login with alias names + user names with realms
Lennart Poettering [Thu, 16 Jan 2025 13:15:03 +0000 (14:15 +0100)] 
pam_systemd_home: support login with alias names + user names with realms

This in particular makes sure that we normalize the user name and update
it in the PAM session, once we acquire it. This means that if you have a
user with name "a" and alias "b", and the user logs in as "b" they end
up properly with "a" as user name set, as intended by the PAM gods.

Moreover, if you have a user "c" in a ralm "d", they may log in by
specifying "c" or "c@d", with equivalent results.

9 months agopam_systemd_home: use right field name in error message
Lennart Poettering [Thu, 16 Jan 2025 13:14:08 +0000 (14:14 +0100)] 
pam_systemd_home: use right field name in error message

9 months agouser-record: add support for alias user names to user record
Lennart Poettering [Thu, 16 Jan 2025 13:15:52 +0000 (14:15 +0100)] 
user-record: add support for alias user names to user record

9 months agouser-record: add helper that checks if a provided user name matches a record
Lennart Poettering [Fri, 3 Jan 2025 16:53:33 +0000 (17:53 +0100)] 
user-record: add helper that checks if a provided user name matches a record

This ensures that user names can be specified either in the regular
short syntax or with a realm appended, and both are accepted. (The
latter of course only if the record actually defines a realm)

9 months agopam: minor coding style tweaks
Lennart Poettering [Thu, 16 Jan 2025 13:15:26 +0000 (14:15 +0100)] 
pam: minor coding style tweaks

9 months agostrv: add strv_equal_ignore_order() helper
Lennart Poettering [Mon, 20 Jan 2025 09:31:09 +0000 (10:31 +0100)] 
strv: add strv_equal_ignore_order() helper

9 months agonetworkd-test.py: generate debugging logs of networkd
Yu Watanabe [Tue, 21 Jan 2025 00:43:43 +0000 (09:43 +0900)] 
networkd-test.py: generate debugging logs of networkd

9 months agoukify: add --policy-digest option
Luca Boccassi [Mon, 20 Jan 2025 00:30:48 +0000 (00:30 +0000)] 
ukify: add --policy-digest option

Uses the newly added policy-digest verb of systemd-measure, for the same
purpose: build a UKI and get digests for the .pcrsig section out, so
that they can be offline signed and reattached

9 months agobasic: move JobMode from core
Gavin Li [Fri, 3 Jan 2025 05:46:39 +0000 (00:46 -0500)] 
basic: move JobMode from core

The JobMode string table functions can be used by utilities for argument
validation.

9 months agomeasure: add policy-digest verb
Luca Boccassi [Sun, 19 Jan 2025 22:50:53 +0000 (22:50 +0000)] 
measure: add policy-digest verb

When doing offline signing we need to know the exact payload
to sign, and the 'calculate' verb doesn't really show that, it
shows the PCR values. But what we sign is the hash of the policy.
So add a new verb that outputs the json payload that goes in the
.pcrsig section, without the .sig object, so that we can take them
and give the .pol object to an offline and asynchronous signing
service, such as SUSE's Open Build Service, and then add the .sig
object to the json and attach it to a UKI.

9 months agopidfd: cache our own pidfd inode id, and use it at various places (#36060)
Mike Yuan [Mon, 20 Jan 2025 23:16:12 +0000 (00:16 +0100)] 
pidfd: cache our own pidfd inode id, and use it at various places (#36060)

This is split out of and preparation for #35224, but makes a ton of
sense on its own

9 months agoukify: print debug/progress messages to stderr and pass through --json to systemd...
Luca Boccassi [Mon, 20 Jan 2025 21:34:59 +0000 (21:34 +0000)] 
ukify: print debug/progress messages to stderr and pass through --json to systemd-measure (#36081)

9 months agoudev: allow to enable trace logging in systemd-udevd (#36070)
Lennart Poettering [Mon, 20 Jan 2025 21:02:13 +0000 (22:02 +0100)] 
udev: allow to enable trace logging in systemd-udevd (#36070)

split out of #35968.

9 months agoupdate TODO 36060/head
Lennart Poettering [Fri, 17 Jan 2025 13:54:24 +0000 (14:54 +0100)] 
update TODO

9 months agonotify: add support for MANAGERPIDFDID
Lennart Poettering [Sun, 19 Jan 2025 20:43:43 +0000 (21:43 +0100)] 
notify: add support for MANAGERPIDFDID

9 months agopid1: pass pidfdids to invoked services in $MAINPIDFDID and $MANAGERPIDFDID
Lennart Poettering [Fri, 17 Jan 2025 13:09:53 +0000 (14:09 +0100)] 
pid1: pass pidfdids to invoked services in $MAINPIDFDID and $MANAGERPIDFDID

9 months agorandom-util: include pidfdid in fallback RNG buffer
Lennart Poettering [Mon, 18 Nov 2024 10:23:26 +0000 (11:23 +0100)] 
random-util: include pidfdid in fallback RNG buffer

This doesn't make the RNG cryptographic strength, but if we have it
easily accessible, why not include the pidfd id. It is after all not
vulnerable to reuse.