]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
17 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=

17 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

17 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()

17 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.

17 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.

17 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.

17 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

17 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

17 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.

17 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.

17 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

17 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

17 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

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

17 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

17 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=

17 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.

17 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

17 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.

17 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.

17 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()

17 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

17 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.

17 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.

17 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.

17 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

17 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

17 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

17 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.

17 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)

17 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()

17 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.

17 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 "."

17 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

17 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

17 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.

17 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

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

17 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.

17 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.

17 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)

17 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.

17 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)

17 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.

17 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.

17 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

17 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.

17 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.

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

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

17 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

17 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

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

17 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.

17 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

17 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

17 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)

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

17 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

17 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

17 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

17 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.

17 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.

17 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

17 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)

17 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.

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

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

17 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

17 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.

17 months agopidref: now that we have the cached pidfdid of our own process, use it
Lennart Poettering [Fri, 17 Jan 2025 13:02:08 +0000 (14:02 +0100)] 
pidref: now that we have the cached pidfdid of our own process, use it

Note that this drops a lot of "const" qualifiers on PidRef arguments.
That's because pidref_is_self() suddenly might end changing the PidRef
because it acquires the pidfd ID.

We had this previously already with pidfd_equal(), but this amplifies
the problem.

I guess we C's "const" doesn't really work for stuff that contains
caches, that is just conceptually constant, but not actually.

17 months agopidfd-util: add helper for getting our own pidfdid
Lennart Poettering [Mon, 18 Nov 2024 10:23:07 +0000 (11:23 +0100)] 
pidfd-util: add helper for getting our own pidfdid

let's start caching our own pidfd id, since it's somewhat involved to
get but a much better identifier for things than the classic PID is.

17 months agopidfd-util: dont open a new pidfd unnecessarily in pidfd_check_pidfs()
Lennart Poettering [Fri, 17 Jan 2025 13:01:30 +0000 (14:01 +0100)] 
pidfd-util: dont open a new pidfd unnecessarily in pidfd_check_pidfs()

17 months agobuild: fail the build if we accidentally drop a "const" qualifier on a parameter
Lennart Poettering [Fri, 17 Jan 2025 13:47:34 +0000 (14:47 +0100)] 
build: fail the build if we accidentally drop a "const" qualifier on a parameter

let's be strict here, our codebase allows it.

