]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agoupdate TODO 36505/head
Lennart Poettering [Mon, 24 Feb 2025 11:07:58 +0000 (12:07 +0100)] 
update TODO

8 months agotest: extend test case to validate per-area $XDG_RUNTIME_DIR
Lennart Poettering [Mon, 24 Feb 2025 11:08:16 +0000 (12:08 +0100)] 
test: extend test case to validate per-area $XDG_RUNTIME_DIR

8 months agopam_systemd: complement per-area $HOME management with per-area $XDG_RUNTIME_DIRECTOR...
Lennart Poettering [Sun, 23 Feb 2025 02:12:16 +0000 (03:12 +0100)] 
pam_systemd: complement per-area $HOME management with per-area $XDG_RUNTIME_DIRECTORY mgmt

When a user logs into a non-default area we give them a private
$HOME for that area (that's what 'area' is supposed to be after all). We
so far left $XDG_RUNTIME_DIRECTORY as it was. Let's change that and
mirror the subdirectory logic there too.

Why? $XDG_RUNTIME_DIR is generally the place where AF_UNIX sockets are
bound that can be used to connect to per-user services. (in particular
all those which are behind D-Bus.) If we don't patch $XDG_RUNTIME_DIR
like this then this means all the backing services will use the main
area, which is problematic (since clients and services will disagree on
$HOME), and makes it impossible to support the area concept for
graphical logins properly.

This does not actually make graphical logins work, but it at least makes
them fail cleanly. That's because this patch alone won't make sure a
per-area service manager/dbus instance is invoked automatically. That
however can be added later, in a patch to logind.

8 months agopam-systemd: rework update_environment()
Lennart Poettering [Wed, 26 Feb 2025 17:14:06 +0000 (18:14 +0100)] 
pam-systemd: rework update_environment()

Let's tweak update_environment() a bit: instead of being a NOP when no
value is specified, let's actively unset the specified environment
variable if it is set.

This shouldn't change much, since for the cases we call the function so
far the env vars in question should not be set before us in a way we'd
set them differently. However, this is nice preparation for later, as we
can make use of this for XDG_AREA which we might want to unset if we
consider the area dir invalid.

8 months agopam-systemd: modernize export_legacy_dbus_address() a bit
Lennart Poettering [Wed, 26 Feb 2025 17:13:10 +0000 (18:13 +0100)] 
pam-systemd: modernize export_legacy_dbus_address() a bit

Let's log about unexpected access() failures among other things

8 months agopam_systemd_home: tweak order in authentication stack
Lennart Poettering [Mon, 24 Feb 2025 14:13:08 +0000 (15:13 +0100)] 
pam_systemd_home: tweak order in authentication stack

Let's move pam_systemd_home before pam_unix in the authentication hook.

Since a while we are exposing shadow entries for homed log entries via
NSS. This means that pam_unix now potentially has enough data for
authenticating a user on its own, without letting pam_systemd_home do
that. This is superficially OK, but also means that authentication will
always go via password, even if pkcs11/fido2 is registered.

Let's move this around, but be careful about it: let's list the precise
errors which we think are enough to terminating further PAM processing,
so that pam_unix comes into control in all cases where it's not clear
that pam_systemd_home owns the user record.

This previously wasn't visible to me, because on Fedora until authselect
1.5.1 (released earleir this year) the NSS shadow stuff was not enabled.

This does the same also for the "account" stack, except that the order
there already was as we want it.

Finally, shorten the account stack, by just requiring pam_unix.so and
dropping pam_permit.so, because it doesn't really serve much purpose
(and Fedora doesn't use it by default either.)

8 months agopam_systemd_home: update comment
Lennart Poettering [Mon, 24 Feb 2025 14:17:22 +0000 (15:17 +0100)] 
pam_systemd_home: update comment

Follow-up for 563c5511ad0dd8763eaff75db1967249f662f844, which turned
boolean parameters into flags.

8 months agofs-util: add some assert()s
Lennart Poettering [Mon, 24 Feb 2025 21:43:41 +0000 (22:43 +0100)] 
fs-util: add some assert()s

8 months agoefivars: kill SystemdOptions efi var support
Lennart Poettering [Thu, 20 Feb 2025 21:27:21 +0000 (22:27 +0100)] 
efivars: kill SystemdOptions efi var support

This has been depracted since v254 (2023). Let's kill it for
good now, it has been long enough with 2y. Noone has shown up who wants
to keep it. And given it doesn't work in SB world anyway, and is not
measured is quite problematic security wise.

8 months agodocs: Use mkosi -R instead of mkosi -t none (#36528)
Daan De Meyer [Wed, 26 Feb 2025 14:56:51 +0000 (15:56 +0100)] 
docs: Use mkosi -R instead of mkosi -t none (#36528)

mkosi now supports -R to rerun build scripts without rebuilding the
image so let's document that instead of the current hack to prevent
the rebuild by changing the output format.

8 months agoudev: make gcc static check shut up, regarding strncpy()
Lennart Poettering [Wed, 26 Feb 2025 14:43:15 +0000 (15:43 +0100)] 
udev: make gcc static check shut up, regarding strncpy()

8 months agoudev: modernize udev-builtin-btrfs a bit
Lennart Poettering [Tue, 25 Feb 2025 11:43:35 +0000 (12:43 +0100)] 
udev: modernize udev-builtin-btrfs a bit

Let's in particular log an even if a device name is too long for the
btrfs ioctl structure, instead of truncating it (which could
theoretically reference a different device).

8 months agonotify-recv: several followups, port pid1 over too (#36492)
Lennart Poettering [Wed, 26 Feb 2025 14:05:46 +0000 (15:05 +0100)] 
notify-recv: several followups, port pid1 over too (#36492)

8 months agodocs: Use mkosi -R instead of mkosi -t none 36528/head
Daan De Meyer [Wed, 26 Feb 2025 13:58:53 +0000 (14:58 +0100)] 
docs: Use mkosi -R instead of mkosi -t none

mkosi now supports -R to rerun build scripts without rebuilding the
image so let's document that instead of the current hack to prevent
the rebuild by changing the output format.

8 months agomkosi: Update to latest
Daan De Meyer [Wed, 26 Feb 2025 13:58:39 +0000 (14:58 +0100)] 
mkosi: Update to latest

8 months agoExpose chassis asset tag in hostnamed (#36487)
Mike Yuan [Wed, 26 Feb 2025 13:28:26 +0000 (14:28 +0100)] 
Expose chassis asset tag in hostnamed (#36487)

Closes #36442

8 months agoimport/pull-tar: fix flag set
Antonio Alvarez Feijoo [Wed, 26 Feb 2025 10:14:17 +0000 (11:14 +0100)] 
import/pull-tar: fix flag set

There is a typo passing flags to `install_file()`, if `IMPORT_READ_ONLY` is set,
`IMPORT_SYNC` is never checked.

8 months agocore/manager: port to notify_recv_with_fds() 36492/head
Mike Yuan [Wed, 19 Feb 2025 22:06:38 +0000 (23:06 +0100)] 
core/manager: port to notify_recv_with_fds()

8 months agoshared/async: introduce asynchronous_close_many() helper
Mike Yuan [Tue, 25 Feb 2025 23:26:57 +0000 (00:26 +0100)] 
shared/async: introduce asynchronous_close_many() helper

8 months agonotify-recv: several followups
Mike Yuan [Fri, 21 Feb 2025 14:16:46 +0000 (15:16 +0100)] 
notify-recv: several followups

Follow-up for 7f6af95dab037e7d15591a924dbf256460bbf069

- Allocate internal buf on the stack, memdup() only at the end.
  This ensures we're able to handle OOM gracefully, i.e.
  return -EAGAIN on OOM while still emptying socket buffer.
- Do not treat empty notify message as error.
- Raise log level since all callers log loudly anyway.

8 months agoudev_device_has_tag: fix typo
Markus Kurz [Wed, 26 Feb 2025 10:53:27 +0000 (10:53 +0000)] 
udev_device_has_tag: fix typo

8 months agoudev,sd-device: always use synthetic UUID when triggering uevent (#36514)
Lennart Poettering [Wed, 26 Feb 2025 10:59:42 +0000 (11:59 +0100)] 
udev,sd-device: always use synthetic UUID when triggering uevent (#36514)

This drops support of kernels older than 4.13.

8 months agohostnamed: prefer using SD_JSON_BUILD_PAIR_STRING 36487/head
Jelle van der Waa [Sun, 23 Feb 2025 15:59:30 +0000 (16:59 +0100)] 
hostnamed: prefer using SD_JSON_BUILD_PAIR_STRING

8 months agohostnamed: expose ChassisAssetTag in dbus/varlink
Jelle van der Waa [Wed, 12 Feb 2025 20:13:04 +0000 (21:13 +0100)] 
hostnamed: expose ChassisAssetTag in dbus/varlink

Expose /sys/class/dmi/id/chassis_asset_tag in varlink/dbus commonly used
by companies to track inventory such as laptops.

On desktops and other products the `chassis_asset_tag` can contain
rubbish similar to product_name/product_vendor.

Closes: #36442
8 months agotpm2-setup: two fixes for tmpfile handling (#36521)
Lennart Poettering [Wed, 26 Feb 2025 10:19:43 +0000 (11:19 +0100)] 
tpm2-setup: two fixes for tmpfile handling (#36521)

8 months agotest: assert that product_serial is preferred over board_serial
Jelle van der Waa [Wed, 12 Feb 2025 20:39:59 +0000 (21:39 +0100)] 
test: assert that product_serial is preferred over board_serial

8 months agosd-device: always pass random UUID on triggering uevent 36514/head
Yu Watanabe [Tue, 25 Feb 2025 18:33:16 +0000 (03:33 +0900)] 
sd-device: always pass random UUID on triggering uevent

Then, this makes sd_device_trigger() a simple wrapper of
sd_device_trigger_with_uuid().

8 months agoudevadm-trigger: drop support of kernels order than 4.13
Yu Watanabe [Tue, 25 Feb 2025 18:13:09 +0000 (03:13 +0900)] 
udevadm-trigger: drop support of kernels order than 4.13

Now our kernel baseline is 5.4, hence we can always write action string
with a synthetic UUID.

8 months agoudev-builtin-uaccess: modernize code
Yu Watanabe [Wed, 19 Feb 2025 17:09:11 +0000 (02:09 +0900)] 
udev-builtin-uaccess: modernize code

No functional change, just refactoring.

8 months agoudev-util: drop unnecessary inclusion of missing_threads.h
Yu Watanabe [Tue, 25 Feb 2025 17:56:47 +0000 (02:56 +0900)] 
udev-util: drop unnecessary inclusion of missing_threads.h

Follow-up for a3df693799499a26735acc1f0c4f1b5d1f182fa7.

8 months agodoc: add document explaining the 3 key components of the boot and how we find the...
Lennart Poettering [Fri, 21 Feb 2025 12:40:35 +0000 (13:40 +0100)] 
doc: add document explaining the 3 key components of the boot and how we find the rootfs

After the network boot PR got merged we can use some more high-level
docs I guess.

8 months agotpm2-setup: remove redundant fflush_and_check() 36521/head
Lennart Poettering [Wed, 26 Feb 2025 08:12:39 +0000 (09:12 +0100)] 
tpm2-setup: remove redundant fflush_and_check()

The immediately following flink_tmpfile() does that anyway, hence no
need to do so explicitly beforehand.

(Also the log message was wrong: it says "sync" but here we "flush",
which is a much weaker operation)

8 months agotpm2-setup: add missing O_CLOEXEC at two places
Lennart Poettering [Wed, 26 Feb 2025 08:10:16 +0000 (09:10 +0100)] 
tpm2-setup: add missing O_CLOEXEC at two places

8 months agocopy: Invoke hardlink context cleanup before restoring timestamps
Andreas Stührk [Tue, 25 Feb 2025 23:05:41 +0000 (00:05 +0100)] 
copy: Invoke hardlink context cleanup before restoring timestamps

When hardlink recreation is requested, it creates temporary files that
will be deleted once the context is destroyed. The deletion
(potentially) updates the directory's timestamps, so it's crucial that
the deletion happens before the directory timestamps are restored when
`COPY_RESTORE_DIRECTORY_TIMESTAMPS` is requested.

8 months agotimesync: several trivial cleanups (#36506)
Lennart Poettering [Wed, 26 Feb 2025 08:02:50 +0000 (09:02 +0100)] 
timesync: several trivial cleanups (#36506)

8 months agosd-bus: sort enumerated child objects (#36507)
Lennart Poettering [Wed, 26 Feb 2025 08:02:36 +0000 (09:02 +0100)] 
sd-bus: sort enumerated child objects (#36507)

Fixes #8008.

8 months agomake integritysetup/veritysetup more alike cryptsetup when it comes to remote operati...
Lennart Poettering [Tue, 25 Feb 2025 22:20:56 +0000 (23:20 +0100)] 
make integritysetup/veritysetup more alike cryptsetup when it comes to remote operation (#36501)

Let's address some asymmetries here.

8 months agosystemd-boot: some refactorings (#36510)
Lennart Poettering [Tue, 25 Feb 2025 22:20:34 +0000 (23:20 +0100)] 
systemd-boot: some refactorings (#36510)

Clean up systemd-boot a bit. Mostly makes handling of some menu entry
types less magic and more uniform. Doesn't really change behaviour in
any ways, except that we now condition things such as boot counting,
random seed management and entry selection saving carefully on the entry
type.

8 months agopackit: Switch to meson.version for the current version (#36509)
Luca Boccassi [Tue, 25 Feb 2025 21:07:56 +0000 (21:07 +0000)] 
packit: Switch to meson.version for the current version (#36509)

8 months agointegritysetup: add remote-integritysetup.target to match remote-{crypt|verity}setup... 36501/head
Lennart Poettering [Mon, 24 Feb 2025 10:32:00 +0000 (11:32 +0100)] 
integritysetup: add remote-integritysetup.target to match remote-{crypt|verity}setup.target

Let's make the three subsystems more alike, and add remote-*setup.traget
for all three, enable them all three in the presets, and make them
behave in a similar fashion.

8 months agopreset: enable remote verity targets too
Lennart Poettering [Mon, 24 Feb 2025 09:51:37 +0000 (10:51 +0100)] 
preset: enable remote verity targets too

Let's make cryptsetup and veritysetup more symmetric, and enable the
remote target for the latter the same way we enable the remote target
for the former by default.

8 months agoboot: split out call that adds reboot/poweroff/firmware entries 36510/head
Lennart Poettering [Tue, 25 Feb 2025 11:43:11 +0000 (12:43 +0100)] 
boot: split out call that adds reboot/poweroff/firmware entries

8 months agoboot: make secure boot enrollment less special
Lennart Poettering [Tue, 25 Feb 2025 11:40:43 +0000 (12:40 +0100)] 
boot: make secure boot enrollment less special

This is the last entry type that has special handling: with this in
place we now always invoke entry handlers the very same way. via the
.call() method of the BootEntry structure.

8 months agoboot: move check if secure boot enrollment applies to a single place
Lennart Poettering [Tue, 25 Feb 2025 11:36:17 +0000 (12:36 +0100)] 
boot: move check if secure boot enrollment applies to a single place

Let's check if sb enrollment applies at a single place: inside the
discovery function, and let's not bother with additional checks later.

8 months agoboot: make regular entries less special
Lennart Poettering [Tue, 25 Feb 2025 11:35:25 +0000 (12:35 +0100)] 
boot: make regular entries less special

Let's try to always invoke entries via the call() method of BootEntry
objects, to stick to a single uniform way to do so.

8 months agoboot: only save entry for some entry types
Lennart Poettering [Tue, 25 Feb 2025 11:34:49 +0000 (12:34 +0100)] 
boot: only save entry for some entry types

Much like the previous one, let's also condition the entry selection
saving on entry types.

8 months agoboot: only do random seed management for some entry types
Lennart Poettering [Tue, 25 Feb 2025 11:19:48 +0000 (12:19 +0100)] 
boot: only do random seed management for some entry types

Similar to the previous commits, let's carefully condition random seed
management (which might be slow, and simply pointless for various entry
types) on the entry type.

8 months agoboot: only do boot counting management for some menu entries
Lennart Poettering [Tue, 25 Feb 2025 11:16:10 +0000 (12:16 +0100)] 
boot: only do boot counting management for some menu entries

Let's do boot counting only for some menu entry types, and carefully
list which types those are.

8 months agoboot: make .call() method of BootEntry more complete
Lennart Poettering [Tue, 25 Feb 2025 11:12:56 +0000 (12:12 +0100)] 
boot: make .call() method of BootEntry more complete

Let's pass some context information to the .call() methods so that it's
sufficient to implement the handlers for all entry types with them.

(This commit doesn't port the various entry types over though, that
happens in later commits.)

8 months agoboot: split out line editor
Lennart Poettering [Tue, 25 Feb 2025 10:55:19 +0000 (11:55 +0100)] 
boot: split out line editor

let's make this beast of boot.c a bit more digestable

8 months agopackit: Switch to meson.version for the current version 36509/head
Daan De Meyer [Tue, 25 Feb 2025 11:01:53 +0000 (12:01 +0100)] 
packit: Switch to meson.version for the current version

8 months agomkosi: update fedora commit reference
Daan De Meyer [Tue, 25 Feb 2025 18:30:42 +0000 (19:30 +0100)] 
mkosi: update fedora commit reference

9b6884d2e1 Stop using version_no_tilde for github archives
5671cf6132 List the fallback Source0 first

8 months agomeson: add more space for sections
Lennart Poettering [Tue, 25 Feb 2025 10:54:41 +0000 (11:54 +0100)] 
meson: add more space for sections

I ran into the limit with ParticleOS, with 6 profiles, hence I think the
current default value is a bit low. let's bump it 4x, to 120. This is
still a lot lower than 500 or so which Debian uses downstream.

We can look into raising this further should we collide with this again,
but for now, let's try 120 and see how it goes in practice.

8 months agotest-bus-object: check if enumerated objects are sorted 36507/head
Yu Watanabe [Tue, 25 Feb 2025 14:40:45 +0000 (23:40 +0900)] 
test-bus-object: check if enumerated objects are sorted

8 months agosd-bus: sort enumerated child objects
Yu Watanabe [Tue, 25 Feb 2025 05:57:39 +0000 (14:57 +0900)] 
sd-bus: sort enumerated child objects

Fixes #8008.

8 months agoupdate TODO
Lennart Poettering [Tue, 25 Feb 2025 10:54:23 +0000 (11:54 +0100)] 
update TODO

8 months agomkosi: Enable History= option (#36500)
Daan De Meyer [Tue, 25 Feb 2025 11:44:41 +0000 (12:44 +0100)] 
mkosi: Enable History= option (#36500)

This option makes mkosi "remember" all the CLI options specified on the
command line when building an image. This means they don't need to be
specified again when booting the image afterwards or doing any other
operation on the image with "mkosi xxx".

As an example of how this is useful, currently, when running "mkosi -d
opensuse -f" to build an opensuse image and then running "mkosi sandbox
-- meson test -C build TEST-86-MULTI-UKI-PROFILE", running the test will
try to add virtiofs mounts of the fedora~rawhide build directory on my
machine instead of the opensuse one. With the History= option enabled,
it will use the opensuse tumbleweed directory as expected.

8 months agomkosi: Enable History= option 36500/head
Daan De Meyer [Mon, 24 Feb 2025 09:56:26 +0000 (10:56 +0100)] 
mkosi: Enable History= option

This option makes mkosi "remember" all the CLI options specified on
the command line when building an image. This means they don't need
to be specified again when booting the image afterwards or doing any
other operation on the image with "mkosi xxx".

As an example of how this is useful, currently, when running "mkosi
-d opensuse -f" to build an opensuse image and then running "mkosi
sandbox -- meson test -C build TEST-86-MULTI-UKI-PROFILE", running
the test will try to add virtiofs mounts of the fedora~rawhide build
directory on my machine instead of the opensuse one. With the History=
option enabled, it will use the opensuse tumbleweed directory as expected.

We stop setting --extra-search-path and --output-dir in the integration test
wrapper as these are settings that are "remembered" by enabling the History=
option.

8 months agotest: Do not add integration tests if want_tests == 'false'
Daan De Meyer [Tue, 25 Feb 2025 09:59:20 +0000 (10:59 +0100)] 
test: Do not add integration tests if want_tests == 'false'

8 months agobootctl-install: Use i2d_PKCS7() instead of i2d_PKCS7_SIGNED()
Daan De Meyer [Tue, 25 Feb 2025 07:32:33 +0000 (08:32 +0100)] 
bootctl-install: Use i2d_PKCS7() instead of i2d_PKCS7_SIGNED()

For a detached signature, these are equivalent so let's use i2d_PKCS7()
like we do everywhere else.

8 months agoTEST-64-UDEV-STORAGE: Stop using mkosi configure scripts
Daan De Meyer [Mon, 24 Feb 2025 16:14:01 +0000 (17:14 +0100)] 
TEST-64-UDEV-STORAGE: Stop using mkosi configure scripts

Now that we have mkosi sandbox, meson runs with the mkosi tools tree
mounted (if one is used at all), so we can implement all the qemu feature
checks in meson itself, removing the need for mkosi configure scripts.

8 months agoTEST-53-ISSUE-16347: Implement rtc via custom argument
Daan De Meyer [Mon, 24 Feb 2025 16:12:22 +0000 (17:12 +0100)] 
TEST-53-ISSUE-16347: Implement rtc via custom argument

Let's get rid of the configure script for this use case by just
implementing the necessary logic in integration-test-wrapper.py.
We need to get rid of our usage of configure scripts to allow enabling
the History= setting.

8 months agomkosi: Update to latest
Daan De Meyer [Mon, 24 Feb 2025 21:24:52 +0000 (22:24 +0100)] 
mkosi: Update to latest

8 months agotimesync: add short comment for boolean argument 36506/head
Yu Watanabe [Tue, 25 Feb 2025 04:45:07 +0000 (13:45 +0900)] 
timesync: add short comment for boolean argument

8 months agotimesync: drop meaningless boolean flag
Yu Watanabe [Tue, 25 Feb 2025 04:39:43 +0000 (13:39 +0900)] 
timesync: drop meaningless boolean flag

The boolean flag is always true, as manager_save_time_and_rearm() is
called unconditionally.

Follow-up for 33e82f3ef33a2497f9838a5fbb924c7501d8dd9e.

8 months agotimesync: use event_reset_time_relative()
Yu Watanabe [Tue, 25 Feb 2025 04:00:56 +0000 (13:00 +0900)] 
timesync: use event_reset_time_relative()

No functional change, just refactoring.

8 months agofuzz: decompress_startswith() may return zero (#36490)
Yu Watanabe [Tue, 25 Feb 2025 02:05:06 +0000 (11:05 +0900)] 
fuzz: decompress_startswith() may return zero (#36490)

Also, disables fuzz-compress on oss-fuzz.
Fixes #36472.

8 months agorepart: when using erofs and log level is not debug, use --quiet
Luca Boccassi [Sun, 23 Feb 2025 19:05:24 +0000 (19:05 +0000)] 
repart: when using erofs and log level is not debug, use --quiet

mkfs.erofs is extremely verbose and will log every single file added
to the filesystem, which is a lot of them when building a rootfs.

8 months agosystemd-keyutil: add verb to conver PKCS#1 to PKCS#7
Dan Streetman [Fri, 21 Feb 2025 09:36:53 +0000 (09:36 +0000)] 
systemd-keyutil: add verb to conver PKCS#1 to PKCS#7

Add verb that takes a PKCS#1 signature (plain rsa) as input and a
certificates, and outputs a PKCS#7 binary detached signature (p7s),
which is what the kernel dm-verity driver expects.

Co-authored-by: Luca Boccassi <bluca@debian.org>
8 months agofstab-util: port use of setmntent() and friends to libmount (#36489)
Daan De Meyer [Sun, 23 Feb 2025 11:21:19 +0000 (12:21 +0100)] 
fstab-util: port use of setmntent() and friends to libmount (#36489)

8 months agosd-event: pidfdize sd_event_source_send_child_signal()
Mike Yuan [Sat, 22 Feb 2025 23:29:44 +0000 (00:29 +0100)] 
sd-event: pidfdize sd_event_source_send_child_signal()

Follow-up for c6cc7efcd35f729cf0db8f8502752c7d83a0be95

The documentation has been updated, but apparently I forgot
to update the function itself...

Also, actually pass flags to pidfd_send_signal(). Previously
it was spuriously ignored.

8 months agofuzz: tentatively disable fuzz-compress on oss-fuzz 36490/head
Yu Watanabe [Sat, 22 Feb 2025 20:34:55 +0000 (05:34 +0900)] 
fuzz: tentatively disable fuzz-compress on oss-fuzz

It does not work on oss-fuzz for some reasons. See #11018.

8 months agofuzz: decompress_startswith() may return zero
Yu Watanabe [Sat, 22 Feb 2025 19:59:46 +0000 (04:59 +0900)] 
fuzz: decompress_startswith() may return zero

Fixes #36472.

8 months agosd-event: always operate on child source via pidfd (#36480)
Yu Watanabe [Sat, 22 Feb 2025 19:41:28 +0000 (04:41 +0900)] 
sd-event: always operate on child source via pidfd (#36480)

8 months agofstab-util: port use of setmntent() and friends to libmount 36489/head
Mike Yuan [Wed, 5 Feb 2025 13:19:27 +0000 (14:19 +0100)] 
fstab-util: port use of setmntent() and friends to libmount

8 months agolibmount-util: introduce libmount_parse_fstab() wrapper
Mike Yuan [Mon, 3 Feb 2025 15:46:51 +0000 (16:46 +0100)] 
libmount-util: introduce libmount_parse_fstab() wrapper

8 months agofstab-util: join 'filtered' only if requested by caller
Mike Yuan [Sat, 15 Feb 2025 17:26:04 +0000 (18:26 +0100)] 
fstab-util: join 'filtered' only if requested by caller

8 months agosbsign: Don't set bit in SpcPeImageData->flags
Daan De Meyer [Fri, 21 Feb 2025 21:41:26 +0000 (22:41 +0100)] 
sbsign: Don't set bit in SpcPeImageData->flags

Neither sbsign nor pesign set this flag in SpcPeImageData->flags,
which is about which resources should be included specifying "Which
portions of the Windows PE file are hashed." according to the
authenticode spec. However, this is followed by "Although flags is
always present, it is ignored when calculating the file hash for both
signing and verification purposes". So as it doesn't seem to do
anything useful and the other tools don't set any of these flags
either, let's follow suite and not set this flag ourselves either.

8 months agohwdb: add axis range corrections for the Lenovo Yoga Slim 7 14ARE05
KidGrimes [Fri, 21 Feb 2025 21:27:53 +0000 (18:27 -0300)] 
hwdb: add axis range corrections for the Lenovo Yoga Slim 7 14ARE05

8 months agomkosi: add libapparmor1 to package list for opensuse
Luca Boccassi [Fri, 21 Feb 2025 21:32:27 +0000 (21:32 +0000)] 
mkosi: add libapparmor1 to package list for opensuse

TEST-02-UNITTESTS.sh[4381]: [ 2329.636166] test-dlopen-so[650]: libapparmor.so.1 is not installed: libapparmor.so.1: cannot open shared object file: No such file or directory
TEST-02-UNITTESTS.sh[4381]: [ 2329.636174] test-dlopen-so[650]: Assertion 'dlopen_libapparmor() >= 0' failed at src/test/test-dlopen-so.c:103, function run(). Aborting.

Follow-up for 384949f7dee164c2c3cfd78f94a5f27b61fb7c28

8 months agoCoding style followups (#36476)
Luca Boccassi [Fri, 21 Feb 2025 21:58:54 +0000 (21:58 +0000)] 
Coding style followups (#36476)

8 months agoprocess-util: refuse FORK_WAIT + FORK_FREEZE combination
Mike Yuan [Thu, 20 Feb 2025 19:51:05 +0000 (20:51 +0100)] 
process-util: refuse FORK_WAIT + FORK_FREEZE combination

8 months agosd-event: always operate on child source via pidfd 36480/head
Mike Yuan [Tue, 18 Feb 2025 15:49:05 +0000 (16:49 +0100)] 
sd-event: always operate on child source via pidfd

Follow-up for 6e14c46bac760d01868b0bf48461f6ac44c86be3

Nowadays a pidfd is guarenteed to be around for child
event sources, hence drop the effectively unused pid-based
branches.

Addresses https://github.com/systemd/systemd/pull/36410#discussion_r1959930716

8 months agosd-event: assert on hashmap_remove(child.pid)
Mike Yuan [Fri, 21 Feb 2025 15:45:34 +0000 (16:45 +0100)] 
sd-event: assert on hashmap_remove(child.pid)

Follow-up for 54988a27b9d1487e1690f94b79031ef61edd6651
and a342c71d360e083b3f6b06a64d852c4e3aceeef3

8 months agoprocess-util: introduce SIGINFO_CODE_IS_DEAD helper
Mike Yuan [Tue, 18 Feb 2025 16:06:19 +0000 (17:06 +0100)] 
process-util: introduce SIGINFO_CODE_IS_DEAD helper

8 months agodocs/CONTROL_GROUP_INTERFACE: fix typo
Lin Jian [Fri, 21 Feb 2025 13:07:27 +0000 (21:07 +0800)] 
docs/CONTROL_GROUP_INTERFACE: fix typo

8 months agoudev-builtin-blkid: merge var definitions, fix grammar 36476/head
Mike Yuan [Fri, 21 Feb 2025 13:17:57 +0000 (14:17 +0100)] 
udev-builtin-blkid: merge var definitions, fix grammar

Follow-up for f8825c1364fb1c3f3f5d96654e779fd51500f476

8 months agobasic/utf8: add missing assertion
Mike Yuan [Tue, 18 Feb 2025 13:33:01 +0000 (14:33 +0100)] 
basic/utf8: add missing assertion

Follow-up for 104a6b8c390730f66f5acbcaefbc27898bfef9fe

8 months agobasic/strv: minor coding style follow-ups
Mike Yuan [Tue, 18 Feb 2025 13:32:30 +0000 (14:32 +0100)] 
basic/strv: minor coding style follow-ups

Follow-up for 428146dc89506725f777ae82d288439340926a83

Addresses https://github.com/systemd/systemd/pull/36271#discussion_r1958334800

8 months agocore: dlopen()'ify libapparmor
Mike Yuan [Sun, 7 Jul 2024 17:35:40 +0000 (19:35 +0200)] 
core: dlopen()'ify libapparmor

In Arch Linux we currently have a half-baked apparmor support,
in particular we cannot link systemd to libapparmor for service
context integration, since that will pull apparmor into base system.
Hence, let's turn this into a dlopen dep.

Ref: https://gitlab.archlinux.org/archlinux/packaging/packages/systemd/-/issues/22

8 months agoSupport booting from rootfs acquired via HTTP (#36314)
Lennart Poettering [Fri, 21 Feb 2025 10:26:14 +0000 (11:26 +0100)] 
Support booting from rootfs acquired via HTTP (#36314)

This extends systemd-import-generator to not only download a disk image
at boot, but also attach it to a loopback device, so that we can boot
from it.

We have most of the pieces already in place, this just polishes some
things, to make this round.

The topmost commit contains example command lines that just work to make
`systemd-vmspawn` boot from a `mkosi serve` call.

Note that this does not address how to get the UKI running on the target
system, this only deals with the later boot phase once the UKI is
already running.

This is WIP, because it lacks docs, and I want to do some more
polishing. But it works great.

Ultimate goal, provide a complete solution so that we also can do uefi
http boot for ukis

8 months agoupdate TODO 36314/head
Lennart Poettering [Mon, 10 Feb 2025 12:18:25 +0000 (13:18 +0100)] 
update TODO

8 months agoboot: when we detect that sd-boot is called as NBP, print friendly message
Lennart Poettering [Wed, 12 Feb 2025 21:42:10 +0000 (22:42 +0100)] 
boot: when we detect that sd-boot is called as NBP, print friendly message

Fixes: #11850
8 months agosd-boot: also read type #1 entries from SMBIOS Type #11
Lennart Poettering [Wed, 12 Feb 2025 08:31:29 +0000 (09:31 +0100)] 
sd-boot: also read type #1 entries from SMBIOS Type #11

With this we can now do:

systemd-vmspawn -n -i foobar.raw -s io.systemd.boot.entries-extra:particleos-current.conf=$'title ParticleOS Current\nuki-url http://example.com/somedir/uki.efi'

Assuming sd-boot is available inside the ESP of foobar.raw a new item
will show up in the boot menu that allows booting directly into the
specified UKI.

8 months agovmspawn: simplify cmdline_add_vsock() a tiny bit
Lennart Poettering [Wed, 12 Feb 2025 08:32:49 +0000 (09:32 +0100)] 
vmspawn: simplify cmdline_add_vsock() a tiny bit

8 months agovmspawn: add --smbios11= switch for passing arbitrary smbios type #11 strings to vm
Lennart Poettering [Wed, 12 Feb 2025 08:32:18 +0000 (09:32 +0100)] 
vmspawn: add --smbios11= switch for passing arbitrary smbios type #11 strings to vm

8 months agovmspawn: split out code that appends kernel command line into its own helper
Lennart Poettering [Wed, 12 Feb 2025 08:27:17 +0000 (09:27 +0100)] 
vmspawn: split out code that appends kernel command line into its own helper

8 months agoboot: add new 'uki-url' bls type #1 menu items for booting remote UKIs
Lennart Poettering [Tue, 11 Feb 2025 08:34:20 +0000 (09:34 +0100)] 
boot: add new 'uki-url' bls type #1 menu items for booting remote UKIs

Companion BLS spec PR:

https://github.com/uapi-group/specifications/pull/135

8 months agoboot: add new bls type #1 stanza "uki"
Lennart Poettering [Tue, 11 Feb 2025 08:18:14 +0000 (09:18 +0100)] 
boot: add new bls type #1 stanza "uki"

This one is between "efi" and "linux": we'll recognize such entries as
linux, but we'll just invoke them as EFI binaries.

This creates a high-level concept for invoking UKIs via indirection of a
bls type #1 entry, for example to permit invocation from a non-standard
path or for giving entries a different name.

Companion BLS spec PR:

https://github.com/uapi-group/specifications/pull/135

(Let's rename LOADER_UNIFIED_LINUX to LOADER_TYPE2_UKI at the same time
to reduce confusion what is what)

8 months agoboot: move behaviour checks into per-entry-type helpers
Lennart Poettering [Tue, 11 Feb 2025 06:35:02 +0000 (07:35 +0100)] 
boot: move behaviour checks into per-entry-type helpers