]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
7 months agotest-cgroup-util: Ignore LXC group 36024/head
Michal Koutný [Mon, 3 Feb 2025 16:02:09 +0000 (17:02 +0100)] 
test-cgroup-util: Ignore LXC group

LXC helper processes hide themselve in .lxc cgroup, we don't have to
deal with the inside tests (and the error in conversion to unit is handled).
Skip those but keep iterating over remaining processes to detect what
can be created around us.

7 months agotest-cgroup-util: Skip procs analysis without cgroupfs
Michal Koutný [Fri, 17 Jan 2025 17:00:25 +0000 (18:00 +0100)] 
test-cgroup-util: Skip procs analysis without cgroupfs

cg_pidref_get_path() cannot work (current implementaion) without
cgroupfs (when it checks unified or not setup). Similarly,
cg_pidref_get_unit() assumes all processes are part of a unit. So carry
out the test only when running on a systemd setup.

7 months agotest-cgroup-util: Check return values
Michal Koutný [Wed, 15 Jan 2025 15:36:28 +0000 (16:36 +0100)] 
test-cgroup-util: Check return values

The test is supposed to check a battery of cgroup helpers on each
process found but it doesn't literally check anything besides presence
of procfs. (One can visually check printed output only. Introduction in
aff38e74bd ("nspawn: suffix the nspawn cgroups with ".nspawn"").)

Make some assumptions about visible processes and turn the test into
testing that systemd helpers can deal with whatever process they find on
the SUT.

Reported by Coverity and
Fixes CID#1587767

7 months agohostname: fix typo
Yu Watanabe [Tue, 11 Mar 2025 21:26:45 +0000 (06:26 +0900)] 
hostname: fix typo

Follow-up for af9c45d5b6c1b1962731dffc638a2320e5eef095.