17 months agomachine-id-setup: move code to use chase() (#35979)
Lennart Poettering [Mon, 20 Jan 2025 20:18:24 +0000 (21:18 +0100)] 
machine-id-setup: move code to use chase() (#35979)

I just wanted to switch the machine id setup code to use chase() or its
changes, given it supports --root=/--image= operation. That turned out
to be a rabbit hole, and became much bigger...

17 months agocryptsetup and friends: use dispatch_verb() (#36072)
Lennart Poettering [Mon, 20 Jan 2025 20:17:01 +0000 (21:17 +0100)] 
cryptsetup and friends: use dispatch_verb() (#36072)

17 months agonspawn: downgrade log message about usrquota to debug
Luca Boccassi [Mon, 20 Jan 2025 19:05:11 +0000 (19:05 +0000)] 
nspawn: downgrade log message about usrquota to debug

This is shown every time nspawn is started, which is annoying
and there's nothing a user can do about it, since it depends on
an extremely new kernel. Downgrade to debug.

Follow-up for 611ae598889471830b2f1d7251c271b79884b1c4

17 months agoudevadm-control: allow to enable/disable trace logging in systemd-udevd 36070/head
Yu Watanabe [Sat, 11 Jan 2025 17:05:43 +0000 (02:05 +0900)] 
udevadm-control: allow to enable/disable trace logging in systemd-udevd

Should be useful for debugging udev rules.

17 months agoudev-varlink: allow to enable/disable trace logging through varlink
Yu Watanabe [Sat, 11 Jan 2025 16:43:12 +0000 (01:43 +0900)] 
udev-varlink: allow to enable/disable trace logging through varlink

This introduces io.systemd.Udev.SetTrace varlink method. With the
method, trace logging by udev worker can be dynamically controlled.

17 months agoudev-config: allow to enable trace logging through kernel command line
Yu Watanabe [Sat, 11 Jan 2025 16:35:48 +0000 (01:35 +0900)] 
udev-config: allow to enable trace logging through kernel command line

This adds udev.trace[=BOOL] kernel command line option to control trace
logging.

17 months agoudev-control: move setting of log level to manager_adjust_config()
Yu Watanabe [Mon, 20 Jan 2025 19:03:05 +0000 (04:03 +0900)] 
udev-control: move setting of log level to manager_adjust_config()

No functional change, just refactoring.

17 months agoresolved: empty "ipv4hint" and "ipv6hint" SvcParams are invalid
Tommi Rantala [Mon, 20 Jan 2025 11:05:49 +0000 (13:05 +0200)] 
resolved: empty "ipv4hint" and "ipv6hint" SvcParams are invalid

According to RFC 9460 "An empty list of addresses is invalid."

https://www.rfc-editor.org/rfc/rfc9460.html#section-7.3

17 months agointegritysetup: use dispatch_verb() 36072/head
Yu Watanabe [Sat, 18 Jan 2025 20:17:14 +0000 (05:17 +0900)] 
integritysetup: use dispatch_verb()

17 months agoveritysetup: use dispatch_verb()
Yu Watanabe [Sat, 18 Jan 2025 20:10:04 +0000 (05:10 +0900)] 
veritysetup: use dispatch_verb()

17 months agocryptsetup: use dispatch_verb()
Yu Watanabe [Sat, 18 Jan 2025 19:58:54 +0000 (04:58 +0900)] 
cryptsetup: use dispatch_verb()

17 months agocryptsetup: drop doubled space
Yu Watanabe [Sat, 18 Jan 2025 19:42:31 +0000 (04:42 +0900)] 
cryptsetup: drop doubled space

17 months agocryptsetup: use mangle_none() at one more place
Yu Watanabe [Sat, 18 Jan 2025 19:42:20 +0000 (04:42 +0900)] 
cryptsetup: use mangle_none() at one more place

17 months agotree-wide: drop merely used _cleanup_ macros, and introduce several new ones (#36071)
Yu Watanabe [Mon, 20 Jan 2025 18:41:27 +0000 (03:41 +0900)] 
tree-wide: drop merely used _cleanup_ macros, and introduce several new ones (#36071)

17 months agoudev: cleanups around sd_listen_fds() (#36030)
Lennart Poettering [Mon, 20 Jan 2025 17:06:56 +0000 (18:06 +0100)] 
udev: cleanups around sd_listen_fds() (#36030)

Fixes a bug introduced by 2f0aa9a80445ef18086260a60fad71920ad9486c.

In the offending commit, `sd_varlink_server_listen_auto()` is used. That
may add file descriptors of netlink socket for uevent and legacy control
socket varlink server. Then, udevd may fail to receive uevents.

17 months agotree-wide: several follow-ups for varlink methods (#36080)
Lennart Poettering [Mon, 20 Jan 2025 17:00:21 +0000 (18:00 +0100)] 
tree-wide: several follow-ups for varlink methods (#36080)

Follow-ups for #35914.

17 months agoudev-rules: introduce OPTIONS="dump" (#36069)
Lennart Poettering [Mon, 20 Jan 2025 16:59:40 +0000 (17:59 +0100)] 
udev-rules: introduce OPTIONS="dump" (#36069)

split out of #35968.

17 months agomkosi: Don't set ToolsTreeRepositories= for CentOS Stream tools
Daan De Meyer [Fri, 17 Jan 2025 14:29:14 +0000 (15:29 +0100)] 
mkosi: Don't set ToolsTreeRepositories= for CentOS Stream tools

mkosi does this itself so no need to do it in systemd.

17 months agosbsign: Make sure output file respects umask (#36083)
Daan De Meyer [Mon, 20 Jan 2025 13:02:29 +0000 (14:02 +0100)] 
sbsign: Make sure output file respects umask (#36083)

17 months agoupdate TODO 35979/head
Lennart Poettering [Mon, 20 Jan 2025 10:30:32 +0000 (11:30 +0100)] 
update TODO

17 months agochase: move appending of trailing slash out of loop
Lennart Poettering [Mon, 13 Jan 2025 12:20:29 +0000 (13:20 +0100)] 
chase: move appending of trailing slash out of loop

let's move final processing of the filename out of the loop, and apply
it in all cases, uniformly, even if we are asked to only return the
final filename.

17 months agochase: introduce flags that verify that chased inode is regular file or dir
Lennart Poettering [Mon, 13 Jan 2025 12:12:23 +0000 (13:12 +0100)] 
chase: introduce flags that verify that chased inode is regular file or dir

This also implies the new CHASE_MUST_BE_DIRECTORY flag in case the
specified path ends in a slash. This makes the rules stricter, it means
we'll be closer to how this is handled in kernel: if a path ends in a
slash it can never refer to a non-directory.

17 months agomachine-id-setup: rework writing of /etc/machine-id around chase()
Lennart Poettering [Mon, 13 Jan 2025 11:09:03 +0000 (12:09 +0100)] 
machine-id-setup: rework writing of /etc/machine-id around chase()

Let's make sure we properly stay inside of the root fs if one is
provided, i.e. stop using prefix_roota() at one more place.

17 months agomachine-id-setup: remove unnecessary 'else'
Lennart Poettering [Mon, 13 Jan 2025 11:19:18 +0000 (12:19 +0100)] 
machine-id-setup: remove unnecessary 'else'

17 months agomachine-id-setup: rework --commit based on chase()
Lennart Poettering [Sat, 11 Jan 2025 23:17:03 +0000 (00:17 +0100)] 
machine-id-setup: rework --commit based on chase()

17 months agomachine-id-setup: do sync() stuff only when operating on the real rootfs
Lennart Poettering [Thu, 16 Jan 2025 09:22:39 +0000 (10:22 +0100)] 
machine-id-setup: do sync() stuff only when operating on the real rootfs

If we operate relative some explicit rootfs the reason for the sync()ing
is not really given, we are not really acting as a milestone at boot,
but "offline".