]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agouser-record: Allow/strip status for mask/extract privileged helpers
Daan De Meyer [Sun, 23 Mar 2025 21:52:10 +0000 (22:52 +0100)] 
user-record: Allow/strip status for mask/extract privileged helpers

If we're using these helpers, we want to split a user record into two,
one with the privileged section, and one without. This should work even
when the user record has a "status" section, so adapt the helpers to
account for that.

8 months agonetworkd: add support for setting vlan_tunnel on bridge ports
Erik Larsson [Sat, 22 Mar 2025 14:40:35 +0000 (15:40 +0100)] 
networkd: add support for setting vlan_tunnel on bridge ports

8 months agosome dbus property fixes (#36830)
Luca Boccassi [Sat, 22 Mar 2025 15:54:16 +0000 (15:54 +0000)] 
some dbus property fixes (#36830)

8 months agocore: not sure why but TTYRows/TTYColumns property is 16bit towards outside, 32bit... 36830/head
Lennart Poettering [Fri, 21 Mar 2025 16:51:18 +0000 (17:51 +0100)] 
core: not sure why but TTYRows/TTYColumns property is 16bit towards outside, 32bit inside, handle that properly

8 months agocore: fix C type handler for ExitCode property
Lennart Poettering [Fri, 21 Mar 2025 16:38:26 +0000 (17:38 +0100)] 
core: fix C type handler for ExitCode property

8 months agomkosi: Hide patches on debian instead of removing them
Daan De Meyer [Fri, 21 Mar 2025 21:02:19 +0000 (22:02 +0100)] 
mkosi: Hide patches on debian instead of removing them

8 months agofetch-distro: Fetch before we switch branches
Daan De Meyer [Fri, 21 Mar 2025 20:34:12 +0000 (21:34 +0100)] 
fetch-distro: Fetch before we switch branches

Otherwise the branch we're switching to might not exist yet.

8 months agopackit: Load fmf metadata from rpm spec repository (#36825)
Daan De Meyer [Fri, 21 Mar 2025 16:28:43 +0000 (17:28 +0100)] 
packit: Load fmf metadata from rpm spec repository (#36825)

8 months agopackit: Load fmf metadata from rpm spec repository 36825/head
Daan De Meyer [Fri, 21 Mar 2025 14:13:22 +0000 (15:13 +0100)] 
packit: Load fmf metadata from rpm spec repository

Maintaining the fmf metadata and script upstream makes it painful
to reuse downstream so let's move the metadata and testing script
downstream and load it upstream instead.

8 months agomkosi: update fedora commit reference
Daan De Meyer [Fri, 21 Mar 2025 15:30:12 +0000 (16:30 +0100)] 
mkosi: update fedora commit reference

2ecfbec1a4 Support specifying extra mkosi repositories to the test script
f5b47b1302 Use old setup sysusers files on Fedora < 43
2da5793357 Merge #196 `Migrate fmf metadata and test script from the upstream repository`
e346d9f33e Limit sdubby dependency to Fedora

8 months agomkosi: Log in mkosi.sync when we don't check out commit
Daan De Meyer [Fri, 21 Mar 2025 13:30:34 +0000 (14:30 +0100)] 
mkosi: Log in mkosi.sync when we don't check out commit

8 months agopo: Translated using Weblate (Spanish)
Jose Ortuno [Fri, 21 Mar 2025 12:57:12 +0000 (12:57 +0000)] 
po: Translated using Weblate (Spanish)

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Jose Ortuno <jose_ortuno@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main

8 months agotest: Check that the journal file was actually created (#36821)
Daan De Meyer [Fri, 21 Mar 2025 13:31:20 +0000 (14:31 +0100)] 
test: Check that the journal file was actually created (#36821)

If the test fails in the mkosi setup logic the journal file will never
be created so let's add some checks.

8 months agoudev: make udevadm and friends not warn about unknown settings
Yu Watanabe [Fri, 21 Mar 2025 00:54:45 +0000 (09:54 +0900)] 
udev: make udevadm and friends not warn about unknown settings

Without this change, when e.g. event_timeout= is specified in udev.conf,
udevadm and friends which loads udev.conf warn about unknown key:
===
$ udevadm info /sys/class/net/lo
/run/udev/udev.conf.d/test-17.conf:1: Unknown key 'event_timeout', ignoring.
/run/udev/udev.conf.d/test-17.conf:2: Unknown key 'timeout_signal', ignoring.
===

Follow-up for 07f5e35fe7967c824a87f18a3a1d3c22e5be70f5 (v256).

8 months agotest: Check that the journal file was actually created 36821/head
Daan De Meyer [Fri, 21 Mar 2025 12:23:31 +0000 (13:23 +0100)] 
test: Check that the journal file was actually created

If the test fails in the mkosi setup logic the journal file will never
be created so let's add some checks.

8 months agopackit: Remove --depth=1 from git clone
Daan De Meyer [Fri, 21 Mar 2025 12:34:11 +0000 (13:34 +0100)] 
packit: Remove --depth=1 from git clone

We need the full history to be able to checkout the right commit
afterwards.

8 months agobootctl: adjust feature message (#36372)
Daan De Meyer [Fri, 21 Mar 2025 10:17:00 +0000 (11:17 +0100)] 
bootctl: adjust feature message (#36372)

8 months agoanalyze: propagate error code returned by _from_string()
Yu Watanabe [Thu, 20 Mar 2025 23:37:46 +0000 (08:37 +0900)] 
analyze: propagate error code returned by _from_string()

Follow-up for a483c39fc20aced2178c908405fd020eda753964.
Addresses https://github.com/systemd/systemd/pull/36468#discussion_r2005765024.

8 months agoedit-util: don't leave custom editor args around if we shall fall back (#36813)
Yu Watanabe [Thu, 20 Mar 2025 23:48:05 +0000 (08:48 +0900)] 
edit-util: don't leave custom editor args around if we shall fall back (#36813)

Also, let's complain loudly if the editor acquired from envvar is not
present.

Fixes #36796

8 months agoman: fix typo
Yu Watanabe [Thu, 20 Mar 2025 23:35:08 +0000 (08:35 +0900)] 
man: fix typo

Follow-up for 6fd253753c40e7fbafe2e9a4e64010f9881c1bbb.

8 months agomatch glibc in ConditionVersion
Matteo Croce [Sun, 16 Mar 2025 01:48:29 +0000 (02:48 +0100)] 
match glibc in ConditionVersion

Extend ConditionVersion= to allow matching against glibc version,
as proposed in https://github.com/systemd/systemd/pull/36468#issuecomment-2674600909

8 months agopo: Translated using Weblate (Spanish)
Jose Ortuno [Thu, 20 Mar 2025 20:00:58 +0000 (20:00 +0000)] 
po: Translated using Weblate (Spanish)

Currently translated at 97.2% (250 of 257 strings)

Co-authored-by: Jose Ortuno <jose_ortuno@hotmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main

8 months agocore/meson: libcore doesn't depend on PAM
Mike Yuan [Thu, 20 Mar 2025 15:35:23 +0000 (16:35 +0100)] 
core/meson: libcore doesn't depend on PAM

It's only used by sd-executor.

8 months agoAdd --root for systemd-update-done and other small fixups (#36803)
Lennart Poettering [Thu, 20 Mar 2025 17:19:17 +0000 (18:19 +0100)] 
Add --root for systemd-update-done and other small fixups (#36803)

8 months agoedit-util: don't leave custom editor args around if we shall fall back 36813/head
Mike Yuan [Thu, 20 Mar 2025 16:01:19 +0000 (17:01 +0100)] 
edit-util: don't leave custom editor args around if we shall fall back

Also, let's complain loudly if the editor acquired from envvar
is not present.

Fixes #36796

8 months agomemory-util: make mempcpy_typesafe nestable
Mike Yuan [Thu, 20 Mar 2025 16:27:39 +0000 (17:27 +0100)] 
memory-util: make mempcpy_typesafe nestable

8 months agoupdate-done: create /etc and /var if they didn't exist 36803/head
Zbigniew Jędrzejewski-Szmek [Wed, 19 Mar 2025 16:06:44 +0000 (17:06 +0100)] 
update-done: create /etc and /var if they didn't exist

Previously, we would fail. But this doesn't seem useful: we may want to
mark the update as done even if /etc/ or /var/ no updates were necessary
and there was no need to create /etc/ or /var/ yet.

8 months agoupdate-done: add --root= arg
Zbigniew Jędrzejewski-Szmek [Wed, 19 Mar 2025 16:05:20 +0000 (17:05 +0100)] 
update-done: add --root= arg

The idea is to use this when building an image to mark the image as not
needing updates after the reboot. In general it is impossible to say if
any of the early boot update services can be safely skipped, except when
the creator of the image knows all the contents there and has made sure
that all the updates have been processed. (This is in fact what happens
in a typical package-based installation: the packages have scriptlets which
implement the changes during or after the installation process.)

With this patch, the image build process can do 'systemd-update-done --root=…'
at the appropriate point to avoid triggering of ldconfig.service,
systemd-hwdb-update.service, etc.

I didn't write --image=, because it doesn't seem immediately useful. The
approach with --root is most useful when we're building the image "offline",
which means that we have a directory we're working on.

8 months agoupdate-done: add basic argument parsing and --help
Zbigniew Jędrzejewski-Szmek [Wed, 19 Mar 2025 15:47:02 +0000 (16:47 +0100)] 
update-done: add basic argument parsing and --help

We certainly want to reject calls with any args specified. Previously
we would just silently ignore any args.

8 months agopo: Translated using Weblate (Chinese (Traditional) (zh_TW))
hsu zangmen [Thu, 20 Mar 2025 12:55:17 +0000 (12:55 +0000)] 
po: Translated using Weblate (Chinese (Traditional) (zh_TW))

Currently translated at 88.7% (228 of 257 strings)

Co-authored-by: hsu zangmen <chzang55@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_TW/
Translation: systemd/main

8 months agoupdate-done: split out run()
Zbigniew Jędrzejewski-Szmek [Wed, 19 Mar 2025 15:28:50 +0000 (16:28 +0100)] 
update-done: split out run()

8 months agoupdate-done: adjust comments
Zbigniew Jędrzejewski-Szmek [Wed, 19 Mar 2025 15:18:27 +0000 (16:18 +0100)] 
update-done: adjust comments

The man page was right, but the comment in the generated file was wrong. The
timestamp is *not* the timestamp when the update is being done. While at it,
say to what directory the message applies. This makes it easier for a casual
reader to figure out what is happening.

Also rename the function to better reflect what it does.

Inspired by https://github.com/systemd/systemd/issues/36045.

8 months agovmspawn: allow TPM state to be persistent + rework runtime dir logic
Lennart Poettering [Wed, 19 Mar 2025 13:48:35 +0000 (14:48 +0100)] 
vmspawn: allow TPM state to be persistent + rework runtime dir logic

When using vmspawn on particleos image we really want that the TPM state
is retained between invocation, since the encryption key is locked to
the TPM after all. Hence let's support that.

This adds --tpm-state= which can be used to configure a path to store
the TPM state in. It can also be used to force tpm state to be transient
or to let vmpsawn pick the path automatically.

While we are at it, let's also revamp the runtime dir handling in
vmspawn: let's no longer place the sockets the auxiliary services listen
on within their own runtime directories. Instead, just drop the runtime
directories for them entirely (since neither virtiofsd, nor swtpm
actually use them). Also, let systemd clean up the sockets
automatically.

8 months agonetworkd: add support for externally managed vxlan devices
Erik Larsson [Sun, 16 Mar 2025 11:25:35 +0000 (12:25 +0100)] 
networkd: add support for externally managed vxlan devices

With this a vxlan interface can be created which is managed by
for example a EVPN control plane.

8 months agonamespace: use EBADF where appropriate
Lennart Poettering [Tue, 18 Mar 2025 15:00:09 +0000 (16:00 +0100)] 
namespace: use EBADF where appropriate

8 months agopackit: Enable use_target_repo_for_fmf_url option (#36794)
Daan De Meyer [Thu, 20 Mar 2025 08:24:41 +0000 (09:24 +0100)] 
packit: Enable use_target_repo_for_fmf_url option (#36794)

Currently this is picked up from the main branch of the fork which is
suboptimal. The packit folks implemented this new option for us which
should fix the problem.

8 months agofmf: Use mkosi -f together with ToolsTreePackageDirectories= 36794/head
Daan De Meyer [Wed, 19 Mar 2025 13:08:49 +0000 (14:08 +0100)] 
fmf: Use mkosi -f together with ToolsTreePackageDirectories=

There's no need to build various systemd tools from source again to
build the mkosi image when we can just install the packages that were
already built from source into the tools tree so let's do that to avoid
unnecessary compiling.

8 months agofmf: Drop -f from subsequent mkosi sandbox calls
Daan De Meyer [Wed, 19 Mar 2025 13:07:42 +0000 (14:07 +0100)] 
fmf: Drop -f from subsequent mkosi sandbox calls

Only required for the first call to mkosi sandbox, after that we can
assume the tools tree has already been built.

8 months agofmf: Allow overriding the mkosi distribution and release used
Daan De Meyer [Wed, 19 Mar 2025 11:52:36 +0000 (12:52 +0100)] 
fmf: Allow overriding the mkosi distribution and release used

8 months agofmf: Download rpms manually instead of going via repositories
Daan De Meyer [Wed, 19 Mar 2025 11:39:18 +0000 (12:39 +0100)] 
fmf: Download rpms manually instead of going via repositories

This both makes the script more independent, and allows us to add support
for CBS (CentOS Community Build System) at the same time.

8 months agocore: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN (#36771)
Yu Watanabe [Wed, 19 Mar 2025 21:28:18 +0000 (06:28 +0900)] 
core: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN (#36771)

Currently DelegateNamespaces= only works for services spawned by the
system manager. User managers will always unshare the user namespace
first even if they're running with CAP_SYS_ADMIN.

Let's add support for DelegateNamespaces= for user managers if they're
running with CAP_SYS_ADMIN. By default, we'll still delegate all
namespaces
for user managers, but this can now be overridden by explicitly passing
DelegateNamespaces=.

If a user manager is running without CAP_SYS_ADMIN, the user manager is
still always unshared first just like before.

8 months agoSeveral fixlets for Coverity (#36791)
Lennart Poettering [Wed, 19 Mar 2025 21:27:00 +0000 (22:27 +0100)] 
Several fixlets for Coverity (#36791)

8 months agoIntroduce ConditionVersion (#36468)
Yu Watanabe [Wed, 19 Mar 2025 21:15:35 +0000 (06:15 +0900)] 
Introduce ConditionVersion (#36468)

Add a new condition which can check against systemd version.

        $ systemctl --version
        systemd 258 (258~devel-g53ca5f6)

        $ systemd-analyze condition 'ConditionVersion=systemd>255'
        test.service: ConditionVersion=>255 succeeded.

        $ systemd-analyze condition 'ConditionVersion=systemd>260'
        test.service: ConditionVersion=>260 failed.

        $ systemd-analyze condition 'ConditionVersion=systemd>=258'
        test.service: ConditionVersion=>=258 succeeded.

        $ systemd-analyze condition 'ConditionVersion=systemd>=257.1'
        test.service: ConditionVersion=>=257.1 succeeded.

        $ uname -r
        6.12.13-200.fc41.aarch64

        $ systemd-analyze condition 'ConditionVersion=kernel > 4.4'
        test.service: ConditionVersion=kernel > 4.4 succeeded.

        $ systemd-analyze condition 'ConditionVersion=kernel > 6.20'
        test.service: ConditionVersion=kernel > 6.20 failed.

        $ systemd-analyze condition 'ConditionVersion=kernel < 9.0'
        test.service: ConditionVersion=kernel < 9.0 succeeded.

8 months agocgroup: whenever we migrate a PID to a unit, explicitly drop unit from empty notifica...
Lennart Poettering [Wed, 19 Mar 2025 15:54:27 +0000 (16:54 +0100)] 
cgroup: whenever we migrate a PID to a unit, explicitly drop unit from empty notification queue

A unit might be pending in the empty queue still when we add a PID to
the cgroup. At that point, let's explicitly remove the unit from that
queue.

Fixes: #36781
8 months agotpm2-util: return better errors if we try to unlock a tpm key on the wrong tpm
Lennart Poettering [Wed, 19 Mar 2025 17:09:23 +0000 (18:09 +0100)] 
tpm2-util: return better errors if we try to unlock a tpm key on the wrong tpm

Let's improve error handling in case one tries to unlock a TPM2 locked
volume on a different machine via TPM than it was originally enrolled
on. Let's recognize this case and print a clearer error message.

8 months agovarious verity generator tweaks (#36802)
Daan De Meyer [Wed, 19 Mar 2025 18:26:03 +0000 (19:26 +0100)] 
various verity generator tweaks (#36802)

8 months agogenerator: skip fsck early for non-blockdev file systems, or file systems that are...
Lennart Poettering [Wed, 19 Mar 2025 14:15:10 +0000 (15:15 +0100)] 
generator: skip fsck early for non-blockdev file systems, or file systems that are always read-only

8 months agosd-event: make pidfd copy in event_add_child_pidref()
Lennart Poettering [Wed, 19 Mar 2025 14:11:58 +0000 (15:11 +0100)] 
sd-event: make pidfd copy in event_add_child_pidref()

So far we'd directly use the pidfd passed into event_add_child_pidref(),
hoping it would not be closed by the caller before we are done. This was
violated by vmspawn however.

Let's make this safe, and simply duplicate the fd, and make us
independent of the caller.

8 months agoveritysetup-generator: repeat format string arguments a bit less 36802/head
Lennart Poettering [Wed, 19 Mar 2025 09:06:10 +0000 (10:06 +0100)] 
veritysetup-generator: repeat format string arguments a bit less

8 months agoveritysetup-generator: specify source for generator_open_unit_file()
Lennart Poettering [Wed, 19 Mar 2025 09:05:50 +0000 (10:05 +0100)] 
veritysetup-generator: specify source for generator_open_unit_file()

8 months agoveritysetup-generator: exit on first error
Lennart Poettering [Wed, 19 Mar 2025 09:05:25 +0000 (10:05 +0100)] 
veritysetup-generator: exit on first error

8 months agoveritysetup: automatically generate unit name, instead of hardcoding it
Lennart Poettering [Wed, 19 Mar 2025 09:02:16 +0000 (10:02 +0100)] 
veritysetup: automatically generate unit name, instead of hardcoding it

8 months agofmf: Drop support for dist-git-source: true
Daan De Meyer [Wed, 19 Mar 2025 11:36:20 +0000 (12:36 +0100)] 
fmf: Drop support for dist-git-source: true

In preparation for moving the fmf stuff to the fedora spec repo instead
of maintaining it upstream, let's drop support for dist-git-source: true
which won't be needed anymore when we move the fmf stuff to the Fedora
spec repository.

8 months agofmf: Stop creating /etc/pacman.d/gnupg mountpoint
Daan De Meyer [Wed, 19 Mar 2025 10:09:43 +0000 (11:09 +0100)] 
fmf: Stop creating /etc/pacman.d/gnupg mountpoint

Not needed anymore with latest versions of mkosi.

8 months agofmf: Drop btrfs workaround
Daan De Meyer [Wed, 19 Mar 2025 10:09:04 +0000 (11:09 +0100)] 
fmf: Drop btrfs workaround

We switched to ext4 in mkosi.repart itself, so drop the workaround
in the fmf integration test script.

8 months agopackit: Use same specfile revision as mkosi uses
Daan De Meyer [Wed, 19 Mar 2025 10:03:05 +0000 (11:03 +0100)] 
packit: Use same specfile revision as mkosi uses

8 months agopackit: Enable use_target_repo_for_fmf_url option
Daan De Meyer [Wed, 19 Mar 2025 09:54:51 +0000 (10:54 +0100)] 
packit: Enable use_target_repo_for_fmf_url option

Currently this is picked up from the main branch of the fork which is
suboptimal. The packit folks implemented this new option for us which
should fix the problem.

8 months agouserdb: Add userdb.user.* and userdb.group.* credentials (#36740) 36834/head
Daan De Meyer [Wed, 19 Mar 2025 09:30:52 +0000 (10:30 +0100)] 
userdb: Add userdb.user.* and userdb.group.* credentials (#36740)

Let's allow providing extra userdb users and groups via credentials.
Similarly to systemd-udev-load-credentials.service, we ship
systemd-userdb-load-credentials.service which transform the JSON
user/group records provided via the corresponding credentials to static
userdb dropins in /run/userdb.

8 months agocore: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN 36771/head
Daan De Meyer [Mon, 17 Mar 2025 10:35:23 +0000 (11:35 +0100)] 
core: Make DelegateNamespaces= work for user managers with CAP_SYS_ADMIN

Currently DelegateNamespaces= only works for services spawned by the
system manager. User managers will always unshare the user namespace
first even if they're running with CAP_SYS_ADMIN.

Let's add support for DelegateNamespaces= for user managers if they're
running with CAP_SYS_ADMIN. By default, we'll still delegate all namespaces
for user managers, but this can now be overridden by explicitly passing
DelegateNamespaces=.

If a user manager is running without CAP_SYS_ADMIN, the user manager is
still always unshared first just like before.

8 months agotest: Fix formatting
Daan De Meyer [Mon, 17 Mar 2025 15:25:19 +0000 (16:25 +0100)] 
test: Fix formatting

8 months agorun: Stop agents before we drop privileges
Daan De Meyer [Mon, 17 Mar 2025 15:01:26 +0000 (16:01 +0100)] 
run: Stop agents before we drop privileges

After dropping privileges, we won't be able to stop agents anymore
as our signals will get ignored.

8 months agosd_bus_open_user_machine(): Don't shortcut without necessary env
Daan De Meyer [Mon, 17 Mar 2025 11:28:37 +0000 (12:28 +0100)] 
sd_bus_open_user_machine(): Don't shortcut without necessary env

Don't shortcut if we don't have the necessary environment variables
set in sd_bus_open_user_machine().

8 months agocapability-util: Ignore unknown capabilities instead of aborting
Daan De Meyer [Mon, 17 Mar 2025 11:26:46 +0000 (12:26 +0100)] 
capability-util: Ignore unknown capabilities instead of aborting

capability_ambient_set_apply() can be called with capability sets
containing unknown capabilities. Let's not crash when this is the
case but instead ignore the unknown capabilities.

This fixes a crash when running the following command:

"systemd-run -p "AmbientCapabilities=~" --wait --pipe id"

Fixes d5e12dc75e0e356c62e514e9c347efb200fe60e0

8 months agoTEST-07-PID1.private-pids: Use --machine=testuser@.host instead of runas
Daan De Meyer [Tue, 18 Mar 2025 08:48:21 +0000 (09:48 +0100)] 
TEST-07-PID1.private-pids: Use --machine=testuser@.host instead of runas

Let's use the systemd way to run systemd-run as a different user instead
of setpriv.

8 months agoTEST-07-PID1.delegate-namespaces: Actually run the testcases
Daan De Meyer [Mon, 17 Mar 2025 10:31:48 +0000 (11:31 +0100)] 
TEST-07-PID1.delegate-namespaces: Actually run the testcases

8 months agoTEST-07-PID1.delegate-namespaces: Fix testcase_pid()
Daan De Meyer [Mon, 17 Mar 2025 20:22:49 +0000 (21:22 +0100)] 
TEST-07-PID1.delegate-namespaces: Fix testcase_pid()

Make sure the test has its own /proc and skip it in containers as
MountAPIVFS=yes in a container always results in a read-only /proc/sys
which means the test can't write to /proc/sys/kernel/ns_last_pid.

8 months agoTEST-07-PID1.delegate-namespaces: Make sure fully visible procfs is available
Daan De Meyer [Mon, 17 Mar 2025 15:20:00 +0000 (16:20 +0100)] 
TEST-07-PID1.delegate-namespaces: Make sure fully visible procfs is available

To be able to mount /proc inside an unprivileged user namespace, we have
to make sure a fully visible procfs is available on the host, so let's make
sure that's the case.

8 months agocore: Also check if we can mount /proc if pid namespace is delegated
Daan De Meyer [Mon, 17 Mar 2025 15:17:25 +0000 (16:17 +0100)] 
core: Also check if we can mount /proc if pid namespace is delegated

If the pid namespace is delegated, it doesn't matter if we have CAP_SYS_ADMIN,
we'll still fail to mount /proc if part of it is masked on the host so also
check if we can mount /proc if the pid namespace is delegated.

8 months agoTEST-07-PID1.delegate-namespaces: Fix testcase_network()
Daan De Meyer [Mon, 17 Mar 2025 10:31:28 +0000 (11:31 +0100)] 
TEST-07-PID1.delegate-namespaces: Fix testcase_network()

8 months agobus-unit-util: Fix DelegateNamespaces= parser
Daan De Meyer [Mon, 17 Mar 2025 10:29:48 +0000 (11:29 +0100)] 
bus-unit-util: Fix DelegateNamespaces= parser

Similarly to the config file parse method, let's fix the systemd-run
parser as well.

Follow up for 11b982053bdc31806e571ea0771d7f10cb276d69

8 months agoexec-invoke: Rename various variables from has_ to have_
Daan De Meyer [Mon, 17 Mar 2025 09:44:05 +0000 (10:44 +0100)] 
exec-invoke: Rename various variables from has_ to have_

All of these encode information of the current process, so have_ is
more approriate than has_, which refers to something else.

8 months agounits: Add systemd-machined.socket
Daan De Meyer [Tue, 18 Mar 2025 13:37:15 +0000 (14:37 +0100)] 
units: Add systemd-machined.socket

8 months agoptyfwd: use usec_add() 36791/head
Yu Watanabe [Wed, 19 Mar 2025 02:30:36 +0000 (11:30 +0900)] 
ptyfwd: use usec_add()

Fixes CID#1548038.

8 months agoio-util: add one more assertion for Coverity
Yu Watanabe [Wed, 19 Mar 2025 02:21:46 +0000 (11:21 +0900)] 
io-util: add one more assertion for Coverity

Fixes CID#1548067.

8 months agonspawn-oci: update overflow check
Yu Watanabe [Wed, 19 Mar 2025 02:12:33 +0000 (11:12 +0900)] 
nspawn-oci: update overflow check

Fixes CID#1548072.

8 months agosd-dhcp-client: use event_reset_time_relative()
Yu Watanabe [Wed, 19 Mar 2025 01:59:53 +0000 (10:59 +0900)] 
sd-dhcp-client: use event_reset_time_relative()

Fixes CID#1548073.

8 months agologs-show: comment out dead code
Yu Watanabe [Wed, 19 Mar 2025 01:51:35 +0000 (10:51 +0900)] 
logs-show: comment out dead code

Follow-up for 280e85224e6273f1835a41782f2e3abd7582dd2e.
Fixes CID#1548921 and CID#1548922.

8 months agologind-action: use BIT_SET() and SET_BIT()
Yu Watanabe [Wed, 19 Mar 2025 01:47:31 +0000 (10:47 +0900)] 
logind-action: use BIT_SET() and SET_BIT()

Hopefully fixes CID#1529417.

8 months agojournal: fix indentation
Yu Watanabe [Wed, 19 Mar 2025 01:38:53 +0000 (10:38 +0900)] 
journal: fix indentation

8 months agobus-unit-procs: add one more assertion for Coverity
Yu Watanabe [Wed, 19 Mar 2025 01:35:17 +0000 (10:35 +0900)] 
bus-unit-procs: add one more assertion for Coverity

Hopefully fixes CID#1562447.

8 months agoboot: always pass an array of PeSectionVector to pe_locate_sections()
Yu Watanabe [Wed, 19 Mar 2025 01:23:26 +0000 (10:23 +0900)] 
boot: always pass an array of PeSectionVector to pe_locate_sections()

Hopefully silences false-positive warnings by Coverity.
Fixes CID#1549198, CID#1549199, CID#1564903.

8 months agobitfield: check if specified index is non-negative
Yu Watanabe [Wed, 19 Mar 2025 00:38:36 +0000 (09:38 +0900)] 
bitfield: check if specified index is non-negative

Hopefully silences false-positive warnings by Coverity e.g. CID#1590746.

8 months agoUpdate TODO 36740/head
Daan De Meyer [Tue, 18 Mar 2025 10:24:38 +0000 (11:24 +0100)] 
Update TODO

8 months agomkosi: Create testuser at runtime
Daan De Meyer [Thu, 13 Mar 2025 14:27:03 +0000 (15:27 +0100)] 
mkosi: Create testuser at runtime

Now that we have userdb credentials, let's ship testuser as a userdb
credential instead of including it in the image.

8 months agouserdb: Add userdb.user.* and userdb.group.* credentials
Daan De Meyer [Thu, 13 Mar 2025 14:22:34 +0000 (15:22 +0100)] 
userdb: Add userdb.user.* and userdb.group.* credentials

Let's allow providing extra userdb users and groups via credentials.
Similarly to systemd-udev-load-credentials.service, we ship
systemd-userdb-load-credentials.service which transform the JSON
user/group records provided via the corresponding credentials to static
userdb dropins in /etc/userdb.

Replaces #33811

8 months agomkosi: Make sure systemd-userdbd.socket is enabled
Daan De Meyer [Tue, 18 Mar 2025 12:51:35 +0000 (13:51 +0100)] 
mkosi: Make sure systemd-userdbd.socket is enabled

8 months agomkosi: Add unix_chkpwd to sanitizer wrapped binaries
Daan De Meyer [Tue, 18 Mar 2025 21:45:17 +0000 (22:45 +0100)] 
mkosi: Add unix_chkpwd to sanitizer wrapped binaries

unix_chkpwd will retrieve the user name of the uid it is invoked as
and as such needs the asan workaround.

8 months agomkosi: Bump to Fedora 42
Daan De Meyer [Tue, 18 Mar 2025 19:35:59 +0000 (20:35 +0100)] 
mkosi: Bump to Fedora 42

Beta was just released, let's switch to Fedora 42 which coincidentally
also has a crucial fix for its nsswitch.conf to make the next commits
actually work.

8 months agoSeveral fixes and cleanups around sd_listen_fds() (#36788)
Daan De Meyer [Tue, 18 Mar 2025 19:10:33 +0000 (20:10 +0100)] 
Several fixes and cleanups around sd_listen_fds() (#36788)

8 months agoupdate TODO
Lennart Poettering [Tue, 18 Mar 2025 17:12:23 +0000 (18:12 +0100)] 
update TODO

8 months agonspawn: make failure in sd_listen_fds() critical 36788/head
Yu Watanabe [Tue, 18 Mar 2025 16:38:18 +0000 (01:38 +0900)] 
nspawn: make failure in sd_listen_fds() critical

Also, drop doubled call of sd_listen_fds().

8 months agooomd: do not ignore failure in sd_lisen_fds()
Yu Watanabe [Tue, 18 Mar 2025 16:33:54 +0000 (01:33 +0900)] 
oomd: do not ignore failure in sd_lisen_fds()

Also, use -EBADF for an invalid file descriptor.

8 months agovmspawn: do not use r for loop count
Yu Watanabe [Tue, 18 Mar 2025 16:35:13 +0000 (01:35 +0900)] 
vmspawn: do not use r for loop count

In a future, we may call some functions and r may be used for storing
error code of them. Let's not use r for the maximum number of loop count.

8 months agosd-varlink: fix overwrite of loop count
Yu Watanabe [Tue, 18 Mar 2025 16:33:09 +0000 (01:33 +0900)] 
sd-varlink: fix overwrite of loop count

Fixes a bug introduced by 206504a594492f4b97259bbe345dde4e520df7dc (v255).

8 months agoinitctl: fix error handling
Yu Watanabe [Tue, 18 Mar 2025 16:32:12 +0000 (01:32 +0900)] 
initctl: fix error handling

Fixes a bug introduced by cc090ca7fec93cd6b41bd7a756cd5fe32df44764 (v246).

8 months agonsresourced: fix assignment of target_gid
Yu Watanabe [Tue, 18 Mar 2025 09:53:59 +0000 (18:53 +0900)] 
nsresourced: fix assignment of target_gid

Follow-up for 00b1f6731398d02409cf7deb6b9b803969fda89f.

Fixes CID#1593901.

8 months agoman: base64 is not hex
Lennart Poettering [Tue, 18 Mar 2025 10:40:14 +0000 (11:40 +0100)] 
man: base64 is not hex

8 months agoTODO
Lennart Poettering [Tue, 18 Mar 2025 10:48:27 +0000 (11:48 +0100)] 
TODO

8 months agoupdate TODO
Lennart Poettering [Tue, 18 Mar 2025 09:45:21 +0000 (10:45 +0100)] 
update TODO

8 months agocondition: introduce ConditionVersion=/AssertVersion= 36468/head
Matteo Croce [Thu, 20 Feb 2025 12:07:24 +0000 (13:07 +0100)] 
condition: introduce ConditionVersion=/AssertVersion=

Add a new condition wich checks against systemd version.
Change condition_test_kernel_version() into a generic condition_test_version()
so most of the code can be reused.

    $ systemctl --version
    systemd 258 (258~devel-g53ca5f6)

    $ systemd-analyze condition 'ConditionVersion=systemd>255'
    test.service: ConditionVersion=>255 succeeded.

    $ systemd-analyze condition 'ConditionVersion=systemd>260'
    test.service: ConditionVersion=>260 failed.

    $ systemd-analyze condition 'ConditionVersion=systemd>=258'
    test.service: ConditionVersion=>=258 succeeded.

    $ systemd-analyze condition 'ConditionVersion=systemd>=257.1'
    test.service: ConditionVersion=>=257.1 succeeded.

    $ uname -r
    6.12.13-200.fc41.aarch64

    $ systemd-analyze condition 'ConditionVersion=kernel > 4.4'
    test.service: ConditionVersion=kernel > 4.4 succeeded.

    $ systemd-analyze condition 'ConditionVersion=kernel > 6.20'
    test.service: ConditionVersion=kernel > 6.20 failed.

    $ systemd-analyze condition 'ConditionVersion=kernel < 9.0'
    test.service: ConditionVersion=kernel < 9.0 succeeded.