]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agohomed: port worker management to PidRef 36557/head
Lennart Poettering [Fri, 28 Feb 2025 08:58:36 +0000 (09:58 +0100)] 
homed: port worker management to PidRef

9 months agopidref: take more fields into account in pidref_compare_func()
Lennart Poettering [Fri, 28 Feb 2025 08:56:02 +0000 (09:56 +0100)] 
pidref: take more fields into account in pidref_compare_func()

9 months agopidref: export hash funcs
Lennart Poettering [Fri, 28 Feb 2025 08:50:29 +0000 (09:50 +0100)] 
pidref: export hash funcs

That way we can use them for definition of additional hash_ops that map
pidrefs to arbitrary other resources.

9 months agohomed: port to notify_recv_with_fds()
Lennart Poettering [Fri, 28 Feb 2025 08:24:52 +0000 (09:24 +0100)] 
homed: port to notify_recv_with_fds()

Found another implementation of the sd_notify() reception. Modernize it.

9 months agonotify-recv: add notify_recv() flavour that returns a split up strv instead of he...
Lennart Poettering [Fri, 28 Feb 2025 08:35:24 +0000 (09:35 +0100)] 
notify-recv: add notify_recv() flavour that returns a split up strv instead of he message text as string

This is useful at various places, since we split up the message as first
thing there anyway.

9 months agoprofile: return earlier if it is loaded from non-bash shell
Yu Watanabe [Fri, 28 Feb 2025 07:26:53 +0000 (16:26 +0900)] 
profile: return earlier if it is loaded from non-bash shell

Follow-up for dadbb34919abd3fefeb5b8ccc9794da9398a2503.

9 months agopo: Translated using Weblate (Lithuanian)
Justinas Kairys [Fri, 28 Feb 2025 08:38:40 +0000 (09:38 +0100)] 
po: Translated using Weblate (Lithuanian)

Currently translated at 70.0% (180 of 257 strings)

Co-authored-by: Justinas Kairys <j.kairys@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/lt/
Translation: systemd/main

9 months agotest-network: extend test case for static routes
Yu Watanabe [Thu, 27 Feb 2025 18:24:39 +0000 (03:24 +0900)] 
test-network: extend test case for static routes

- split out verifications into two functions,
- also check the following scenarios:
  * unmanaging an existing interface,
  * re-managing an unmanaged interface,
  * adding a new unmanaged interface,
  * removing an unmanaged interface.

9 months agomkosi: update debian commit reference
Luca Boccassi [Fri, 28 Feb 2025 01:28:34 +0000 (01:28 +0000)] 
mkosi: update debian commit reference

4dab786933 Install new files
a57877706d Install new files
a6a26c4294 Install new files for upstream profile
2cc2784bbe Install new files for upstream
191edb6aa3 d/t/tests-in-lxd: skip test on any setup error
47c0a694b0 systemd-sysv: add Protected: yes
62ed7598fa README: add note about out-of-tree patches being forbidden
dfd1b0409f systemd-resolved: recommend libidn2-0
88291172bc d/rules: ignore more blhc false positives

9 months agoosc-context: fix typo
Yu Watanabe [Fri, 28 Feb 2025 06:51:02 +0000 (15:51 +0900)] 
osc-context: fix typo

Follow-up for 91aa93ec8d213340b7dea8dcd2e3fe5f90265517.

9 months agomachine-id-setup: bhyve also provides a uuid
Dan McGregor [Thu, 27 Feb 2025 22:18:23 +0000 (16:18 -0600)] 
machine-id-setup: bhyve also provides a uuid

When using UEFI with bhyve it behaves similarly to qemu, and provides
a product_uuid. Use it if found, just like with qemu.

