]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 days agopull: add pretty progress bar to systemd-pull too
Lennart Poettering [Wed, 20 Aug 2025 15:36:48 +0000 (17:36 +0200)] 
pull: add pretty progress bar to systemd-pull too

This already exists in systemd-import, but let's add it for systemd-pull
too.

8 days agomain: switch explicitly to tty1 on soft-reboot
Lennart Poettering [Mon, 27 Oct 2025 17:26:37 +0000 (18:26 +0100)] 
main: switch explicitly to tty1 on soft-reboot

Fixes: #39462
8 days agomount-util: Iterate mountinfo backwards when unmounting
Daan De Meyer [Tue, 28 Oct 2025 21:54:14 +0000 (22:54 +0100)] 
mount-util: Iterate mountinfo backwards when unmounting

Submounts will always be located further in the mountinfo file, so
when we're unmounting, iterating backwards is likely to be more
efficient than iterating forwards. It'll also reduce the amount of
EBUSY debug logging we'll get since we'll stop trying to unmount
parent mounts with submounts which will always fail with EBUSY.

8 days agocore: Don't setup mount propagation tunnel if not required
Daan De Meyer [Tue, 28 Oct 2025 22:00:44 +0000 (23:00 +0100)] 
core: Don't setup mount propagation tunnel if not required

If we know we have mount_setattr(), then we don't need the mount
propagation tunnel, so don't set it up.

9 days agoudevadm: flush output after each monitor event
Allison Karlitskaya [Tue, 28 Oct 2025 08:41:40 +0000 (09:41 +0100)] 
udevadm: flush output after each monitor event

If you're using `udevadm monitor` from a script, without a tty, then
libc defaults to being fully-buffered, and won't flush stdout after
newlines.  This is fine for tools that dump a bunch of data and then
exit immediately.  It's a problem for tools like `udevadm monitor` which
have long pauses: the buffered data can get stuck in the buffer for an
unbounded amount of time.

In the Cockpit project we've been working around this for some time with
`stdbuf` which is a `LD_PRELOAD` hack to change the libc buffering
behaviour, but we'd like to stop doing that.

Let's make sure we flush the buffer after each event.

9 days agoTEST-07-PID1: wait for systemd-resolved being stopped
Yu Watanabe [Tue, 28 Oct 2025 04:20:58 +0000 (13:20 +0900)] 
TEST-07-PID1: wait for systemd-resolved being stopped

As 'systemctl stop' is called with --no-block, previously systemd-resolved
might not be stopped when 'resolvectl' is called, and the DBus connection
might be closed during the call:
```
TEST-07-PID1.sh[5643]: + systemctl stop --no-block systemd-resolved.service
TEST-07-PID1.sh[5643]: + resolvectl
TEST-07-PID1.sh[5732]: Failed to get global data: Remote peer disconnected
```

Follow-up for 8eefd0f4debc0bcfeea89dd39c43e3318f3f7ae7.
Fixes https://github.com/systemd/systemd/pull/39388#issuecomment-3439277442.

9 days agobasic: Use xopenat_full() in mkdir_p_root_full()
Daan De Meyer [Tue, 28 Oct 2025 07:49:13 +0000 (08:49 +0100)] 
basic: Use xopenat_full() in mkdir_p_root_full()