7 months agoresolve question marks in /etc/hostname to characters hashed from machine ID (#36647)
Yu Watanabe [Tue, 11 Mar 2025 19:50:33 +0000 (04:50 +0900)] 
resolve question marks in /etc/hostname to characters hashed from machine ID (#36647)

So I have a bunch of particle os instances around, that I frequently
factory reset. and it's confusing, since they all have the same name.
Let's do something about this, and extend the hostname setup logic a bit
to deal better with "cattle" rather than "pet" deployments.
Specifically: if a hostname in /etc/hostname contains a bunch of
question marks we'll replace it with hex chars hashed from the machine
id.

This allows us to do something like this:

hostnamectl set-hostname --static 'funky-????-????-???'

and we'll end up with a hostname like `funky-baf4-b653-e230`

7 months agomountfsd: add complete varlink introspection comments (#36703)
Yu Watanabe [Tue, 11 Mar 2025 19:48:12 +0000 (04:48 +0900)] 
mountfsd: add complete varlink introspection comments (#36703)

7 months agoupdate TODO 36703/head
Lennart Poettering [Tue, 11 Mar 2025 10:58:49 +0000 (11:58 +0100)] 
update TODO

7 months agomountfsd: also return suggested mount point paths for the returned partitions
Lennart Poettering [Tue, 11 Mar 2025 10:43:17 +0000 (11:43 +0100)] 
mountfsd: also return suggested mount point paths for the returned partitions

When mounting a disk image we return a bunch of mount fds referencing
the various partitions in the disk, along with some metadata about them.
One key metadata field is the "designator" which is supposed to tell
clients what is what, and where to mount it.

Let's make this more explicit: let's also include the literal relative
path where each mount shall be placed, to simplify implementations of
clients that do not care about the concept of designators.

7 months agomountfsd: complete varlink introspection comments
Lennart Poettering [Tue, 11 Mar 2025 10:14:15 +0000 (11:14 +0100)] 
mountfsd: complete varlink introspection comments

7 months agoupdate TODO
Lennart Poettering [Tue, 11 Mar 2025 17:19:24 +0000 (18:19 +0100)] 
update TODO

7 months agoupdate TODO 36647/head
Lennart Poettering [Thu, 6 Mar 2025 22:11:08 +0000 (23:11 +0100)] 
update TODO

7 months agotest: add test checking if pattern based hostnames work
Lennart Poettering [Fri, 7 Mar 2025 08:32:58 +0000 (09:32 +0100)] 
test: add test checking if pattern based hostnames work

7 months agohostname: support that /etc/hostname contains ??? as wildcards to be replaced by...
Lennart Poettering [Thu, 6 Mar 2025 17:31:12 +0000 (18:31 +0100)] 
hostname: support that /etc/hostname contains ??? as wildcards to be replaced by hash value from /etc/machine-id

7 months agobasic: move gethostname_full() from basic/hostname-util.c → shared/hostname-setup.c
Lennart Poettering [Thu, 6 Mar 2025 17:28:44 +0000 (18:28 +0100)] 
basic: move gethostname_full() from basic/hostname-util.c → shared/hostname-setup.c

In one of the next commits we'd like to introduce a concept of
optionally hashing the hostname from the machine ID. For that we we need
to optionally back gethostname_full() by code involving sd-id128, hence
let's move it from src/basic/ to src/shared/, since only there we are
allowed to use our public APIs.

7 months agoupdate TODO
Lennart Poettering [Tue, 11 Mar 2025 16:19:25 +0000 (17:19 +0100)] 
update TODO

7 months agobus-polkit: shortcut auth. after first denial
David Tardon [Fri, 7 Mar 2025 15:22:00 +0000 (16:22 +0100)] 
bus-polkit: shortcut auth. after first denial

A D-Bus/Varlink method can issue PolicyKit auth. requests for multiple
actions; in this case the method is expected to fail on the first one
that is not allowed. This is enforced by asserts in
async_polkit_read_reply(), but that's a wrong place for the check for
two reasons:

1. it doesn't allow to get a meaningful stack trace;
2. sending the query to polkit is already a pointless exercise.

Let's do the check in *_verify_polkit_async_full() and don't send
anything to PolicyKit in that case.

Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2349594 .

7 months agodocs: clarify userns mapping when /proc/sys is rw
Ivan Kruglov [Wed, 19 Feb 2025 11:14:20 +0000 (03:14 -0800)] 
docs: clarify userns mapping when /proc/sys is rw

7 months agocgroup-util: Handle capsule@ paths like user@ paths (#36664)
Lennart Poettering [Tue, 11 Mar 2025 11:03:57 +0000 (12:03 +0100)] 
cgroup-util: Handle capsule@ paths like user@ paths  (#36664)

The capsule instances are related to user instances, so treat them
equally to user@.service when handling cgroup paths. This also saves us
from polluting public libsystemd API with variant for capsules too.

Fix: https://github.com/systemd/systemd/issues/36098

7 months agocore/service: introduce sd_notify() RESTART_RESET=1 for resetting restart counter...
Lennart Poettering [Tue, 11 Mar 2025 11:03:12 +0000 (12:03 +0100)] 
core/service: introduce sd_notify() RESTART_RESET=1 for resetting restart counter (#36698)

7 months agocore/main: fix logging of /sbin/init exec failure
Mike Yuan [Sun, 9 Mar 2025 13:14:45 +0000 (14:14 +0100)] 
core/main: fix logging of /sbin/init exec failure

Follow-up for 93e19483dc9fae94d713d036ecee669450bd002d

While at it, avoid duplicate manager_status_printf()
(error_message will be shown in main()).

7 months agotmpfiles: ignore ENOENT when file is removed during setting parmission and friends
Yu Watanabe [Mon, 10 Mar 2025 22:01:16 +0000 (07:01 +0900)] 
tmpfiles: ignore ENOENT when file is removed during setting parmission and friends

After a file matches with a glob pattern, the file may be removed or
renamed before opening it. Let's ignore the error in such case.

Fixes #30938.

7 months agoupdate TODO
Lennart Poettering [Tue, 11 Mar 2025 09:46:13 +0000 (10:46 +0100)] 
update TODO

7 months agoudev: reread partition table and trigger synthetic change events in child process...
Yu Watanabe [Tue, 11 Mar 2025 09:43:43 +0000 (18:43 +0900)] 
udev: reread partition table and trigger synthetic change events in child process (#36685)

7 months agocgroup-util: Handle capsule@ paths like user@ paths 36664/head
Michal Koutný [Mon, 3 Feb 2025 13:44:20 +0000 (14:44 +0100)] 
cgroup-util: Handle capsule@ paths like user@ paths

The capsule instances are related to user instances, so treat them
equally to user@.service when handling cgroup paths. This also saves us
from polluting public libsystemd API with variant for capsules too.

Fix: #36098

7 months agoTODO: support RESTART_RESET=1 in journal-upload 36698/head
Mike Yuan [Sun, 27 Oct 2024 12:05:01 +0000 (13:05 +0100)] 
TODO: support RESTART_RESET=1 in journal-upload

7 months agocore/service: introduce sd_notify() RESTART_RESET=1 for resetting restart counter
Mike Yuan [Fri, 25 Oct 2024 23:51:04 +0000 (01:51 +0200)] 
core/service: introduce sd_notify() RESTART_RESET=1 for resetting restart counter

We have RestartMaxDelaySec= + RestartSteps= to exponentially increase
auto restart durations, but it currently cannot be reset by the service
itself, which makes it sometimes awkward to use. A typical pattern
in real life is that a service was once down (e.g. due to temporary
network interruption) and multiple restarts were attempted. Then,
future restarts would always wait for increated amount of time based on
RestartMaxDelaySec=, even after the original problem got resolved.
Such "persistence" could result in longer unavailablity than there
should be for failures that come later.
(C.f. https://utcc.utoronto.ca/~cks/space/blog/linux/SystemdResettingUnitBackoff)

Let's introduce a new sd_notify() notification for resetting the restart
counter. There were discussions about making this timer-based, but I think
it's more flexible to leave the decision-making to the service. This enables
them to do a combination of N successful requests + uptime check for instance.

7 months agocore/unit: disable unit debug invocation in generic unit_reset_failed()
Mike Yuan [Fri, 8 Nov 2024 15:57:40 +0000 (16:57 +0100)] 
core/unit: disable unit debug invocation in generic unit_reset_failed()

7 months agoudev: use ERRNO_IS_NEG_* where appropriate (#36690)
Yu Watanabe [Mon, 10 Mar 2025 22:51:41 +0000 (07:51 +0900)] 
udev: use ERRNO_IS_NEG_* where appropriate (#36690)

Follow-up for f8825c1364fb1c3f3f5d96654e779fd51500f476.

7 months agoudev: scan partitions and trigger synthetic change events in child process 36685/head
Yu Watanabe [Mon, 10 Mar 2025 13:44:02 +0000 (22:44 +0900)] 
udev: scan partitions and trigger synthetic change events in child process

Rereading partition table may take longer on slow disk. The main process
should not be blocked by the operation. Let's fork a child process and
do that on the child.

Prompted by #36624 and #36269.

7 months agoudev: split out synthesize_change_all() from synthesize_change()
Yu Watanabe [Mon, 10 Mar 2025 13:39:50 +0000 (22:39 +0900)] 
udev: split out synthesize_change_all() from synthesize_change()

No functional change. Preparation for later change.

7 months agoumount: do not move busy network mounts
Antonio Alvarez Feijoo [Mon, 10 Mar 2025 11:21:26 +0000 (12:21 +0100)] 
umount: do not move busy network mounts

If a network mount returns EBUSY on umount, the logic introduced in
6dc68a00cfc816678fd713b12ae2a4cf2ae6da85 causes shutdown to hang indefinitely on
`fstatat()` (i.e., within `is_dir(m->path, true)`). Hence, skip this logic for
network mounts (following the same motivation we use to skip read-only mounts in
this kind of file systems).

Fixes 6dc68a00cfc816678fd713b12ae2a4cf2ae6da85

7 months agonsresourced,vmspawn,mountfsd: various smaller fixes (#36689)
Yu Watanabe [Mon, 10 Mar 2025 20:50:04 +0000 (05:50 +0900)] 
nsresourced,vmspawn,mountfsd: various smaller fixes (#36689)

7 months agoevent-util: move event_source_hash_ops to event-util
Yu Watanabe [Mon, 10 Mar 2025 10:29:51 +0000 (19:29 +0900)] 
event-util: move event_source_hash_ops to event-util

7 months agonsresourced,mountfsd: set userdata pointer via varlink_server_new() 36689/head
Lennart Poettering [Mon, 10 Mar 2025 12:35:45 +0000 (13:35 +0100)] 
nsresourced,mountfsd: set userdata pointer via varlink_server_new()

7 months agovmspawn: properly exit in vmspawn child on failure
Lennart Poettering [Mon, 10 Mar 2025 10:37:03 +0000 (11:37 +0100)] 
vmspawn: properly exit in vmspawn child on failure

7 months agonsresourced: fix initialization of netns_fd_idx
Lennart Poettering [Sun, 9 Mar 2025 07:13:47 +0000 (08:13 +0100)] 
nsresourced: fix initialization of netns_fd_idx

7 months agonsresourced: clear up some type confusion
Lennart Poettering [Sun, 9 Mar 2025 07:09:40 +0000 (08:09 +0100)] 
nsresourced: clear up some type confusion

We settle on the types the backend implementation in
userns-registry.[ch] uses too. i.e. uid_t/gid_t for the bases, and
uint32_t for the uid range sizes.

7 months agonsresourced: permit numeric uid/gid also be specified as strings
Lennart Poettering [Sun, 9 Mar 2025 07:03:24 +0000 (08:03 +0100)] 
nsresourced: permit numeric uid/gid also be specified as strings

7 months agonsresourced: fix offset
Lennart Poettering [Mon, 10 Mar 2025 15:35:09 +0000 (16:35 +0100)] 
nsresourced: fix offset

Follow-up for: ee6fd7ef82522d538dd513e8aabf6d29ece4dc92

7 months agosystemd.exec(5): RestrictAddressFamilies: mention address_families(7)
NetSysFire [Mon, 10 Mar 2025 14:24:26 +0000 (15:24 +0100)] 
systemd.exec(5): RestrictAddressFamilies: mention address_families(7)

7 months agorun: declare ARG_STDIO_XYZ like a flag
Yu Watanabe [Mon, 10 Mar 2025 09:22:28 +0000 (18:22 +0900)] 
run: declare ARG_STDIO_XYZ like a flag

Then, we can easily handle the assignment when both --pipe and
--pty/--pty-late are specified.
No functional change, just a refactoring.

7 months agovmspawn: fix typo
Yu Watanabe [Mon, 10 Mar 2025 09:12:32 +0000 (18:12 +0900)] 
vmspawn: fix typo

Follow-up for ef430b84e9f508dd27046b33a4f61dc57a71bb67.

7 months agomeson: bump required minimum version to 0.62.0 (#36610)
Yu Watanabe [Sun, 9 Mar 2025 22:51:28 +0000 (07:51 +0900)] 
meson: bump required minimum version to 0.62.0 (#36610)

- bump the requred minimum version of meson to 0.62.0,
- use install_symlink(), which is supported since meson-0.61.0,
- use more features provided by newer meson with careful
conditionalization.

Follow-up for 8442ac9c0264ac7beb5afd6c3bf922030a6edaf3.
Closes #35967.

7 months agonetwork: add log messages when a route can't be updated
Matteo Croce [Thu, 27 Feb 2025 19:10:20 +0000 (20:10 +0100)] 
network: add log messages when a route can't be updated

Sometimes networkd removes a route, based on route_can_update() verdict.
Add some debug messages to better understand whi this decision has been made.

7 months agodocs: reference cgroup v1 as historical and unsupported
Mike Yuan [Sun, 9 Mar 2025 14:16:58 +0000 (15:16 +0100)] 
docs: reference cgroup v1 as historical and unsupported

7 months agovmspawn: optionally grow image
Lennart Poettering [Wed, 5 Mar 2025 14:24:28 +0000 (15:24 +0100)] 
vmspawn: optionally grow image

7 months agopo: update Japanese translations
Yu Watanabe [Sun, 9 Mar 2025 18:35:54 +0000 (03:35 +0900)] 
po: update Japanese translations

7 months agoman: fix typo
Yu Watanabe [Sun, 9 Mar 2025 18:23:44 +0000 (03:23 +0900)] 
man: fix typo

Follow-ups for fd0dd2d4bce00b69f8badab1a71b8929e392af5c.

7 months agomeson: use more features provided by newer meson 36610/head
Yu Watanabe [Wed, 5 Mar 2025 13:00:41 +0000 (22:00 +0900)] 
meson: use more features provided by newer meson

No functional change. Preparation for future bump of required meson
version.

7 months agomeson: use install_symlink() where applicable
Yu Watanabe [Tue, 4 Mar 2025 21:27:08 +0000 (06:27 +0900)] 
meson: use install_symlink() where applicable

Now our baseline of meson is 0.62, hence install_symlink() can be used.

Note, install_symlink() implies install_emptydir() for specified
install_dir. Hence, this also drops several unnecessary
install_emptydir() calls.

Note, the function currently does not support 'relative' and 'force' flags,
so several 'ln -frsT' inline calls cannot be replaced.

7 months agomeson: invert version check condition to magically suppress warning
Yu Watanabe [Wed, 5 Mar 2025 12:39:06 +0000 (21:39 +0900)] 
meson: invert version check condition to magically suppress warning

Then, it works with --fatal-meson-warnings.

7 months agotest-network: replace symlink to 99-default.link with a copy
Yu Watanabe [Tue, 4 Mar 2025 23:07:07 +0000 (08:07 +0900)] 
test-network: replace symlink to 99-default.link with a copy

Then, we can drop ugly workaround in meson.build.
The .link file is not necessarily synced with 99-default.link.
Also, 99-default.link is not updated so frequently.
Let's manually sync it when necessary.

7 months agomeson: bump required minimum version to 0.62.0
Yu Watanabe [Tue, 4 Mar 2025 18:14:04 +0000 (03:14 +0900)] 
meson: bump required minimum version to 0.62.0

The commit 8442ac9c0264ac7beb5afd6c3bf922030a6edaf3 set
install_tag option to install_emptydir() calls, but it requires
meson-0.62.0. Hence, after the commit, we cannot build systemd
with older meson anymore. As using install_tag is quite useful
for building systemd package, let's bump the requirement of
meson version to 0.62.0.

Note, the current meson versions of major distributions are:
CentOS 9:  0.63.3
CentOS 10: 1.4.1
Fedora 40: 1.4.1
Fedora 41: 1.5.1
Ubuntu 20.04 LTS (focal): 0.53.2 -- EOL on 2025-04
Ubuntu 22.04 LTS (jammy): 0.61.2 -- EOL on 2027-04
Ubuntu 24.04 LTS (noble): 1.3.2
Ubuntu 24.10 (oracular):  1.5.2
Debian 11 (bullseye): 0.56.2 (1.0.0 in backports) -- EOL on 2024-08
Debian 12 (bookworm): 1.0.1  (1.5.1 in backports)
openSUSE Leap 15.6:  1.6.1
openSUSE Tumbleweed: 1.6.1

As the next version (v258) is not expected to be released before
the end of 2025-04, it is OK to cut the support of Ubuntu 20.04 LTS and
Debian 11. Also, our policy for support of distributions explicitly says
only latest Ubuntu LTS and non-LTS releases are supported.
Hence, we can also cut Ubuntu 22.04, even if it is not EOL.

Follow-up for 8442ac9c0264ac7beb5afd6c3bf922030a6edaf3.
Closes #35967.

8 months agopo: add false positives to POTFILES.skip
Piotr Drąg [Sun, 9 Mar 2025 11:26:21 +0000 (12:26 +0100)] 
po: add false positives to POTFILES.skip

Scripts used to detect files that should be in POTFILES.in, like
intltool-update -m used on https://l10n.gnome.org/module/systemd/,
falsely detect these files as containing translations. Avoid this
behavior by putting the files in POTFILES.skip.

8 months agopo: Translated using Weblate (Estonian)
Henri Aunin [Sun, 9 Mar 2025 02:33:03 +0000 (02:33 +0000)] 
po: Translated using Weblate (Estonian)

Currently translated at 79.3% (204 of 257 strings)

Co-authored-by: Henri Aunin <contact+fedora@hen.ee>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/et/
Translation: systemd/main

8 months agomount-setup: two trivial cleanups (#36668)
Yu Watanabe [Sun, 9 Mar 2025 00:42:41 +0000 (09:42 +0900)] 
mount-setup: two trivial cleanups (#36668)

8 months agocore/main: several cleanups (#36669)
Yu Watanabe [Sun, 9 Mar 2025 00:40:19 +0000 (09:40 +0900)] 
core/main: several cleanups (#36669)

Prompted by #36622

8 months agopo: Translated using Weblate (Estonian)
H A [Sat, 8 Mar 2025 20:45:51 +0000 (20:45 +0000)] 
po: Translated using Weblate (Estonian)

Currently translated at 61.4% (158 of 257 strings)

Co-authored-by: H A <contact+fedora@hen.ee>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/et/
Translation: systemd/main

8 months agocore/main: correct retval for reexec/switch-root/soft-reboot 36669/head
Mike Yuan [Wed, 5 Mar 2025 17:35:50 +0000 (18:35 +0100)] 
core/main: correct retval for reexec/switch-root/soft-reboot

For these objectives we ought to execve() at the end, i.e. if we
ever hit the return path something went wrong in do_reexecute().
Let's properly report that via retval.

8 months agocore/main: preemptively check existence of init only if we're switching root
Mike Yuan [Sat, 8 Mar 2025 19:09:58 +0000 (20:09 +0100)] 
core/main: preemptively check existence of init only if we're switching root

Follow-up for aaa27e2e21c04339914f26b7125789087eb51166

The commit described about system potentially becoming undebuggable
after switching into broken root or whatnot. But notably we can never
activate emergency.target after do_reexecute() failure, since the Manager
has been destructed. Plus, for a normal reexecution the fallback shell logic
triggered on non-existent /sbin/init is kinda useful. Let's hence guard
the extra check behind switch-root.

Also, move the check below /run/nextroot/ detection.

8 months agocore/main: assign mac_init() retval to r
Mike Yuan [Wed, 5 Mar 2025 17:22:19 +0000 (18:22 +0100)] 
core/main: assign mac_init() retval to r

If it fails, we'd submit the errno to supervisor via sd_notify() later.

8 months agocore/main: log about save_env() error
Mike Yuan [Sat, 8 Mar 2025 19:04:17 +0000 (20:04 +0100)] 
core/main: log about save_env() error

8 months agocore/main: port to log_syntax_parse_error()
Mike Yuan [Sat, 8 Mar 2025 18:41:29 +0000 (19:41 +0100)] 
core/main: port to log_syntax_parse_error()

8 months agocore: move CrashAction enum def to crash-handler.[ch]
Mike Yuan [Sat, 8 Mar 2025 18:27:55 +0000 (19:27 +0100)] 
core: move CrashAction enum def to crash-handler.[ch]

8 months agocore/meson: move efi-random.c out of libcore
Mike Yuan [Sat, 8 Mar 2025 18:23:04 +0000 (19:23 +0100)] 
core/meson: move efi-random.c out of libcore

It's used only in core/main.c

8 months agocore/main: remove unused include
Mike Yuan [Sat, 8 Mar 2025 18:37:19 +0000 (19:37 +0100)] 
core/main: remove unused include

8 months agomount-setup: tune down log level if usrquota is not supported, apply usrquota when... 36668/head
Mike Yuan [Thu, 6 Mar 2025 12:14:13 +0000 (13:14 +0100)] 
mount-setup: tune down log level if usrquota is not supported, apply usrquota when smack is in use too

Follow-up for 8f5131fb9e7979022521d685e69b6419f0884677

8 months agomount-setup: drop outdated comment
Mike Yuan [Sat, 8 Mar 2025 18:13:44 +0000 (19:13 +0100)] 
mount-setup: drop outdated comment

8 months agonetwork: remove useless loop (#36648)
Matteo Croce [Sat, 8 Mar 2025 16:39:09 +0000 (17:39 +0100)] 
network: remove useless loop (#36648)

In route_metric_can_update() the loop iterates over the metrics, but
skips all indices except for RTAX_MTU.

Replace it with a simple compare.

8 months agokeyutil: support adding content into PKCS#7 signature (#36663)
Luca Boccassi [Sat, 8 Mar 2025 01:42:20 +0000 (01:42 +0000)] 
keyutil: support adding content into PKCS#7 signature (#36663)

Support including the data that was signed inside the PKCS#7 signature.
This creates a self-contained file where the signature of the data can
be verified without any other information, since the file contains the
data, signature, and certificate (which contains the public key used for
the signing).

One use case of this is IPE which requires a PKCS#7 signature that is
not "detached", i.e. includes the IPE configuration that has been
signed.

This also slightly adjusts the test case to use the x509 certificate
inside the PKCS#7 signature instead of supplying it externally during
verification.

8 months agokeyutil: support adding content into PKCS#7 signature 36663/head
Dan Streetman [Mon, 3 Mar 2025 19:49:23 +0000 (14:49 -0500)] 
keyutil: support adding content into PKCS#7 signature

8 months agohomed: add key management toolchain (#36513)
Lennart Poettering [Fri, 7 Mar 2025 21:19:33 +0000 (22:19 +0100)] 
homed: add key management toolchain (#36513)

if Lennart shall dogfood ParticleOS he needs acceptable tooling for
making his homed home dir accessible from his legacy fedora install, and
from local and remote particleos. Let's add explicit support for
scenarios like this:

1. add high level support for enrolling the account signing key from the
fedora install
2. add high level support for "adopting" a local but foreign .home file
on a system
3. add high level support for "registering" a remote user account on a
different system

(this lacks test cases and some docs, hence marked as wip)

8 months agovirt: detect "linux,dummy-virt" devicetree VMs (#36655)
Lennart Poettering [Fri, 7 Mar 2025 17:24:24 +0000 (18:24 +0100)] 
virt: detect "linux,dummy-virt" devicetree VMs (#36655)

8 months agoadd a mime type for *.home LUKS home dir files too (#36662)
Lennart Poettering [Fri, 7 Mar 2025 17:24:08 +0000 (18:24 +0100)] 
add a mime type for *.home LUKS home dir files too (#36662)

8 months agoupdate TODO 36513/head
Lennart Poettering [Thu, 27 Feb 2025 21:59:02 +0000 (22:59 +0100)] 
update TODO

8 months agotest: add integration test for the functionality added in this PR
Lennart Poettering [Thu, 27 Feb 2025 16:20:29 +0000 (17:20 +0100)] 
test: add integration test for the functionality added in this PR

8 months agohomectl: rearrange --help text with sections
Lennart Poettering [Fri, 28 Feb 2025 10:07:20 +0000 (11:07 +0100)] 
homectl: rearrange --help text with sections

We support so many verbs now, help the user with some structure

8 months agohomectl: add interface for controlling storage for negative machine ID matches
Lennart Poettering [Wed, 19 Feb 2025 20:56:54 +0000 (21:56 +0100)] 
homectl: add interface for controlling storage for negative machine ID matches

8 months agohomed: re-establish inotify watches on SIGUSR1
Lennart Poettering [Fri, 28 Feb 2025 15:53:58 +0000 (16:53 +0100)] 
homed: re-establish inotify watches on SIGUSR1

Let's define a clean way how we can reestablish file watches in homed.
This is a relevant in case we overmount /home/ as a whole. It's very
useful for our testcase in particular.

8 months agohomed: suppress warning if quota is not on on /var/ and elsewhere
Lennart Poettering [Fri, 28 Feb 2025 14:19:36 +0000 (15:19 +0100)] 
homed: suppress warning if quota is not on on /var/ and elsewhere

8 months agohomed: rescan /home/ in more occasions automatically
Lennart Poettering [Fri, 28 Feb 2025 07:47:46 +0000 (08:47 +0100)] 
homed: rescan /home/ in more occasions automatically

When unregistering a home there's a chance this "reveals" another home
by the same name in /home/, hence immediately schedule a rescan, the
same way we already schedule it in on remove.

Also, drop the conditionalization when scheduling a rescan during
remove, for the same reasons: a remove might reveal another home, and we
cannot check for that ahead of time. Trying to check is kinda a
pointless optimization anyway, since this is not a frequent operation
and rescanning is not the end of the world.

8 months agohomectl: making stripping of signatures from user records optional
Lennart Poettering [Thu, 27 Feb 2025 17:26:18 +0000 (18:26 +0100)] 
homectl: making stripping of signatures from user records optional

8 months agohomectl: also support registering (rather than creating) home directories via system...
Lennart Poettering [Thu, 20 Feb 2025 10:05:28 +0000 (11:05 +0100)] 
homectl: also support registering (rather than creating) home directories via system credentials

8 months agohomectl: expose "register" verb to register a user record locally
Lennart Poettering [Thu, 20 Feb 2025 09:21:57 +0000 (10:21 +0100)] 
homectl: expose "register" verb to register a user record locally

8 months agohomed: add concept for "adopting" an existing homedir locally
Lennart Poettering [Thu, 20 Feb 2025 08:52:18 +0000 (09:52 +0100)] 
homed: add concept for "adopting" an existing homedir locally

Currently homed scans /home/ via inotify for new .home + .homedir/
popping up to register as local users. Let's also add an explicit way to
request this form of "adoption": a bus call that takes a path and that
makes a home dir activatable locally.

(Usecase: you cross boot between two systems – let's say your traditional
fedora and your ParticleOS – and want to use the same homedir from both:
simply mount the /home dir from the other somewhere, and then hit
"homectl adopt /somewhere/lennart.home" and you have the user locally
too).

8 months agouser-record: add a concept of inverting per-host matching sections in user record
Lennart Poettering [Wed, 19 Feb 2025 16:15:56 +0000 (17:15 +0100)] 
user-record: add a concept of inverting per-host matching sections in user record

Sometimes it is useful to apply options on all hosts except some. Add a
simple concept for that.

8 months agohomectl: add a 'dry-run' mode for registering/creating users
Lennart Poettering [Wed, 19 Feb 2025 20:25:34 +0000 (21:25 +0100)] 
homectl: add a 'dry-run' mode for registering/creating users

Since this only covers user creation/registration for now, let's hide it
behind an env var. We might reconsider this eventually and make it a
proper switch one day, but who knows, it after all has this "debug tool"
wiff.

8 months agohomectl: also import signing keys at firstboot time
Lennart Poettering [Wed, 19 Feb 2025 21:53:21 +0000 (22:53 +0100)] 
homectl: also import signing keys at firstboot time

8 months agohomectl: add signing key management verbs
Lennart Poettering [Wed, 19 Feb 2025 08:41:48 +0000 (09:41 +0100)] 
homectl: add signing key management verbs

8 months agohomed: add apis for managing home signing keys
Lennart Poettering [Tue, 18 Feb 2025 23:04:03 +0000 (00:04 +0100)] 
homed: add apis for managing home signing keys

This makes it easier to actually migrate home directories between
systems.

8 months agouserdbctl: optionally show user/group data from JSON filerather than from system
Lennart Poettering [Wed, 19 Feb 2025 20:56:14 +0000 (21:56 +0100)] 
userdbctl: optionally show user/group data from JSON filerather than from system

8 months agoopenssl-util: add helper for converting EVP_PKEY to PEM string
Lennart Poettering [Tue, 18 Feb 2025 23:03:12 +0000 (00:03 +0100)] 
openssl-util: add helper for converting EVP_PKEY to PEM string

And also give the rverse a bit of love.

8 months agohostnamectl: show transient hostname before static hostname
Lennart Poettering [Fri, 7 Mar 2025 14:11:58 +0000 (15:11 +0100)] 
hostnamectl: show transient hostname before static hostname

The transient one is generally the more relevant one, since it is
typically used to reach this host remotely, and it's what shells show
you. Hence show it first.

8 months agocapsule-util: Move from shared/ to basic/
Michal Koutný [Fri, 7 Mar 2025 17:01:28 +0000 (18:01 +0100)] 
capsule-util: Move from shared/ to basic/

...so that other code in basic can use it too (basic ⊆ shared).

8 months agotest: run PKCS#7 verification with both internal and external certificates
Dan Streetman [Fri, 7 Mar 2025 16:35:05 +0000 (11:35 -0500)] 
test: run PKCS#7 verification with both internal and external certificates

8 months agomime: add mimetype for luks home dir 36662/head
Lennart Poettering [Fri, 7 Mar 2025 16:20:24 +0000 (17:20 +0100)] 
mime: add mimetype for luks home dir

8 months agomime: use 'addon' icon for sysext ddis
Lennart Poettering [Fri, 7 Mar 2025 16:20:12 +0000 (17:20 +0100)] 
mime: use 'addon' icon for sysext ddis

8 months agorules: tag /dev/tpm0 with "systemd" too
Lennart Poettering [Fri, 7 Mar 2025 13:55:43 +0000 (14:55 +0100)] 
rules: tag /dev/tpm0 with "systemd" too

Strictly speaking we don't need to tag these devices, because tpm2-tss
already does so, but given we do this for /dev/tpmrm0, we should
probably do this comprehensively if we rely on this ourselves.

Fixes: #36653
8 months agomkosi: Skip other build scripts if we're running clangd
Daan De Meyer [Fri, 7 Mar 2025 15:05:49 +0000 (16:05 +0100)] 
mkosi: Skip other build scripts if we're running clangd

8 months agomkosi: Switch to --rerun-build-scripts in mkosi.clangd
Daan De Meyer [Fri, 7 Mar 2025 14:56:24 +0000 (15:56 +0100)] 
mkosi: Switch to --rerun-build-scripts in mkosi.clangd