9 months agoIssue OSC ANSI sequence whenever we change "context" of a TTY, i.e. acquire privs...
Lennart Poettering [Thu, 27 Feb 2025 21:12:54 +0000 (22:12 +0100)] 
Issue OSC ANSI sequence whenever we change "context" of a TTY, i.e. acquire privs, enter container or VM or similar (#35224)

This is mostly a strawman to get a discussion going regarding how to
communicate to terminal emulators such as ptyxis about run0 (and nspawn,
and vmspawn, and moe) and what it does.

It's hierarchical and I think still relatively simple.

/cc @chergert

9 months agoparse-util: extend the maximum length of nftable identifiers
Yu Watanabe [Thu, 27 Feb 2025 17:28:41 +0000 (02:28 +0900)] 
parse-util: extend the maximum length of nftable identifiers

Since kernel v4.14, more specifically, after the following four commits,
https://github.com/torvalds/linux/commit/e46abbcc05aa8a16b0e7f5c94e86d11af9aa2770
https://github.com/torvalds/linux/commit/b7263e071aba736cea9e71cdf2e76dfa7aebd039
https://github.com/torvalds/linux/commit/387454901bd62022ac1b04e15bd8d4fcc60bbed4
https://github.com/torvalds/linux/commit/615095752100748e221028fc96163c2b78185ae4
the maximum length of nftable identifiers are extended to 255.

Now, our kernel baseline is 5.4, hence we can freely use the extended
name length.

This also modernizes code a bit, and adds test cases.

Closes #36542.

9 months agosbsign: trivial coding style cleanups
Yu Watanabe [Thu, 27 Feb 2025 17:12:26 +0000 (02:12 +0900)] 
sbsign: trivial coding style cleanups

Follow-ups for 8c0098d4861d8a9a617330e30c9ffad099fb641e.

9 months agolibfido2-util: accept cached pin in fido2_generate_hmac_hash()
Martin Wilck [Mon, 17 Feb 2025 17:40:35 +0000 (18:40 +0100)] 
libfido2-util: accept cached pin in fido2_generate_hmac_hash()

fido2_generate_hmac_hash() sets req->keyring to "fido2-pin" when
calling ask_password_auto(), suggesting that a key by this name
can be read from the kernel keyring. But the keyring is never
opened because the ASK_PASSWORD_ACCEPT_CACHED flag is not set.

Set ASK_PASSWORD_ACCEPT_CACHED to allow automated / scripted
setup of encrypted volumes with FIDO2. If the PIN turns out to
be invalid, clear ASK_PASSWORD_ACCEPT_CACHED to avoid retrying
and possible lockout.

9 months agosbsign: Add support for offline signing (#36485)
Lennart Poettering [Thu, 27 Feb 2025 16:34:05 +0000 (17:34 +0100)] 
sbsign: Add support for offline signing (#36485)

Add new options --prepare-offline-signing, --signed-data= and
--signed-data-signature= which allow for offline signing in a
similar manner to pesign.

9 months agounits: measure additional phases into PCR 11 when entering storage target mode or...
Lennart Poettering [Thu, 27 Feb 2025 14:29:48 +0000 (15:29 +0100)] 
units: measure additional phases into PCR 11 when entering storage target mode or factory reset (#36543)

Let's "spoil" access to TPM secrets when we boot into these two modes.
This matters in particular for storagetm: if the host gets exploited
while booted into storage target mode any secrets kept by the TPM might
remain accessible otherwise. By measuring a new "phase" word into PCR 11
we "blow the fuse" however on this boot.

9 months agocore: also issue OSC 3008 from service context 35224/head
Lennart Poettering [Fri, 31 Jan 2025 16:40:46 +0000 (17:40 +0100)] 
core: also issue OSC 3008 from service context

(Note: we also change TEST-13-NSPAWN.machined.sh minimally here, because
it checks for byte precise output of a pty allocated for a service
invocation - which it's not going to get if it claims that the pty is an
all-powerful one. After all this PR ensures that we'll generate the new
OSC sequence on non-dumb terminals associated with services. Hence, set
TERM=dumb explicitly to ensure no ANSI sequences are generated, ever.
Which is a nice test btw that TERM=dumb really does its thing here.)

9 months agoterminal-util: change conditioning in terminal_reset_defensive()
Lennart Poettering [Fri, 31 Jan 2025 14:32:01 +0000 (15:32 +0100)] 
terminal-util: change conditioning in terminal_reset_defensive()

So far we conditioned the logic that issues ansi sequences for resetting
the TTY based on whether something is a pty is not (under the assumption
we need no reset on ptys, since they are shortlived).

This is simply wrong though. The pty that a container getty is invoked
on is generally long-lived: as long as the container is up, and it will
be reused between getty instances/sessions all the time. In such a case
we really should reset properly.

Let's instead make the logic dependent on whether TERM is set to
anything other than "dumb". The previous commit made sure we always set
TERM in a sensible way in systemd-run, hence this
*explicit* logic sounds like a much better choice now, as it mea

9 months agoterminal-util: change 2nd parameter of terminal_reset_defensive() to flags
Lennart Poettering [Fri, 31 Jan 2025 14:30:07 +0000 (15:30 +0100)] 
terminal-util: change 2nd parameter of terminal_reset_defensive() to flags

let's convert the 2nd argumeng form a boolean to a proper flags
parameter. Doesn't change behaviour in anyway, but is more readable, and
prepares ground for adding more flags soon.

9 months agonspawn: set TERM to "dumb" if we are invoked outside of TTY context
Lennart Poettering [Fri, 31 Jan 2025 19:23:39 +0000 (20:23 +0100)] 
nspawn: set TERM to "dumb" if we are invoked outside of TTY context

9 months agorun: tweak logic how we set $TERM for activated services
Lennart Poettering [Fri, 31 Jan 2025 14:06:34 +0000 (15:06 +0100)] 
run: tweak logic how we set $TERM for activated services

There are two cases when we invoke a service on a TTY:

1. We ourselves are connected to a TTY and would intend to enable PTY
   forwarding.
2. We are allocating a TTY but are not ourselves connected to a TTY and
   just want to input/output to pipe or other non-TTY fd.

Let's propagate $TERM only as-is in the first case. In the 2nd case,
let's explicitly set $TERM to "dumb", so that invoked progams do not
issue needless ansi sequences, since we are not propagating them to a
terminal either.

This should be a much safer result, for cases where people include
invocations of systemd-nspawn with full TTY allocation in a shell
pipeline or so.

(of course, the user can always explicitly override this)

9 months agoprofile: generate shell + command OSC events
Lennart Poettering [Thu, 30 Jan 2025 14:09:21 +0000 (15:09 +0100)] 
profile: generate shell + command OSC events

9 months agopam_systemd: issue context OSC sequences when allocating new TTY session
Lennart Poettering [Thu, 30 Jan 2025 12:45:55 +0000 (13:45 +0100)] 
pam_systemd: issue context OSC sequences when allocating new TTY session

note: this also adds making a copy of the session type string after
registering the session. That's because we need to check the session
type we settled on later to condition out the OSC sequence (because it
should only be issued on TTY sessions). However, the session type string
originally quite likely points into the PAM environment block, which we
update in the meantime, invalidating that pointer. hence, make an
explicit copy first, and use that.

9 months agorun: generate OSC context sequence in run0/system-run
Lennart Poettering [Mon, 18 Nov 2024 11:46:50 +0000 (12:46 +0100)] 
run: generate OSC context sequence in run0/system-run

9 months agomachinectl: add OSC context support to login/shell commands
Lennart Poettering [Mon, 18 Nov 2024 11:46:08 +0000 (12:46 +0100)] 
machinectl: add OSC context support to login/shell commands

9 months agovmspawn: generate vm context OSC
Lennart Poettering [Mon, 18 Nov 2024 11:35:00 +0000 (12:35 +0100)] 
vmspawn: generate vm context OSC

9 months agonspawn: output context OSC
Lennart Poettering [Mon, 18 Nov 2024 11:33:13 +0000 (12:33 +0100)] 
nspawn: output context OSC

9 months agopid1: issue boot context issue at boot
Lennart Poettering [Mon, 18 Nov 2024 10:46:42 +0000 (11:46 +0100)] 
pid1: issue boot context issue at boot

9 months agoosc-util: add helpers for writing OSC context events
Lennart Poettering [Mon, 18 Nov 2024 10:45:59 +0000 (11:45 +0100)] 
osc-util: add helpers for writing OSC context events

9 months agodoc: add OSC 3008 spec
Lennart Poettering [Mon, 18 Nov 2024 23:05:42 +0000 (00:05 +0100)] 
doc: add OSC 3008 spec

9 months agoUpdate TODO 36485/head
Daan De Meyer [Thu, 27 Feb 2025 09:38:15 +0000 (10:38 +0100)] 
Update TODO

9 months agosbsign: Add support for offline signing
Daan De Meyer [Fri, 21 Feb 2025 23:31:41 +0000 (00:31 +0100)] 
sbsign: Add support for offline signing

Add new options --prepare-offline-signing, --signed-data= and
--signed-data-signature= which allow for offline signing in a
similar manner to pesign.

9 months agosbsign: Split out functions and switch to lower level APIs
Daan De Meyer [Fri, 21 Feb 2025 11:22:45 +0000 (12:22 +0100)] 
sbsign: Split out functions and switch to lower level APIs

Preparation for adding offline signing support. Some additional
features and fixes are included as well:

- We make sure to add an empty SMIMECAP attribute instead of a populated
  one to mimick pesign more.
- We switch to PKCS7_dataFinal() instead of PKCS7_final() as all that the
  latter does is an unnecessary copy before calling PKCS7_dataFinal().
- We add support for passing in the signing time via $SOURCE_DATE_EPOCH.

9 months agoman: clean up how we name our PEM files in examples (#36541)
Lennart Poettering [Thu, 27 Feb 2025 12:27:42 +0000 (13:27 +0100)] 
man: clean up how we name our PEM files in examples (#36541)

Kinda a follow-up for 2cc58b6c8ad1826f22b120c4148d123018a7b92c

9 months agounits: measure "factory-reset" into PCR 11 when we request factory reset 36543/head
Lennart Poettering [Thu, 27 Feb 2025 11:41:57 +0000 (12:41 +0100)] 
units: measure "factory-reset" into PCR 11 when we request factory reset

Let's make sure that the moment where factory reset is requested is
visible in the TPM PCR state, so that access to secrets is terminated.

This is particulary interesting when the system is booted with
systemd.unit=factory-reset.target on the kernel command line, requesting
a factory reset on the following boot. The preparations done in
userspace should already lose access to the TPM in that case.

9 months agounits: measure the fact we enter storage target mode into TPM
Lennart Poettering [Thu, 27 Feb 2025 11:33:36 +0000 (12:33 +0100)] 
units: measure the fact we enter storage target mode into TPM

storagetm mode means we we are network accessible. let's lock down
access to TPM secrets in this case: let's measure a pcr "phase" string
into PCR 11.

This is good as it means that if we are exploited in this state FDE
secrets protected by TPM are likely to remain protected, since the PCR
values wouldn't allow access.

9 months agoman: follow our own naming rules more closely 36541/head
Lennart Poettering [Thu, 27 Feb 2025 09:07:36 +0000 (10:07 +0100)] 
man: follow our own naming rules more closely

In some examples we inserted "-initrd" after the "public-key" instead of
before when naming PEM files. Let's fix that, and stick to common
suffixes.

9 months agoman: follow our certificate/public-key/private-key PEM file naming rules
Lennart Poettering [Thu, 27 Feb 2025 09:02:09 +0000 (10:02 +0100)] 
man: follow our certificate/public-key/private-key PEM file naming rules

In 2cc58b6c8ad1826f22b120c4148d123018a7b92c and related we established
rules on naming certs/public-keys/private-keys:

*-public-key.pem
*-private-key.pem
*-certificate.pem

Let's follow that naming in repart's man page too.

9 months agosbsign: Copy source to dest later
Daan De Meyer [Wed, 26 Feb 2025 09:14:56 +0000 (10:14 +0100)] 
sbsign: Copy source to dest later

Preparation for later commit.

9 months agokeyutil: Use fopen_tmpfile_linkable()
Daan De Meyer [Thu, 27 Feb 2025 09:03:29 +0000 (10:03 +0100)] 
keyutil: Use fopen_tmpfile_linkable()

9 months agokeyutil: Reword pkcs7 documentation string a little
Daan De Meyer [Thu, 27 Feb 2025 09:03:12 +0000 (10:03 +0100)] 
keyutil: Reword pkcs7 documentation string a little

9 months agoopenssl-util: Introduce pkcs7_new()
Daan De Meyer [Tue, 25 Feb 2025 07:53:13 +0000 (08:53 +0100)] 
openssl-util: Introduce pkcs7_new()

9 months agosbsign: Fix wrong variable being passed to log_error_errno()
Daan De Meyer [Wed, 26 Feb 2025 09:32:25 +0000 (10:32 +0100)] 
sbsign: Fix wrong variable being passed to log_error_errno()

9 months agoexec-invoke: Fix unshare() error handling (#36537)
Daan De Meyer [Thu, 27 Feb 2025 08:16:07 +0000 (09:16 +0100)] 
exec-invoke: Fix unshare() error handling (#36537)

9 months agoexec-invoke: Fix invalid use of error variable 36537/head
Daan De Meyer [Wed, 26 Feb 2025 21:34:33 +0000 (22:34 +0100)] 
exec-invoke: Fix invalid use of error variable

Follow up for 406f1775017a5631bc91a1f53ac5e50f4fbfac0c

9 months agoexec-invoke: Fix unshare() error handling
Daan De Meyer [Wed, 26 Feb 2025 21:31:35 +0000 (22:31 +0100)] 
exec-invoke: Fix unshare() error handling

Follow up for cd58b5a13537fc89b669ff9232ba2206214c9fa1

9 months agostoragetm: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:48:31 +0000 (13:48 +0900)] 
storagetm: fix typo

Follow-up for 1761066b135f1a322c446f102343ea4aa61fe3ee.

9 months agotest: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:42:00 +0000 (13:42 +0900)] 
test: fix typo

Follow-up for f01132aacfe925d95f3a28841412011c79913967.

9 months agodocs: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:32:01 +0000 (13:32 +0900)] 
docs: fix typo

Follow-ups for d5de14899641395893425b36fdb0e95929647b38.

9 months agoman: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:28:17 +0000 (13:28 +0900)] 
man: fix typo

Follow-up for f8825c1364fb1c3f3f5d96654e779fd51500f476.

9 months agojournal-remote: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:26:38 +0000 (13:26 +0900)] 
journal-remote: fix typo

Follow-up for c259c9e25329c93cb1b7363f89d917ffa5ce57c1.

9 months agonetwork: fix typo
Yu Watanabe [Thu, 27 Feb 2025 04:25:10 +0000 (13:25 +0900)] 
network: fix typo

Follow-up for 6698795edaf68f99354cf73d04307e1e2f4598c0.

9 months agohwdb: add GOLD WARRIOR SIM PhoenixRC 10411R
Jaroslav Škarvada [Wed, 26 Feb 2025 22:46:42 +0000 (23:46 +0100)] 
hwdb: add GOLD WARRIOR SIM PhoenixRC 10411R

Fixes #36522

9 months agomeson: Add missing dbus_programs dependency on update-dbus-docs
Daan De Meyer [Wed, 26 Feb 2025 21:06:41 +0000 (22:06 +0100)] 
meson: Add missing dbus_programs dependency on update-dbus-docs

All dbus programs have to be up-to-date for update-dbus-docs to
produce the expected output, so add the missing dependency.

9 months agopam_systemd/pam_systemd_home: various fixes (#36505)
Yu Watanabe [Thu, 27 Feb 2025 03:37:05 +0000 (12:37 +0900)] 
pam_systemd/pam_systemd_home: various fixes (#36505)

9 months agocore/service: do not propagate reload for combined RELOADING=1 + READY=1 when notify...
Mike Yuan [Wed, 26 Feb 2025 14:02:58 +0000 (15:02 +0100)] 
core/service: do not propagate reload for combined RELOADING=1 + READY=1 when notify-reload

Follow-up for 3bd28bf721dc70722ff1c675026ed0b44ad968a3

SERVICE_RELOAD_SIGNAL state can only be reached via explicit reload jobs,
and we have a clear distinction between that and plain RELOADING=1
notifications, the latter of which is issued by clients doing reload
outside of our job engine. I.e. upon SERVICE_RELOAD_SIGNAL + RELOADING=1
we don't propagate reload jobs again, since that's done during transaction
construction stage already. The handling of combined RELOADING=1 + READY=1
so far is bogus however, as it tries to propagate duplicate reload jobs.
Amend this by following the logic for standalone RELOADING=1.

9 months agopo: Translated using Weblate (Lithuanian)
Justinas Kairys [Wed, 26 Feb 2025 22:45:40 +0000 (23:45 +0100)] 
po: Translated using Weblate (Lithuanian)

Currently translated at 69.6% (179 of 257 strings)

Co-authored-by: Justinas Kairys <j.kairys@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/lt/
Translation: systemd/main

9 months agoupdate TODO 36505/head
Lennart Poettering [Mon, 24 Feb 2025 11:07:58 +0000 (12:07 +0100)] 
update TODO

9 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

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

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

9 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

9 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.)

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

9 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

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

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

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

9 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).

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

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

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

9 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

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

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

9 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

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

9 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

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

9 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

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

9 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

9 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().

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

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

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

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

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

9 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

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

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

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

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

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

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

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

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

9 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