9 days agoman: handle leading/trailing/repeating whitespaces in anchor links (#39423)
Yu Watanabe [Tue, 28 Oct 2025 06:28:54 +0000 (15:28 +0900)] 
man: handle leading/trailing/repeating whitespaces in anchor links (#39423)

So even if a <term> section contains newlines, we get a reasonable
anchor link to it.

Before:
```
<dt id="
  bind
  UNIT
  PATH
  [PATH]
"><span class="term">
...
<a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20bind%0A%20%20%20%20%20%20%20%20%20%20%20%20UNIT%0A%20%20%20%20%20%20%20%20%20%20%20%20PATH%0A%20%20%20%20%20%20%20%20%20%20%20%20[PATH]%0A%20%20%20%20%20%20%20%20%20%20">¶</a>
```

After:
```
<dt id="bind UNIT PATH [PATH]"><span class="term">
...
<a class="headerlink" title="Permalink to this term" href="#bind%20UNIT%20PATH%20[PATH]">¶</a>
```

Resolves: https://github.com/systemd/systemd/issues/39196

---

The reverts are not strictly necessary here (as already pointed out in
https://github.com/systemd/systemd/pull/39154#issuecomment-3360118164)
but they were helpful in checking if the fix works as expected. I can
drop them if needed.

9 days agologind: support deserializing session leader through pidfdid (#39440)
Yu Watanabe [Tue, 28 Oct 2025 06:28:09 +0000 (15:28 +0900)] 
logind: support deserializing session leader through pidfdid (#39440)

Fixes #39437

9 days agoudev-watch: allow to log from child process
Yu Watanabe [Sun, 26 Oct 2025 01:07:21 +0000 (10:07 +0900)] 
udev-watch: allow to log from child process

Otherwise, it is hard to debug issues in reread_partition_table().

This also drop unnecessary FORK_RLIMIT_NOFILE_SAFE flag.

10 days agomachined: support image clone/rm operations unpriv, and make hidden images always...
Lennart Poettering [Mon, 27 Oct 2025 16:06:26 +0000 (17:06 +0100)] 
machined: support image clone/rm operations unpriv, and make hidden images always read-only (#39408)

10 days agozsh: add completion for dbus bus address
Ronan Pigott [Sun, 26 Oct 2025 04:04:03 +0000 (21:04 -0700)] 
zsh: add completion for dbus bus address

The DBUS_SESSION_BUS_ADDRESS and DBUS_SYSTEM_BUS_ADDRESS parameters have
an interesting syntax thats useful to complete. Let's include a
completion definition for these parameters.

11 days agocore/exec-invoke: use strnpcpy() where appropriate (#39446)
Yu Watanabe [Sun, 26 Oct 2025 00:43:14 +0000 (09:43 +0900)] 
core/exec-invoke: use strnpcpy() where appropriate (#39446)

11 days agosd-varlink: when expecting a type and refusing due to mismatch say what was received
Luca Boccassi [Sat, 25 Oct 2025 18:57:40 +0000 (19:57 +0100)] 
sd-varlink: when expecting a type and refusing due to mismatch say what was received

Sometimes it is not obvious why a message is not accepted,
so explicitly say what type was received in the log message

11 days agopo: Translated using Weblate (Greek)
Jim Spentzos [Sat, 25 Oct 2025 17:21:37 +0000 (17:21 +0000)] 
po: Translated using Weblate (Greek)

Currently translated at 35.2% (93 of 264 strings)

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

12 days agoTEST-35-LOGIN: test coldplug without fdstore on kernels with pidfd id 39440/head
Mike Yuan [Fri, 24 Oct 2025 21:40:12 +0000 (23:40 +0200)] 
TEST-35-LOGIN: test coldplug without fdstore on kernels with pidfd id

12 days agologind: support deserializing session leader through pidfdid
Mike Yuan [Fri, 24 Oct 2025 21:09:50 +0000 (23:09 +0200)] 
logind: support deserializing session leader through pidfdid

People make weird assumptions around state preservation and
expect logind to be stoppable. While this is realistically
not OK we can probably improve things a little.

This complements f01d8658a3a57d05a5156aefd32d8137c3ee3996 and
adds support for deserializing the LEADER_PIDFDID= field.
We still prioritize pidfd if got one from fdstore (as with
service_notify_message_parse_new_pid() in pid1), but otherwise
this should make logind restart more robust when fdstore
gets spuriously cleared.

Fixes #39437

12 days agocore/exec-invoke: use strnpcpy() where appropriate 39446/head
Mike Yuan [Sat, 25 Oct 2025 17:18:34 +0000 (19:18 +0200)] 
core/exec-invoke: use strnpcpy() where appropriate

12 days agostrxcpyx: do not access dest as an array
Mike Yuan [Sat, 25 Oct 2025 17:29:33 +0000 (19:29 +0200)] 
strxcpyx: do not access dest as an array

dest is a pointer to a string, not an array. Accessing
the "first element" just happens to work, but let's
be more careful.

12 days agocore/exec-invoke: relax restriction for process name length
Yu Watanabe [Sun, 27 Jul 2025 17:31:03 +0000 (02:31 +0900)] 
core/exec-invoke: relax restriction for process name length

Previously, we limit the length of process name by 8.
This relax the restriction then at least process comm or
program_invocation_name contains the untrucated process name.

Closes #38367.

12 days agotest: extend start limit interval
Yu Watanabe [Sat, 25 Oct 2025 06:34:44 +0000 (15:34 +0900)] 
test: extend start limit interval

As the modified service requires about ~10 seconds for stopping, the
service never hit the start limit even if we tried to restart the
service more than 5 times.

This also checks that the service is actually triggered by dbus method
call.

Follow-up for 8eefd0f4debc0bcfeea89dd39c43e3318f3f7ae7.

12 days agoSeveral cleanups for dlopen() (#39441)
Daan De Meyer [Sat, 25 Oct 2025 07:19:28 +0000 (09:19 +0200)] 
Several cleanups for dlopen() (#39441)

12 days agotest: sort libraries in test-dlopen-so 39441/head
Yu Watanabe [Sat, 25 Oct 2025 05:02:24 +0000 (14:02 +0900)] 
test: sort libraries in test-dlopen-so

12 days agolocale: use include directory for libxkbcommon
Yu Watanabe [Sat, 25 Oct 2025 04:02:07 +0000 (13:02 +0900)] 
locale: use include directory for libxkbcommon

To support the case the headers are installed at an unusual place.

12 days agomeson: add all 'cflags' dependencies to libshared
Yu Watanabe [Sat, 25 Oct 2025 03:40:32 +0000 (12:40 +0900)] 
meson: add all 'cflags' dependencies to libshared

This should not change any behavior in most common setups.
But, may be useful when headers are installed at non-default places.

12 days agopwquality: drop 'sym_' prefix from cleanup function
Yu Watanabe [Sat, 25 Oct 2025 02:54:07 +0000 (11:54 +0900)] 
pwquality: drop 'sym_' prefix from cleanup function

This also drops unnecessary symbols in header.

12 days agopasswdqc: drop 'sym_' prefix from cleanup function
Yu Watanabe [Sat, 25 Oct 2025 02:50:58 +0000 (11:50 +0900)] 
passwdqc: drop 'sym_' prefix from cleanup function

This also drops unnecessary symbols in header.

12 days agoqrcode-util: drop 'sym_' prefix from cleanup function
Yu Watanabe [Sat, 25 Oct 2025 02:45:20 +0000 (11:45 +0900)] 
qrcode-util: drop 'sym_' prefix from cleanup function

12 days agopcre2-util: drop trivial pattern_free() wrapper
Yu Watanabe [Sat, 25 Oct 2025 02:41:55 +0000 (11:41 +0900)] 
pcre2-util: drop trivial pattern_free() wrapper

12 days agopcre2-util: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:28:30 +0000 (11:28 +0900)] 
pcre2-util: drop 'sym_' prefix from cleanup functions

12 days agoelf-util: drop 'sym_' prefix from cleanup function
Yu Watanabe [Sat, 25 Oct 2025 02:26:39 +0000 (11:26 +0900)] 
elf-util: drop 'sym_' prefix from cleanup function

12 days agoxkbcommon-util: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:25:41 +0000 (11:25 +0900)] 
xkbcommon-util: drop 'sym_' prefix from cleanup functions

12 days agolibarchive-util: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:23:20 +0000 (11:23 +0900)] 
libarchive-util: drop 'sym_' prefix from cleanup functions

12 days agoapparmor-util: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:21:12 +0000 (11:21 +0900)] 
apparmor-util: drop 'sym_' prefix from cleanup functions

12 days agocompress: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:18:52 +0000 (11:18 +0900)] 
compress: drop 'sym_' prefix from cleanup functions

12 days agopkcs11-util: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:15:05 +0000 (11:15 +0900)] 
pkcs11-util: drop 'sym_' prefix from cleanup functions

12 days agomodule-util: drop 'sym_' prefix from cleanup functions
Yu Watanabe [Sat, 25 Oct 2025 02:12:16 +0000 (11:12 +0900)] 
module-util: drop 'sym_' prefix from cleanup functions

12 days agoopenssl-util: fix spurious indent
Yu Watanabe [Sat, 25 Oct 2025 01:40:43 +0000 (10:40 +0900)] 
openssl-util: fix spurious indent

12 days agoopenssl-util: drop unused functions
Yu Watanabe [Sat, 25 Oct 2025 01:26:46 +0000 (10:26 +0900)] 
openssl-util: drop unused functions

They were introduced by 5f163921e9ff6d735798db259c47543822f81b5c, but
never used.

12 days agocleanup: introduce DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO_RENAME() macro
Yu Watanabe [Sat, 25 Oct 2025 01:21:54 +0000 (10:21 +0900)] 
cleanup: introduce DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_MACRO_RENAME() macro

This is similar to DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(), but for
macro.

12 days agotree-wide: add basic validation of --background argument
Daniel Hast [Fri, 24 Oct 2025 22:47:59 +0000 (18:47 -0400)] 
tree-wide: add basic validation of --background argument

Check whether the argument of the `--background` option of
`systemd-run`, `run0`, `systemd-nspawn`, `systemd-vmspawn`, and
`systemd-pty-forward` is either empty or looks like an ANSI color code,
and reject invalid values when parsing arguments.

We consider a string to look like an ANSI color code if it consists of
one or more sequences of ASCII digits separated by semicolons. This
permits every valid ANSI color code, and should reject anything that
results in garbled output.

13 days agorules: apply loopback block device rule only onto loopback block devices
Lennart Poettering [Fri, 24 Oct 2025 15:03:02 +0000 (17:03 +0200)] 
rules: apply loopback block device rule only onto loopback block devices

Fixes: #39426
Follow-up for: 9422ce83c201ab4154de832331f0b351fc5137f6

13 days agodiscover-image: support clone + rm operation also unpriv 39408/head
Lennart Poettering [Tue, 26 Aug 2025 15:30:13 +0000 (17:30 +0200)] 
discover-image: support clone + rm operation also unpriv

13 days agodiscover-image: imply that hidden images are read-only
Lennart Poettering [Mon, 25 Aug 2025 10:26:53 +0000 (12:26 +0200)] 
discover-image: imply that hidden images are read-only

Marking a whole directory tree OS image as read-only is difficult
privilege-wise, because so far we rely on the FS_IMMUTABLE_FL which is
not accessible to unpriv clients.

One fundamental place where we currently rely on marking images
read-only is for keeping pristine copies of the originally downloaded
image around, which we place in "hidden" image directories. This is
probably the most relevant usecase for the read-only flag. And moreover,
the only usecase for the hidden images are these read-only pristine
copies.

Hence, let's make this work reasonably in the unpriv case, and simply
imply the read-only flag for hidden images. This is strictly speaking a
change in behaviour, but effectively it shouldn't be, because for nspawn
containers that are executed we insist on names that are hostname
compatible, and hidden names aren't (because they start with a dot).

13 days agorm-rf: make sure we can safely remove dirs we have no access to via rm_rf_at()
Lennart Poettering [Wed, 20 Aug 2025 09:39:41 +0000 (11:39 +0200)] 
rm-rf: make sure we can safely remove dirs we have no access to via rm_rf_at()

Previously, we'd first empty a dir, and then remove it. This works fine
as long as we have access to a dir. But in some cases (like for example
a foreign owned container tree) we might not have access to the dir, but
are still able to remove it (because it is empty, and in a dir we own).
Hence let's try that first. If it works, we do not need to enter the dir
(and thus fail).

13 days agocoredump: handle ENOBUFS and EMSGSIZE the same way
Michal Sekletar [Fri, 24 Oct 2025 10:55:20 +0000 (12:55 +0200)] 
coredump: handle ENOBUFS and EMSGSIZE the same way

Depending on the runtime configuration, e.g. sysctls
net.core.wmem_default= and net.core.rmem_default and on the actual
message size, sendmsg() can fail also with ENOBUFS. E.g. alloc_skb()
failure caused by net.core.[rw]mem_default=64MiB and huge fdinfo list
from process that has 90k opened FDs.

We should handle this case in the same way as EMSGSIZE and drop part of
the message.

13 days agomkosi: Stop installing devel packages
Daan De Meyer [Fri, 24 Oct 2025 08:13:38 +0000 (10:13 +0200)] 
mkosi: Stop installing devel packages

These aren't required for tests and pull in a bunch of dependencies,
so let's not install them into the final image.

13 days agotest: add policy packages for TEST-06-SELINUX in openSUSE
Thomas Blume [Fri, 24 Oct 2025 08:43:58 +0000 (10:43 +0200)] 
test: add policy packages for TEST-06-SELINUX in openSUSE

13 days agoTODO: add that libmicrohttpd2 has openssl support (#39433)
Dimitri John Ledkov [Fri, 24 Oct 2025 10:58:19 +0000 (11:58 +0100)] 
TODO: add that libmicrohttpd2 has openssl support (#39433)

For the openssl unification, add note that development release of
libmicrohttpd2 has openssl support.

13 days agorpm: Make sure we only match files in the directories in triggers
Daan De Meyer [Wed, 22 Oct 2025 20:13:36 +0000 (22:13 +0200)] 
rpm: Make sure we only match files in the directories in triggers

/usr/lib/systemd/system will match /usr/lib/systemd/systemd-networkd,
which is definitely not the intention.

13 days agomountfsd: allow privileged users to mount bare unprotected filesystems (#39411)
Yu Watanabe [Fri, 24 Oct 2025 00:40:52 +0000 (09:40 +0900)] 
mountfsd: allow privileged users to mount bare unprotected filesystems (#39411)

Split from https://github.com/systemd/systemd/pull/39394 as that
requires deeper rework that will take more time

13 days agoDrop libcap dependency (#39425)
Yu Watanabe [Fri, 24 Oct 2025 00:40:05 +0000 (09:40 +0900)] 
Drop libcap dependency (#39425)

2 weeks agotree-wide: drop unused libcap dependencies 39425/head
Yu Watanabe [Thu, 23 Oct 2025 14:40:59 +0000 (23:40 +0900)] 
tree-wide: drop unused libcap dependencies

2 weeks agocapability-util: use capability_get() and _apply() in capability_quintet_enforce()
Yu Watanabe [Thu, 23 Oct 2025 14:34:31 +0000 (23:34 +0900)] 
capability-util: use capability_get() and _apply() in capability_quintet_enforce()

2 weeks agocapability-util: use capability_get() and _apply() in change_capability()
Yu Watanabe [Thu, 23 Oct 2025 14:33:04 +0000 (23:33 +0900)] 
capability-util: use capability_get() and _apply() in change_capability()

2 weeks agocapability-util: use capability_apply() in drop_privileges()
Yu Watanabe [Thu, 23 Oct 2025 14:30:27 +0000 (23:30 +0900)] 
capability-util: use capability_apply() in drop_privileges()

2 weeks agocapability-util: rework capability_gain_cap_setpcap() and capability_bounding_set_drop()
Yu Watanabe [Thu, 23 Oct 2025 14:27:34 +0000 (23:27 +0900)] 
capability-util: rework capability_gain_cap_setpcap() and capability_bounding_set_drop()

This makes the functions use CapabilityQuintet, capability_get(), and
capability_apply().

2 weeks agotest: use have_inheritable_cap() in test_apply_ambient_caps()
Yu Watanabe [Thu, 23 Oct 2025 14:19:11 +0000 (23:19 +0900)] 
test: use have_inheritable_cap() in test_apply_ambient_caps()

This also make the test case use ASSERT_XYZ() macros.

2 weeks agotest: replace cap_to_text() with capability_get() and capability_set_to_string()
Yu Watanabe [Thu, 23 Oct 2025 14:17:36 +0000 (23:17 +0900)] 
test: replace cap_to_text() with capability_get() and capability_set_to_string()

2 weeks agocapability-util: introduce capability_apply() and use it in capability_ambient_set_ap...
Yu Watanabe [Thu, 23 Oct 2025 14:16:06 +0000 (23:16 +0900)] 
capability-util: introduce capability_apply() and use it in capability_ambient_set_apply()

2 weeks agocapability-util: introduce capability_get() and use it in have_effective_cap()
Yu Watanabe [Thu, 23 Oct 2025 14:07:13 +0000 (23:07 +0900)] 
capability-util: introduce capability_get() and use it in have_effective_cap()

capability_get() is a wrapper of capget() syscall and converts its
result to CapabilityQuintet.

This also introduce have_inheritable_cap(), which is similar to
have_effective_cap(). It is currently unused, but will be used later.

2 weeks agocapability-util: several coding style updates
Yu Watanabe [Thu, 23 Oct 2025 13:57:29 +0000 (22:57 +0900)] 
capability-util: several coding style updates

- rebreak comments,
- add short comment for constant arguments,
- drop unnecessary {},
- use BIT_SET() macro.

2 weeks agocapability-util: introduce capability_quintet_equal() helper function
Yu Watanabe [Thu, 23 Oct 2025 16:41:53 +0000 (01:41 +0900)] 
capability-util: introduce capability_quintet_equal() helper function

Currently unused, but will be used later.

2 weeks agocapability-util: move several definitions
Yu Watanabe [Thu, 23 Oct 2025 13:42:07 +0000 (22:42 +0900)] 
capability-util: move several definitions

2 weeks agotest: use CAP_LIMIT at one more place
Yu Watanabe [Thu, 23 Oct 2025 16:52:56 +0000 (01:52 +0900)] 
test: use CAP_LIMIT at one more place

2 weeks agocapability-util: tighten requirement for CAP_LAST_CAP off by one
Yu Watanabe [Thu, 23 Oct 2025 16:52:02 +0000 (01:52 +0900)] 
capability-util: tighten requirement for CAP_LAST_CAP off by one

Otherwise, we cannot use UINT64_MAX as 'unset'.

2 weeks agocapability-list: make capability_list_length() return unsigned
Yu Watanabe [Thu, 23 Oct 2025 13:38:35 +0000 (22:38 +0900)] 
capability-list: make capability_list_length() return unsigned

2 weeks agocore: increment start limit counter only when we can start the unit
Yu Watanabe [Mon, 20 Oct 2025 10:40:28 +0000 (19:40 +0900)] 
core: increment start limit counter only when we can start the unit

Otherwise, e.g. requesting to start a unit that is under stopping may
enter the failed state.

This makes
- rename .can_start() -> .test_startable(), and make it allow to return
  boolean and refuse to start units when it returns false,
- refuse earlier to start units that are in the deactivating state, so
  several redundant conditions in .start() can be dropped,
- move checks for unit states mapped to UNIT_ACTIVATING from .start() to
  .test_startable().

Fixes #39247.

2 weeks agoRevert "Update systemctl.xml" 39423/head
Frantisek Sumsal [Thu, 23 Oct 2025 13:32:19 +0000 (15:32 +0200)] 
Revert "Update systemctl.xml"

This reverts commit b0fe317d14c4e9a02ff661c2ccd37f093cfda396.
This reverts commit 9f4f7f0372688127adc27f82a75db58749eb6d6e.

2 weeks agoman: handle leading/trailing/repeating whitespaces in anchor links
Frantisek Sumsal [Thu, 23 Oct 2025 13:30:52 +0000 (15:30 +0200)] 
man: handle leading/trailing/repeating whitespaces in anchor links

So even if a <term> section contains newlines, we get a reasonable
anchor link to it.

Before:
<dt id="
  bind
  UNIT
  PATH
  [PATH]
"><span class="term">
...
<a class="headerlink" title="Permalink to this term" href="#%0A%20%20%20%20%20%20%20%20%20%20%20%20bind%0A%20%20%20%20%20%20%20%20%20%20%20%20UNIT%0A%20%20%20%20%20%20%20%20%20%20%20%20PATH%0A%20%20%20%20%20%20%20%20%20%20%20%20[PATH]%0A%20%20%20%20%20%20%20%20%20%20">¶</a>

After:
<dt id="bind UNIT PATH [PATH]"><span class="term">
...
<a class="headerlink" title="Permalink to this term" href="#bind%20UNIT%20PATH%20[PATH]">¶</a>

Resolves: #39196

2 weeks agotest: properly wait for the forked process
Frantisek Sumsal [Thu, 23 Oct 2025 08:28:07 +0000 (10:28 +0200)] 
test: properly wait for the forked process

The process forked off by `systemd-notify --fork` is not a child of the
current shell, so using `wait` doesn't work. This then later causes a
race, when the test occasionally fails because it attempts to start a
new systemd-socket-activate instance before the old one is completely
gone:

[ 1488.947744] TEST-74-AUX-UTILS.sh[1938]: Child 1947 died with code 0
[ 1488.947952] TEST-74-AUX-UTILS.sh[1933]: + assert_eq hello hello
[ 1488.949716] TEST-74-AUX-UTILS.sh[1948]: + set +ex
[ 1488.950112] TEST-74-AUX-UTILS.sh[1950]: ++ cat /proc/1938/comm
[ 1488.945555] systemd[1]: Started systemd-networkd.service - Network Management.
[ 1488.950365] TEST-74-AUX-UTILS.sh[1933]: + assert_in systemd-socket systemd-socket-
[ 1488.950563] TEST-74-AUX-UTILS.sh[1951]: + set +ex
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: + kill 1938
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: + wait 1938
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.socket-activate.sh: line 14: wait: pid 1938 is not a child of this shell
[ 1488.950766] TEST-74-AUX-UTILS.sh[1933]: + :
[ 1488.951486] TEST-74-AUX-UTILS.sh[1952]: ++ systemd-notify --fork -- systemd-socket-activate -l 1234 --now socat ACCEPT-FD:3 PIPE
[ 1488.952222] TEST-74-AUX-UTILS.sh[1953]: Failed to listen on [::]:1234: Address already in use
[ 1488.952222] TEST-74-AUX-UTILS.sh[1953]: Failed to open '1234': Address already in use
[ 1488.956831] TEST-74-AUX-UTILS.sh[1933]: + PID=1953
[ 1488.957078] TEST-74-AUX-UTILS.sh[102]: + echo 'Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.socket-activate.sh failed'
[ 1488.957078] TEST-74-AUX-UTILS.sh[102]: Subtest /usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.socket-activate.sh failed

2 weeks agoman/network: extend document about the default value of IPv6AcceptRA=
Yu Watanabe [Tue, 21 Oct 2025 17:52:28 +0000 (02:52 +0900)] 
man/network: extend document about the default value of IPv6AcceptRA=

Prompted by #39304.

2 weeks agorereadpt: always update kernel partition tables from userspace in an incremental...
Yu Watanabe [Thu, 23 Oct 2025 00:35:03 +0000 (09:35 +0900)] 
rereadpt: always update kernel partition tables from userspace in an incremental fashion (#39390)

Let's address #38672 comprehensively: let's avoid BLKRRPART as much as
we can, and always do careful userspace controlled, incremental updates
to the kernel partition tables.

This simply iterates through blkid's partition parsing, and turns it
into a BLKPG ioctls, adding, updating, removing partitions as necessary,
suppressing unnecessary changes. This has the major benefit that the
call becomes truly idempotent: if nothing changed then nothing is
removed/readed, like BLKRRPART is doing it.

This then ports over all code currently doing partition refreshing,
specifcially: udev, repart, and homed.

Fixes: #38672
2 weeks agoTwo minor id128-related cleanups (#39407)
Yu Watanabe [Thu, 23 Oct 2025 00:30:11 +0000 (09:30 +0900)] 
Two minor id128-related cleanups (#39407)

Split out from #39210

2 weeks agotree-wide: open block device locks in writable mode 39390/head
Lennart Poettering [Wed, 22 Oct 2025 20:47:53 +0000 (22:47 +0200)] 
tree-wide: open block device locks in writable mode

udev's block device locking protocol has one pitfall not even the
example in the documentation got right so far (even though this is
explained in all detail above): udev's rescanning is only triggered when
an fd that is opened for writing is closed. This means that if a
separate locking fd is opened on a block device – one that is maintained
independently of the fd actually used for writing – it must be opened for
writing too, so that closing the lock definitely triggers a rescan. This
matters in cases where the lock fd is kept for longer than the fd used
for writing to disk. (Because otherwise udev might get the
IN_CLOSE_WRITE event, but when it tries to rescan will find the device
locked, and never retry because no IN_CLOSE_WRITE is triggred anymore.)

Let's fix that across the codebase, at 4 places:

1. in makefs (a lock fd is kept, and mkfs then invoked as child, which
   uses a different fd, and the lock fd is closed only once the child
   died)

2. in udevadm lock (embarassing!): which is intended to be used to wrap tools
   that modify disk contents, very similar to the makefs case. The lock
   is also kept until after the tool exited.

3. In storagetm: the kernel nvme-tcp layer writes to the device
   directly, we just keep a lock fd.

4. the example in BLOCK_DEVICE_LOCKING.md

2 weeks agorepart: switch things over to our own partition reread logic
Lennart Poettering [Mon, 20 Oct 2025 14:13:31 +0000 (16:13 +0200)] 
repart: switch things over to our own partition reread logic

2 weeks agorepart: split out that disarms automatic artifact removal
Lennart Poettering [Mon, 20 Oct 2025 14:09:52 +0000 (16:09 +0200)] 
repart: split out that disarms automatic artifact removal

2 weeks agoudev: switch over to rereadpt() rather than raw BLKRRPART
Lennart Poettering [Mon, 20 Oct 2025 13:21:44 +0000 (15:21 +0200)] 
udev: switch over to rereadpt() rather than raw BLKRRPART

Fixes: #38672
2 weeks agohomed: switch from raw BLKRRPART to rereadpt_fd()
Lennart Poettering [Mon, 20 Oct 2025 13:18:42 +0000 (15:18 +0200)] 
homed: switch from raw BLKRRPART to rereadpt_fd()

2 weeks agorereadpt: implement userspace-based BLKRRPART re-implementation
Lennart Poettering [Mon, 20 Oct 2025 10:36:29 +0000 (12:36 +0200)] 
rereadpt: implement userspace-based BLKRRPART re-implementation

2 weeks agoblockdev-util: split out partition device node generation from dissect-util.c
Lennart Poettering [Mon, 20 Oct 2025 10:36:05 +0000 (12:36 +0200)] 
blockdev-util: split out partition device node generation from dissect-util.c

2 weeks agoblockdev-util: in blockdev_partscan_enabled() check if we are operating on block...
Lennart Poettering [Mon, 20 Oct 2025 10:35:05 +0000 (12:35 +0200)] 
blockdev-util: in blockdev_partscan_enabled() check if we are operating on block device first

The function makes no sense on any other type of fd, hence we better
check this explicitly.

2 weeks agoblockdev-util: rename BlockDeviceLookupFlag to plural
Lennart Poettering [Mon, 20 Oct 2025 15:58:37 +0000 (17:58 +0200)] 
blockdev-util: rename BlockDeviceLookupFlag to plural

This is a flags type and a flag function argument, let's name it in
plural, because it allows many flags combinations. Internally, the
implementation already used plural, but let's fix the prototypes too.

2 weeks agosd-device: add device_get_property_uint() helper
Lennart Poettering [Mon, 20 Oct 2025 10:34:32 +0000 (12:34 +0200)] 
sd-device: add device_get_property_uint() helper

This is just like device_get_property_int() but operates on unsigned
ints.

2 weeks agomkosi: update debian commit reference to 5650452e6b0b430f44d3d48b7322c2b3c8b9477f
Luca Boccassi [Wed, 22 Oct 2025 16:35:02 +0000 (17:35 +0100)] 
mkosi: update debian commit reference to 5650452e6b0b430f44d3d48b7322c2b3c8b9477f

5650452e6b Install new files for upstream build
607afcd060 salsa: disable arm64/ppc64el again
b1bb6d4849 systemd-tests: drop unused overrides
b3790a36ca getty-static: add missing Documentation=
1cea27caba Backport patch to fix autopkgtest with new util-linux due to file move
2e74a7f969 Update changelog for 258.1-1 release
9250e242b9 Make /run/lock world writable by default

2 weeks agovmspawn: Add --bind-user= and --bind-user-shell= (#38410)
Daan De Meyer [Wed, 22 Oct 2025 18:03:47 +0000 (20:03 +0200)] 
vmspawn: Add --bind-user= and --bind-user-shell= (#38410)

We use virtiofsd ID translation to mimick idmapped mounts and the
transient userdb credentials to provision the mapped user in the VM.

2 weeks agoman: RootImageOptions= is only supported for system services right now 39411/head
Luca Boccassi [Wed, 22 Oct 2025 14:28:19 +0000 (15:28 +0100)] 
man: RootImageOptions= is only supported for system services right now

Support via mountfsd is being worked on but will take more time,
fix the documentation to be correct in the meanwhile

Follow-up for fad01f798d1308fa6bd81eac1b13b3d14d9a5380

2 weeks agomountfsd: allow privileged users to mount bare unprotected filesystems
Luca Boccassi [Mon, 20 Oct 2025 23:37:44 +0000 (00:37 +0100)] 
mountfsd: allow privileged users to mount bare unprotected filesystems

This is useful when we start to call mountfsd from root, for example
from the tests where we just use a simple squashfs/erofs.
Note that this requires the caller to be root, and it will be rejected
otherwise, as such images are classified as 'unprotected' and the
enforced policy does not accept them for unprivileged users.

2 weeks agovmspawn: Add --bind-user= and --bind-user-shell= 38410/head
DaanDeMeyer [Mon, 14 Jul 2025 08:24:53 +0000 (10:24 +0200)] 
vmspawn: Add --bind-user= and --bind-user-shell=

We use virtiofsd ID translation to mimick idmapped mounts and the
transient userdb credentials to provision the mapped user in the VM.

2 weeks agovmspawn: Use machine_credential_add()
Daan De Meyer [Tue, 21 Oct 2025 19:38:18 +0000 (21:38 +0200)] 
vmspawn: Use machine_credential_add()

2 weeks agomachine-bind-user: Make home mount directory configurable
DaanDeMeyer [Fri, 22 Aug 2025 09:02:29 +0000 (11:02 +0200)] 
machine-bind-user: Make home mount directory configurable

2 weeks agomachine-bind-user: Use machine in log messages instead of container
DaanDeMeyer [Fri, 22 Aug 2025 08:52:17 +0000 (10:52 +0200)] 
machine-bind-user: Use machine in log messages instead of container

2 weeks agonspawn: Add --bind-user-shell= to --help
Daan De Meyer [Tue, 21 Oct 2025 19:31:29 +0000 (21:31 +0200)] 
nspawn: Add --bind-user-shell= to --help

2 weeks agoMissing policies for polkit as mentioned in freedesktop.org/software/systemd/man
theSillywhat [Sat, 18 Oct 2025 19:55:35 +0000 (15:55 -0400)] 
Missing policies for polkit as mentioned in freedesktop.org/software/systemd/man

2 weeks agoDisable abort in log_assert in libsystemd/libudev (#39307)
Zbigniew Jędrzejewski-Szmek [Wed, 22 Oct 2025 12:48:14 +0000 (14:48 +0200)] 
Disable abort in log_assert in libsystemd/libudev (#39307)

See the second commit for details.

I think we might want to apply the same treatment to nss and pam
modules. Asserting in such "plugin code" seems iffy. But this PR doesn't
change those in any way.

2 weeks agoshared/bus-get-properties: use sizeof instead of hardcoded size in bus_property_get_i... 39407/head
Mike Yuan [Sun, 5 Oct 2025 01:15:36 +0000 (03:15 +0200)] 
shared/bus-get-properties: use sizeof instead of hardcoded size in bus_property_get_id128()

Prompted by
https://github.com/systemd/systemd/pull/39210#discussion_r2404225907

2 weeks agolibsystemd-network/sd-lldp-tx: use SD_JSON_BUILD_PAIR_ID128
Mike Yuan [Sun, 5 Oct 2025 22:19:57 +0000 (00:19 +0200)] 
libsystemd-network/sd-lldp-tx: use SD_JSON_BUILD_PAIR_ID128

2 weeks agocoredump: split coredump.c into small pieces (#39351)
Lennart Poettering [Wed, 22 Oct 2025 11:37:51 +0000 (13:37 +0200)] 
coredump: split coredump.c into small pieces (#39351)

2 weeks agotree-wide: use setenvf() more, where appropriate
Lennart Poettering [Wed, 22 Oct 2025 07:44:56 +0000 (09:44 +0200)] 
tree-wide: use setenvf() more, where appropriate

2 weeks agoimport: support in --user mode (#39322)
Daan De Meyer [Wed, 22 Oct 2025 10:59:46 +0000 (12:59 +0200)] 
import: support in --user mode (#39322)

This is the first half of #38728, just the parts that immediately touch
importd to add a --user mode for it.