]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
4 months agoshared: make sure RandomizedOffsetUSec can be set as transient prop 37981/head
Lennart Poettering [Thu, 26 Jun 2025 15:31:00 +0000 (17:31 +0200)] 
shared: make sure RandomizedOffsetUSec can be set as transient prop

Fixes: #37870
Follow-up for: #36437

4 months agoman: add proper version info for RandomizedOffsetUSec
Lennart Poettering [Thu, 26 Jun 2025 15:28:44 +0000 (17:28 +0200)] 
man: add proper version info for RandomizedOffsetUSec

Follow-up for: #36437
Fixes: #37870
4 months agorepart: enforce minimum size on ESP based on sector size (#37899)
Lennart Poettering [Thu, 26 Jun 2025 15:22:47 +0000 (17:22 +0200)] 
repart: enforce minimum size on ESP based on sector size (#37899)

Fixes: #37801
4 months agofix docs for inhibitor logic (#37975)
Lennart Poettering [Thu, 26 Jun 2025 15:22:08 +0000 (17:22 +0200)] 
fix docs for inhibitor logic (#37975)

Fixes: #34091
Sigh.

4 months agoSmall udpates to TPM2_PCR_MEASUREMENTS page (#37978)
Luca Boccassi [Thu, 26 Jun 2025 13:28:03 +0000 (14:28 +0100)] 
Small udpates to TPM2_PCR_MEASUREMENTS page (#37978)

4 months agologind: introduce a proper error if op is blocked by inhibitor lock 37975/head
Lennart Poettering [Thu, 26 Jun 2025 09:33:26 +0000 (11:33 +0200)] 
logind: introduce a proper error if op is blocked by inhibitor lock

We map it client side to EACCES, because that's what systemctl wants for
its logic.

See: #34091

4 months agodocs: properly document inhibitor locks
Lennart Poettering [Thu, 26 Jun 2025 09:17:23 +0000 (11:17 +0200)] 
docs: properly document inhibitor locks

I still am annoyed that this wasn't documented properly when the
inhibitor locks where modified, even though raised multiple times in PR
reviews.

Follow-up for: #30307
See: #34091

4 months agorepart: respect minimum sector size for ESP/VFAT partitions 37899/head
Lennart Poettering [Wed, 25 Jun 2025 09:02:05 +0000 (11:02 +0200)] 
repart: respect minimum sector size for ESP/VFAT partitions

Fixes: #37801
4 months agorepart: trivial modernizations
Lennart Poettering [Thu, 19 Jun 2025 12:42:55 +0000 (14:42 +0200)] 
repart: trivial modernizations

4 months agorepart: make file system sector size configurable
Lennart Poettering [Thu, 19 Jun 2025 12:14:31 +0000 (14:14 +0200)] 
repart: make file system sector size configurable

Let's make the fs sector size configurable. This also adds
infrastructure so that we can pick different sector sizes as defaults
eventually, but doesn't actually do that.

(Background: I think we should probably default to native sector size
for the ESP, but Daan disagrees, so I'll leave this out for now).

4 months agoboot: downgrade log messages about invalid timeouts
Lennart Poettering [Thu, 26 Jun 2025 08:59:10 +0000 (10:59 +0200)] 
boot: downgrade log messages about invalid timeouts

We correctly handle invalid timeouts being stored in EFI variables, but
because we deal with this gracefully we should downgrade the log level
to warning, and say "ignoring" in the log message.

Inspired by #34084

4 months agodocs/TPM2_PCR_MEASUREMENTS: fix typo 37978/head
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jun 2025 10:25:30 +0000 (12:25 +0200)] 
docs/TPM2_PCR_MEASUREMENTS: fix typo

4 months agodocs/TPM2_PCR_MEASUREMENTS: link to the PCR registry page
Zbigniew Jędrzejewski-Szmek [Thu, 26 Jun 2025 10:16:59 +0000 (12:16 +0200)] 
docs/TPM2_PCR_MEASUREMENTS: link to the PCR registry page

4 months agojournal-gatewayd: fix handling of num_skip pointing beyond the last entry
Jan Čermák [Tue, 24 Jun 2025 16:54:44 +0000 (18:54 +0200)] 
journal-gatewayd: fix handling of num_skip pointing beyond the last entry

When `num_skip` is supplied to the `Range` header, journal-gatewayd
always returns the very last record even though it should have been
skipped. This is because the `sd_journal_next_skip` always returns
non-zero value on the first call, leading to one iteration of the
`request_reader_entries` returning the last record.

To avoid this unexpected behavior, check that the number of lines we
have skipped by is not lower than the requested skip value. If it is,
then it means there are lines which should not be returned now -
decrement the n_skip counter then and return from the function, closing
the stream if follow flag is not set.

Fixes #37954

4 months agoterminal-util: switch from TCSADRAIN to TCSANOW for all tcsetattr() calls
Lennart Poettering [Wed, 25 Jun 2025 09:49:47 +0000 (11:49 +0200)] 
terminal-util: switch from TCSADRAIN to TCSANOW for all tcsetattr() calls

TCSADRAIN means tcsetattr() will become blocking (waiting for ability to
write out queued bytes), which is problematic, if the referenced TTY is
dead for some reason.

Since all these calls just modify *input* parameters anyway (i.e. mostly
local echo, and canonical mode), forcing out queued output is kinda
pointless anyway, hence just don't do it: leave it in the queue and just
change the flags we want to change.

The tcsetattr(3) man page kinda hints that we want to use TCSANOW here,
because it documents for TCSADRAIN:

"This option should be used when changing parameters that affect
output."

Which one can read so that TCSADRAIN should not be used if it doesn't
affect output, which is the case here.

This probably fixes: #37854

4 months agoRevert "namespace-util: include sched.h"
Mike Yuan [Wed, 25 Jun 2025 11:15:55 +0000 (13:15 +0200)] 
Revert "namespace-util: include sched.h"

This reverts commit 50cda6433bb04bf6ad81bde3b5d19d2856b34575.

Same as the previous revert, sched.h is too generic to
be included in namespace-util.h, plus this defeats
the purpose of forward decl.

4 months agoRevert "fs-util: include fcntl.h in fs-util.h"
Mike Yuan [Wed, 25 Jun 2025 11:04:47 +0000 (13:04 +0200)] 
Revert "fs-util: include fcntl.h in fs-util.h"

This reverts commit 4d0fe93cbaf01fcc2a61f51bb36cd4b07394bab8.

I'm not convinced by the reasoning here. The practice of
forward declarations should be confined in headers only,
and any actual invocation of functions in source files
needs to include the original header. strv_split_full()
for instance takes ExtractFlags, and callers will need
to include extract-word.h to get the value definitions.

Now, indeed some -util headers export the most relevant
system header too, notably pidfd-util. But fs-util doesn't
seem to be coupled with any specific header, hence I'm
skeptical about such inclusion.

4 months agosocket-activate: normalize COMMAND notation in help text + man (#37967)
Luca Boccassi [Wed, 25 Jun 2025 14:05:24 +0000 (15:05 +0100)] 
socket-activate: normalize COMMAND notation in help text + man (#37967)

4 months agonspawn: Allow bpf() syscall if CAP_BPF is retained
Daan De Meyer [Wed, 25 Jun 2025 11:19:59 +0000 (13:19 +0200)] 
nspawn: Allow bpf() syscall if CAP_BPF is retained

CAP_BPF is closely associated with the bpf() syscall so it makes sense
to allow the latter if the former is retained.

4 months agosocket-activate: normalize COMMAND notation in help text + man 37967/head
Mike Yuan [Wed, 25 Jun 2025 11:32:19 +0000 (13:32 +0200)] 
socket-activate: normalize COMMAND notation in help text + man

4 months agoman/systemd-run: consistently wrap external command + args in a single block
Mike Yuan [Wed, 25 Jun 2025 11:31:16 +0000 (13:31 +0200)] 
man/systemd-run: consistently wrap external command + args in a single block

4 months agoAssorted header cleanups (#37958)
Yu Watanabe [Tue, 24 Jun 2025 21:32:56 +0000 (06:32 +0900)] 
Assorted header cleanups (#37958)

4 months agotest: escape '+' from uname -r before using in regex via '=~'
Luca Boccassi [Tue, 24 Jun 2025 12:07:11 +0000 (13:07 +0100)] 
test: escape '+' from uname -r before using in regex via '=~'

It will otherwise interpret characters such as '+' as if they
were regex, and break matching.

For example TEST-71-HOSTNAME started failing when
uname -r started including a '+':

FAIL: 'Kernel: Linux 6.12.33+deb13-amd64' not found in:
 Static hostname: host
       Icon name: computer-vm
         Chassis: vm 🖴
      Machine ID: e6471c1f95ab49098827498ed816cdf7
         Boot ID: 231da987f64d4af59f2076fbb638c611
  Virtualization: kvm
Operating System: Debian GNU/Linux 13 (trixie)
          Kernel: Linux 6.12.33+deb13-amd64
    Architecture: x86-64

4 months agologind: save position only if we have a seat
Lennart Poettering [Thu, 22 May 2025 16:04:25 +0000 (18:04 +0200)] 
logind: save position only if we have a seat

4 months agocore: when PrivateDevices= is enabled and we need to decrypt TPM2 credentials, go...
Lennart Poettering [Mon, 2 Jun 2025 11:31:29 +0000 (13:31 +0200)] 
core: when PrivateDevices= is enabled and we need to decrypt TPM2 credentials, go via IPC

Also, if a device ACL list is defined, also go via IPC (instead of
trying to patch it, as before).

The outcome is that the tighter rules continue to apply when configured.

Fixes: #35959
4 months agoman: fix @BUILD_ROOT@ insertion
Yu Watanabe [Tue, 24 Jun 2025 17:31:48 +0000 (02:31 +0900)] 
man: fix @BUILD_ROOT@ insertion

@BUILD_ROOT@ is replaced with the _quoted_ build path. Hence, if
@BUILD_ROOT@ is quoted, the result is doubly quoted, and the script does
not work if the path contains spaces.

Fixes #37953.

4 months agoinclude: update syscall list 37958/head
Yu Watanabe [Thu, 19 Jun 2025 00:09:17 +0000 (09:09 +0900)] 
include: update syscall list

open_tree_attr is since kernel 6.15-rc1:
https://github.com/torvalds/linux/commit/c4a16820d90199409c9bf01c4f794e1e9e8d8fd8

4 months agofs-util: use int for argument that takes F_OK and friends
Yu Watanabe [Sat, 21 Jun 2025 16:40:25 +0000 (01:40 +0900)] 
fs-util: use int for argument that takes F_OK and friends

access_nofollow() is a simple wrapper of faccessat(), and it is defined as
```
int faccessat(int dirfd, const char *pathname, int mode, int flags);
```

4 months agofs-util: include fcntl.h in fs-util.h
Yu Watanabe [Sat, 21 Jun 2025 16:34:36 +0000 (01:34 +0900)] 
fs-util: include fcntl.h in fs-util.h

fs-util.h provides access_nofollow() but it did not include neither
fcntl.h nor unistd.h, which define F_OK and friends. Hence we cannot use
the function without including one of the headers. Let's include fcntl.h
in fs-util.h, then we can use the function by simply including fs-util.h.

4 months agoinclude: import kernel headers for several struct and enum definitions
Yu Watanabe [Thu, 19 Jun 2025 20:40:29 +0000 (05:40 +0900)] 
include: import kernel headers for several struct and enum definitions

- mempolicy.h for MPOL_DEFAULT and friends,
- sched/types.h for struct sched_attr,
- xattr.h for struct xattr_args.

4 months agonamespace-util: include sched.h
Yu Watanabe [Thu, 19 Jun 2025 20:44:06 +0000 (05:44 +0900)] 
namespace-util: include sched.h

To make CLONE_NEWNS and friends defined, which is used by clone_flag_to_namespace_type().

4 months agomeson: sort file list
Yu Watanabe [Thu, 19 Jun 2025 20:37:44 +0000 (05:37 +0900)] 
meson: sort file list

4 months agotree-wide: include missing_fs.h only where necessary
Yu Watanabe [Thu, 19 Jun 2025 15:59:32 +0000 (00:59 +0900)] 
tree-wide: include missing_fs.h only where necessary

The additional definitions provided by the header are
- EXT4_IOC_RESIZE_FS, used in resize-fs.c,
- FILEID_KERNFS, used in cgroup-util.c and pidfd-util.c.

Let's drop the inclusion at other places.

4 months agotree-wide: use sd_bus_message_send() instead of sd_bus_send() wherever possible
Lennart Poettering [Tue, 24 Jun 2025 11:07:54 +0000 (13:07 +0200)] 
tree-wide: use sd_bus_message_send() instead of sd_bus_send() wherever possible

Also, add a coccinelle script that patches this automatically.

4 months agoudev: reset loopback block device ownership and mode on detach
Lennart Poettering [Thu, 19 Jun 2025 15:18:11 +0000 (17:18 +0200)] 
udev: reset loopback block device ownership and mode on detach

Loopback block devices are agressively reused, without being removed in
between. This means various inode attributes on their device nodes will
– so far – remain in effect between uses of the devices. Since there are
applications which change access mode/ownership of such devices after
attaching files to them, let's undo this again when we detect them to be
unused again.

Fixes: #37745
4 months agoimport: rename keyring extension from .gpg to .pgp and add OBS key for system:systemd...
Lennart Poettering [Tue, 24 Jun 2025 05:31:07 +0000 (07:31 +0200)] 
import: rename keyring extension from .gpg to .pgp and add OBS key for system:systemd (#37927)

The format is not specific to gpg, it's defined by the pgp
protocols. Lintian even warns about it:

systemd-container: openpgp-file-has-implementation-specific-extension
[usr/lib/systemd/import-pubring.gpg]

Rename it accordingly, as new pgp implementations are slowly becoming
more popular.

Keep using /etc/systemd/import-pubring.gpg for backward compatibility.

4 months agoNEWS: add not about vendor import-pubring renaming 37927/head
Luca Boccassi [Mon, 23 Jun 2025 22:24:33 +0000 (23:24 +0100)] 
NEWS: add not about vendor import-pubring renaming

4 months agomkosi: drop suse spec workarounds that were merged upstream
Luca Boccassi [Mon, 23 Jun 2025 22:14:16 +0000 (23:14 +0100)] 
mkosi: drop suse spec workarounds that were merged upstream

4 months agomkosi: workaround for opensuse spec file to pick up new import-pubring filename
Luca Boccassi [Sun, 22 Jun 2025 17:18:53 +0000 (18:18 +0100)] 
mkosi: workaround for opensuse spec file to pick up new import-pubring filename

4 months agomkosi: update debian commit reference to 84966b99cdfc7ea3ee35163ad224775d9be90055
Luca Boccassi [Sun, 22 Jun 2025 17:12:32 +0000 (18:12 +0100)] 
mkosi: update debian commit reference to 84966b99cdfc7ea3ee35163ad224775d9be90055

84966b99cd systemd-container: pick up renamed keyring file
7aab0da57c udev: add 'clock' system group for PTP rules

4 months agoimport-pubring: add OBS key for system:systemd
Luca Boccassi [Sun, 22 Jun 2025 16:52:02 +0000 (17:52 +0100)] 
import-pubring: add OBS key for system:systemd

We are publishing ParticleOS images at
https://build.opensuse.org/project/show/system:systemd

so add the signing key to the default keyring, so that they
can be imported out of the box.

4 months agoimport: rename keyring extension from .gpg to .pgp
Luca Boccassi [Sun, 22 Jun 2025 16:43:35 +0000 (17:43 +0100)] 
import: rename keyring extension from .gpg to .pgp

The format is not specific to gpg, it's defined by the pgp
protocols. Lintian even warns about it:

systemd-container: openpgp-file-has-implementation-specific-extension [usr/lib/systemd/import-pubring.gpg]

Rename it accordingly, as new pgp implementations are slowly becoming
more popular.

Keep using /etc/systemd/import-pubring.gpg for backward compatibility.

4 months agotest-cpu-set-util: fix check for CPUSet.allocated
Yu Watanabe [Sat, 21 Jun 2025 14:06:16 +0000 (23:06 +0900)] 
test-cpu-set-util: fix check for CPUSet.allocated

The check was simply wrong and meaningless, as it always checked
CPUSet.allocated is greater than or equals to 1, as sizeof(__cpu_mask) is 8.

Let's make the test more strict.

4 months agouser-record: also support "aliases" in the "status" section of user records
Lennart Poettering [Fri, 13 Jun 2025 08:08:25 +0000 (10:08 +0200)] 
user-record: also support "aliases" in the "status" section of user records

Some user record providers might want to implement case-insensitive user
record matching, or other forms of non-normalized matching. So far
uderdb didn't allow that, because client's typically revalidate the
returned user records against the search keys (at least our clients do)
– they check if the search user name is actually part of the user record
and its aliases.

In order to support such lookups we thus need to allow the looup keys to
be part of the user record, but also not be persisted in it, because
the number of casings/spellings of a username might be ridiculously
high.

A nice way out is to allow "aliases" not only in the main part of the
record, but also in the "status" part, that contains information
dynamically determined at query time. We can insert a second "aliases"
field there, which the parser will then merge with the primary "aliases"
field, but the existing rules around "status" ensure tha the data is
never persisted.

Follow-up: e2e1f38f5a9d442d0a027986024f4ea75ce97d2f

4 months agonetwork/dhcp6: handle conflict addresses gracefully (#37916)
Luca Boccassi [Mon, 23 Jun 2025 21:23:35 +0000 (22:23 +0100)] 
network/dhcp6: handle conflict addresses gracefully (#37916)

4 months agocore: turn ordering cycle log message into a recognizable one + catalog entry (#37893)
Yu Watanabe [Mon, 23 Jun 2025 17:56:07 +0000 (02:56 +0900)] 
core: turn ordering cycle log message into a recognizable one + catalog entry (#37893)

Fixes: #35642
4 months agoglob-util: several cleanups for safe_glob() (#37933)
Yu Watanabe [Mon, 23 Jun 2025 17:53:37 +0000 (02:53 +0900)] 
glob-util: several cleanups for safe_glob() (#37933)

4 months agohome: Make sure we resolve /etc/skel symlink
Daan De Meyer [Sun, 22 Jun 2025 12:17:08 +0000 (14:17 +0200)] 
home: Make sure we resolve /etc/skel symlink

Otherwise copy_tree_at() will try to copy the symlink which we obviously
don't want.

4 months agohomed,userdbd: mark "secrets" section of user records always to "sensitive" (#37935)
Yu Watanabe [Mon, 23 Jun 2025 15:50:44 +0000 (00:50 +0900)] 
homed,userdbd: mark "secrets" section of user records always to "sensitive" (#37935)

4 months agobootspec: ensure memory free in one error path
Lennart Poettering [Mon, 23 Jun 2025 12:40:21 +0000 (14:40 +0200)] 
bootspec: ensure memory free in one error path

4 months agosysupdate: use path_is_safe()
Yu Watanabe [Sun, 22 Jun 2025 05:44:04 +0000 (14:44 +0900)] 
sysupdate: use path_is_safe()

path_is_safe(...) is an alias of path_is_valid_full(..., false).

4 months agoconsole: when switching console modes and one doesn't work, always go for the next
Lennart Poettering [Fri, 20 Jun 2025 09:05:00 +0000 (11:05 +0200)] 
console: when switching console modes and one doesn't work, always go for the next

So far we already had a logic in place to go for the next mode if some
mode doesn't work – but it was only applied if we'd actively cycle
through resolutions.

Let's extend the logic and always apply it: whenever we try to switch to
a mode, and it doesn't work, go to the next one until we find one that
works.

Fixes: #37324
4 months agocatalog: add entries for the order cycle log messages 37893/head
Lennart Poettering [Thu, 19 Jun 2025 08:15:49 +0000 (10:15 +0200)] 
catalog: add entries for the order cycle log messages

Fixes: #35642
4 months agocore: when removing a job from a transaction, include in structured log message which
Lennart Poettering [Thu, 19 Jun 2025 08:15:35 +0000 (10:15 +0200)] 
core: when removing a job from a transaction, include in structured log message which

4 months agocore: cast log_oom() got void
Lennart Poettering [Wed, 18 Jun 2025 09:51:45 +0000 (11:51 +0200)] 
core: cast log_oom() got void

4 months agocore: change ordering cycle log message log levels
Lennart Poettering [Wed, 18 Jun 2025 09:48:39 +0000 (11:48 +0200)] 
core: change ordering cycle log message log levels

Let's downgrade the log message about our attempts to deal with an
ordering cycle to warning, because this is a "positive" thing, we try to
improve an earlier error.

OTOH increase the log level when we first log about the cycle to error,
since that highlights the actual problem.

4 months agocore: make log cycle messages recognizable via message IDs
Lennart Poettering [Wed, 18 Jun 2025 09:47:25 +0000 (11:47 +0200)] 
core: make log cycle messages recognizable via message IDs

4 months agocore: output log cycle path in one log message, not many
Lennart Poettering [Wed, 18 Jun 2025 09:47:06 +0000 (11:47 +0200)] 
core: output log cycle path in one log message, not many

Fixes: #35642
4 months agoglob-util: drop unused _cleanup_globfree_ 37933/head
Yu Watanabe [Mon, 23 Jun 2025 00:20:55 +0000 (09:20 +0900)] 
glob-util: drop unused _cleanup_globfree_

4 months agotest: use safe_glob() at one more place
Yu Watanabe [Mon, 23 Jun 2025 00:00:20 +0000 (09:00 +0900)] 
test: use safe_glob() at one more place

This also makes the test use ASSERT_OK() and STRV_FOREACH() macros.

No functional change, just refactoring.

4 months agoglob-util: rework safe_glob()
Yu Watanabe [Sun, 22 Jun 2025 23:55:54 +0000 (08:55 +0900)] 
glob-util: rework safe_glob()

Currently, callers of safe_glob() set an empty glob_t or glob_t with
opendir func, and all other components are always zero.
So, let's introduce safe_glob_full() which optionally takes opendir
function, rather than glob_t, and returns result strv, rather than
storing results in glob_t.
Also, introduce safe_glob() which is a trivial wrapper of
safe_glob_full() without opendir func.

No functional change, just refactoring.

4 months agotest-glob-util: drop redundant test cases
Yu Watanabe [Sun, 22 Jun 2025 02:09:11 +0000 (11:09 +0900)] 
test-glob-util: drop redundant test cases

The removed glob() with GLOB_ALTDIRFUNC is exactly the same as what
safe_glob() does, which is tested in TEST(safe_glob) below.
Let's drop the test cases.

4 months agoUse paths specified from environment variables for /etc configuration files
Valentin David [Mon, 10 Mar 2025 09:53:41 +0000 (10:53 +0100)] 
Use paths specified from environment variables for /etc configuration files

Some configuration files that need updates are directly under in /etc. To
update them atomically, we need write access to /etc. For Ubuntu Core this is
an issue as /etc is not writable. Only a selection of subdirectories can be
writable. The general solution is symlinks or bind mounts to writable places.
But for atomic writes in /etc, that does not work. So Ubuntu has had a patch
for that that did not age well.

Instead we would like to introduce some environment variables for alternate
paths.

 * SYSTEMD_ETC_HOSTNAME: /etc/hostname
 * SYSTEMD_ETC_MACHINE_INFO: /etc/machine-info
 * SYSTEMD_ETC_LOCALTIME: /etc/localtime
 * SYSTEMD_ETC_LOCALE_CONF: /etc/locale.conf
 * SYSTEMD_ETC_VCONSOLE_CONF: /etc/vconsole.conf
 * SYSTEMD_ETC_ADJTIME: /etc/adjtime

While it is for now expected that there is a symlink from the standard, we
still try to read them from that alternate path. This is important for
`/etc/localtime`, which is a symlink, so we cannot have an indirect symlink or
bind mount for it.

Since machine-id is typically written only once and not updated. This commit
does not cover it. An initrd can properly create it and bind mount it.

4 months agouserdb: when loading a user record from JSON, mark 'secret' section in JSON variant... 37935/head
Lennart Poettering [Mon, 23 Jun 2025 12:40:25 +0000 (14:40 +0200)] 
userdb: when loading a user record from JSON, mark 'secret' section in JSON variant as sensitive as side effect

When we load a user record we retain a reference to the original JSON.
Thus the loaded objects might live at least as long as our user record
object, hence we better make sure we set the 'sensitive' flag for the
'secret' section if it's not marked like that yet.

This is paranoia only: we already should be setting this flag properly
earlier, when acquiring the json variant in the first place. But it's
better to be safe than sorry.

4 months agohomed: set "secrets" section to 'sensitive' in more places
Lennart Poettering [Mon, 23 Jun 2025 12:37:58 +0000 (14:37 +0200)] 
homed: set "secrets" section to 'sensitive' in more places

We already do this in all placed where we it *really* matters, i.e. for
passwords PINs. But let's do this also at any place where we add the
section at all, regardless whether it is for storing a pw or something
else.

With this we establish the rule that if it's in "secrets", then it
shall be marked "sensitive".

4 months agoupdate TODO
Lennart Poettering [Mon, 23 Jun 2025 12:37:37 +0000 (14:37 +0200)] 
update TODO

4 months agohomed: do not log new password when debug logs are enabled
Luca Boccassi [Sun, 22 Jun 2025 15:44:02 +0000 (16:44 +0100)] 
homed: do not log new password when debug logs are enabled

systemd-homed[3443]: Sending to worker:
{
  "enforcePasswordPolicy": false,
  "userName": "foobarbaz",
  "perMachine": [
    {
      "storage": "directory",
      "matchMachineId": "c1082742b92c4f7e8d30d6b17f9d3351"
    }
  ],
  "disposition": "regular",
  "lastChangeUSec": 1750606709833174,
  "lastPasswordChangeUSec": 1750606709833174,
  "privileged": {
    "hashedPassword": [
      "$y$j9T$ai2Fshq0ev9W05WL4SoRJ1$EFfe41ACrJKXMCQ83A05n6UW.HrRr9/O4b1x0CXgAXD"
    ]
  },
  "binding": {
    "c1082742b92c4f7e8d30d6b17f9d3351": {
      "blobDirectory": "/var/cache/systemd/home/foobarbaz",
      "uid": 60056,
      "gid": 60056
    }
  },
  "secret": {
    "password": [
      "test"
    ]
  },
  "__systemd_homework_internal_blob_fdmap": {}
}

4 months agonetwork/dhcp6: consider the DHCPv6 protocol as finished when conflict addresses exist 37916/head
Yu Watanabe [Fri, 20 Jun 2025 18:51:30 +0000 (03:51 +0900)] 
network/dhcp6: consider the DHCPv6 protocol as finished when conflict addresses exist

Replaces #37891.

4 months agonetwork/dhcp6: refactoring for verify_dhcp6_address()
Yu Watanabe [Fri, 20 Jun 2025 18:48:51 +0000 (03:48 +0900)] 
network/dhcp6: refactoring for verify_dhcp6_address()

No functional change. Preparation for later changes.

4 months agohwdb: Add hwbd definitions for maker tools
Bastien Nocera [Sat, 21 Jun 2025 18:01:18 +0000 (20:01 +0200)] 
hwdb: Add hwbd definitions for maker tools

As originally added back in 2016 in 68ea57b21d4d ("Added support
for 3D printers to uaccess (ID_MAKER_TOOL)").

The first devices added would be 3D printers compatible with Flashprint
from Flashforge, as listed in this connector plugin:
https://github.com/Mrnt/OctoPrint-FlashForge/blob/master/octoprint_flashforge/__init__.py#L28

See https://github.com/flathub/com.flashforge.FlashPrint/issues/59

4 months agohwdb: Add support for Lenovo IdeaPad Slim 5 series
Oliver Schramm [Sun, 22 Jun 2025 11:51:51 +0000 (13:51 +0200)] 
hwdb: Add support for Lenovo IdeaPad Slim 5 series

Signed-off-by: Oliver Schramm <oliver.schramm97@gmail.com>
4 months agopo: Translated using Weblate (Greek)
Jim Spentzos [Sun, 22 Jun 2025 12:13:39 +0000 (12:13 +0000)] 
po: Translated using Weblate (Greek)

Currently translated at 35.0% (90 of 257 strings)

Co-authored-by: Jim Spentzos <jimspentzos2000@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/el/
Translation: systemd/main

4 months agobootctl: honour architecture when updating boot loaders (#37913)
Yu Watanabe [Fri, 20 Jun 2025 17:25:17 +0000 (02:25 +0900)] 
bootctl: honour architecture when updating boot loaders (#37913)

Fixes: #33413
Follow-up for: #30418

4 months agoupdate TODO
Lennart Poettering [Fri, 20 Jun 2025 10:58:46 +0000 (12:58 +0200)] 
update TODO

4 months agocore: escape UTF-8 in mount unit Where field before sending to clients
Lennart Poettering [Fri, 20 Jun 2025 11:16:10 +0000 (13:16 +0200)] 
core: escape UTF-8 in mount unit Where field before sending to clients

Followup for: 4804da58536ab7ad46178a03f4d2da49fd8e4ba2 #27541

Fixes: #36206
4 months agocopy: when looking for file holes, consider empty data segments
Lennart Poettering [Fri, 20 Jun 2025 10:07:27 +0000 (12:07 +0200)] 
copy: when looking for file holes, consider empty data segments

This could mean that we hit EOF, or it could mean that somebody punched
a hole concurrently where we are currently looking. Let's figure this
out by simply trying to copy a single byte, which will give us a
definitive answer.

Fixes: #35569
4 months agologind inhibitor code fixes (#37907)
Yu Watanabe [Fri, 20 Jun 2025 17:09:52 +0000 (02:09 +0900)] 
logind inhibitor code fixes (#37907)

Fixes: #35565
4 months agojournal-gatewayd: make num_entries in Range header optional again
Jan Čermák [Wed, 18 Jun 2025 15:32:49 +0000 (17:32 +0200)] 
journal-gatewayd: make num_entries in Range header optional again

Since 435c372ce5059082212d37ac7039844f14f34a80 added in v256,
num_entries part of the Range header is mandatory and error is returned
when it's not filled in. This makes using the "follow" argument clumsy,
because for an indefinite following of the logs, arbitrary high number
must be specified. This change makes it possible to omit it again and
documents this behavior in the man page.

Moreover, as the cursor part of the header was never mandatory, enclose
it in square brackets in the documentation as well and elaborate how
indexing works.

Following are some concrete examples of the Range header which are now
accepted:

 entries= (or entries=:)
  - everything starting from the first event

 entries=cursor
  - everything starting from `cursor`

 entries=:-9:10
  - last 10 events and close the connection

If the follow flag is set:

 entries=:-4:10
  - last 5 events, wait for 5 new and close connection

 entries=:-9:
  - last 10 events and keep streaming

Note that only the very last one is changing current behavior, but
reintroduces pre-v256 compatibility.

Fixes #37172

4 months agobootctl: when updating everything check PE machine type 37913/head
Lennart Poettering [Fri, 20 Jun 2025 12:03:57 +0000 (14:03 +0200)] 
bootctl: when updating everything check PE machine type

Let's never accidentally over-write foreign-arch PE binaries with native
ones.

Fixes: #33413
4 months agobootctl: be more careful when opening arbitrary files from ESP
Lennart Poettering [Fri, 20 Jun 2025 11:59:04 +0000 (13:59 +0200)] 
bootctl: be more careful when opening arbitrary files from ESP

Let's refuse all kind of weird stuff early.

As suggested here: https://github.com/systemd/systemd/pull/30418#pullrequestreview-2128220792

4 months agologind: fix boolean comparison 37907/head
Lennart Poettering [Thu, 19 Jun 2025 16:27:06 +0000 (18:27 +0200)] 
logind: fix boolean comparison

We cannot compare a boolean with a bit mask. This worked only by
accident, since MANAGER_IS_INHIBITED_CHECK_DELAY happened to be 1. But
we need to do this properly.

Fixes: #35565
4 months agologind: fix minor coding style issues
Lennart Poettering [Thu, 19 Jun 2025 16:26:54 +0000 (18:26 +0200)] 
logind: fix minor coding style issues

Fixes: #35565
4 months agotpm2: print clear log message in case of dictionary lockout mode (#37894)
Luca Boccassi [Thu, 19 Jun 2025 21:55:36 +0000 (22:55 +0100)] 
tpm2: print clear log message in case of dictionary lockout mode (#37894)

Fixes: #32260
4 months agoresolved: enforce RefuseRecordTypes= also in proxy mode (#37902)
Yu Watanabe [Thu, 19 Jun 2025 20:59:24 +0000 (05:59 +0900)] 
resolved: enforce RefuseRecordTypes= also in proxy mode (#37902)

Fixes: #36491
4 months agonspawn: --network-veth also works with unpriv nspawn
Lennart Poettering [Thu, 19 Jun 2025 16:13:20 +0000 (18:13 +0200)] 
nspawn: --network-veth also works with unpriv nspawn

(because we ask nsresourced for help)

Fixes: #36179
4 months agoresolved: make bypass tests work 37902/head
Lennart Poettering [Thu, 19 Jun 2025 16:28:16 +0000 (18:28 +0200)] 
resolved: make bypass tests work

It's not sufficient to append a DNS key to a packet, we must also update
the qdcount too. We got this right in most tests but didn#t here.
Moreover, we must extract the packet then to actually have a DnsQuestion
properly filled in.

Fix that. Without this the tests didn't test anything reasonable.

4 months agoresolved: honour RefuseRecordTypes= also in proxy mode
Lennart Poettering [Thu, 19 Jun 2025 15:50:40 +0000 (17:50 +0200)] 
resolved: honour RefuseRecordTypes= also in proxy mode

Fixes: #36491
4 months agoresolved: use dns_question_isempty() where appropriate
Lennart Poettering [Thu, 19 Jun 2025 15:50:02 +0000 (17:50 +0200)] 
resolved: use dns_question_isempty() where appropriate

4 months agoresolved: split out helper that determines on RefuseRecordTypes= match
Lennart Poettering [Thu, 19 Jun 2025 15:44:14 +0000 (17:44 +0200)] 
resolved: split out helper that determines on RefuseRecordTypes= match

4 months agoSeveral assorted cleanups (#37888)
Yu Watanabe [Thu, 19 Jun 2025 15:58:48 +0000 (00:58 +0900)] 
Several assorted cleanups (#37888)

4 months agocryptsetup: handle DA lockout/bad PIN properly 37894/head
Lennart Poettering [Thu, 19 Jun 2025 10:28:32 +0000 (12:28 +0200)] 
cryptsetup: handle DA lockout/bad PIN properly

Now that we have recognizable errors, let's print clear error messages
when we try to unlock a TPM slot. And in case of the token plugin
propagate this as ENOANO so that libcryptsetup recognizes this as bad
PIN. (ENOANO is documented as the error to return in that case)

Fixes: #32260
4 months agotpm2-util: recognize DA lockout mode and PIN failures properly
Lennart Poettering [Thu, 19 Jun 2025 10:26:45 +0000 (12:26 +0200)] 
tpm2-util: recognize DA lockout mode and PIN failures properly

When we create the policy session the previously passed PIN will be
checked. This means we'll see PIN errors here, in case the PIN is wrong
or if DA lockout mode has been triggered.

Recognize these two errors, and bubble up recognizable errors.

4 months agotest-bpf-firewall: use ASSERT_XYZ() and bpf_program_pin() 37888/head
Yu Watanabe [Wed, 18 Jun 2025 18:32:15 +0000 (03:32 +0900)] 
test-bpf-firewall: use ASSERT_XYZ() and bpf_program_pin()

4 months agoioprio-util: move from basic/ to shared/
Yu Watanabe [Wed, 18 Jun 2025 03:05:14 +0000 (12:05 +0900)] 
ioprio-util: move from basic/ to shared/

It is not used by libsystemd.

4 months agomissing_network: IPPROTO_MPTCP is already defined in linux/in.h
Yu Watanabe [Wed, 18 Jun 2025 01:34:06 +0000 (10:34 +0900)] 
missing_network: IPPROTO_MPTCP is already defined in linux/in.h

And the header is already included through (our implementation of)
netinet/in.h, hence we can safely drop the definition here.

4 months agosd-lldp: replace ETHERTYPE_LLDP with ETH_P_LLDP
Yu Watanabe [Wed, 18 Jun 2025 01:24:23 +0000 (10:24 +0900)] 
sd-lldp: replace ETHERTYPE_LLDP with ETH_P_LLDP

ETH_P_LLDP is defined in linux/if_ether.h.

4 months agoport write_env_file() to label_os_pre() + teach firstboot a bit of relabelling (...
Yu Watanabe [Thu, 19 Jun 2025 09:03:12 +0000 (18:03 +0900)] 
port write_env_file() to label_os_pre() + teach firstboot a bit of relabelling (#37869)

This is a clean-up, and also addresses some of the points of #37857.

4 months agotest-cpu-set-util: use ASSERT_XYZ() macros
Yu Watanabe [Tue, 17 Jun 2025 18:54:43 +0000 (03:54 +0900)] 
test-cpu-set-util: use ASSERT_XYZ() macros

4 months agoman: encourage the creation of empty machine-id instead of deleting it
Lukas Nykryn [Wed, 18 Jun 2025 11:33:25 +0000 (13:33 +0200)] 
man: encourage the creation of empty machine-id instead of deleting it

Current text hints that machine-id in template image should be empty
if the system is read-only. But most of the bare metal systems and
regular VMs have /etc read-only at this phase of boot.

4 months agofd-util: move cmsg_close_all() to socket-util.[ch]
Lennart Poettering [Wed, 18 Jun 2025 07:29:48 +0000 (09:29 +0200)] 
fd-util: move cmsg_close_all() to socket-util.[ch]

This call only makes sense on sockets, it's not a generic fd concept,
hence let's move this over.