Commit Graph

83548 Commits

Author SHA1 Message Date
Luca Boccassi
01caeddbe3 Update syscall numbers
ninja -C build update-syscall-tables update-syscall-header
2025-09-17 09:48:00 +01:00
Luca Boccassi
106bdd888b hwdb: update
ninja -C build update-hwdb
2025-09-17 09:41:25 +01:00
Luca Boccassi
4dddcce874 machine: do not allow unprivileged users to register other users' processes as machines (#38911)
Registering a process as a machine means a caller can get machined to
send sigterm to it, and more. If an unpriv user is registering, ensure
the registered process has the same uid.

Follow-up for adaff8eb35
2025-09-16 17:59:45 +01:00
Luca Boccassi
77c48bf2f6 mkosi conf opensuse: ukify from systemd-ukify (#38942)
* openSUSE tumbleweed moves ukify tool from systemd-experimental to
systemd-ukify.

This is needed to for the TEST-86-MULTI-PROFILE-UKI
2025-09-16 17:58:56 +01:00
val4oss
8fe3bd54be mkosi conf opensuse: ukify from systemd-ukify
* openSUSE tumbleweed moves ukify tool from systemd-experimental to
  systemd-ukify.

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-16 17:10:46 +02:00
val4oss
be285a9918 mkosi: update opensuse commit reference to 7d9cf5c934705c175766eaa688baa503da84e06a
* 7d9cf5c9347 Update systemd to version 257.9 / rev 456 via SR 1303345
* 439d743e5d6 Update systemd to version 257.7 / rev 455 via SR 1297651
* 4f72c6a6279 Update systemd to version 257.7 / rev 454 via SR 1296831
* 3b0afa5c6d1 Update systemd to version 257.7 / rev 453 via SR 1294979
* d0eccd20f5a Update systemd to version 257.7 / rev 452 via SR 1292221
* f9d183f8c57 Update systemd to version 257.7 / rev 451 via SR 1291008
* cbd6908247d Update systemd to version 257.7 / rev 450 via SR 1289968
* 6e5c00f9f92 Update systemd to version 257.6 / rev 449 via SR 1286997

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-16 17:10:46 +02:00
Luca Boccassi
8324f9351c machine: add a comment to clarify that root_directory is informational only
To avoid any possible mistakes in the future, add a comment in the
object declaration
2025-09-16 15:58:28 +01:00
Luca Boccassi
e80394e193 man: clarify that machined RootDirectory parameter is informational only
It's basically just a label, it is not used for any purpose
2025-09-16 15:58:28 +01:00
Luca Boccassi
44e3c4c8bc machine: validate root directory over varlink
Use strict validation to reject invalid directories as the D-Bus
API already does

Follow-up for 5b44c81ff8
2025-09-16 15:58:28 +01:00
Luca Boccassi
119d332d9c machine: do not allow unprivileged users to register other users' processes as machines
Registering a process as a machine means a caller can get machined
to send sigterm to it, and more. If an unpriv user is registering,
ensure the registered process is actually owned by the user.

Follow-up for adaff8eb35
2025-09-16 15:58:28 +01:00
Luca Boccassi
892838911b generators: fix parameters naming in symlink helper
Coverity gets confused because the names were swapped. The parameters
are all passed in the right position, so there's no functional issue,
but the naming is confusing and trips static analyzers, so fix it.

CID#1621624

Follow-up for 8a9ab3dbbc
2025-09-16 16:50:22 +02:00
Andreas Schneider
775a31bdfa man: Update systemd-userdbd.service about .group extension 2025-09-16 16:13:22 +02:00
AsciiWolf
0125be8733 hwdb: add SDRplay devices
Also remove duplicate MiriSDR device that is just a cheap SDRplay RSP1 copy
2025-09-16 09:32:35 +01:00
Luca Boccassi
52ff4de962 Revert "TEST-55-OOMD: Verify that ExecStopPost= runs on oom-kill"
The test consistently fails on CentOS 9:

TEST-55-OOMD.sh[678]: + test -f /run/testbloat-exec-stop-post
[FAILED] Failed to start TEST-55-OOMD.service.

https://github.com/systemd/systemd/actions/runs/17689186773/job/50293446228?pr=38911

This reverts commit 5bf7438ff0.
2025-09-15 19:38:28 +01:00
Luca Boccassi
876c4c5129 test: call mksquashfs with -noappend to be safe on reruns
If the test VM reboots and the test re-runs, creating the images
fails as they already exist:

[  218.227766] TEST-50-DISSECT.sh[889]: + mksquashfs testkit/ testkit.raw
[  218.238754] TEST-50-DISSECT.sh[2964]: FATAL ERROR: Could not read $HOME, use -recovery-path or -no-recovery options
[  218.239284] TEST-50-DISSECT.sh[2964]: Found a valid exportable SQUASHFS superblock on testkit.raw.
[  218.239554] TEST-50-DISSECT.sh[2964]: 	Compression used gzip
[  218.240176] TEST-50-DISSECT.sh[2964]: 	Inodes are compressed
[  218.240459] TEST-50-DISSECT.sh[2964]: 	Data is compressed
[  218.241072] TEST-50-DISSECT.sh[2964]: 	Fragments are compressed
[  218.241526] TEST-50-DISSECT.sh[2964]: 	Xattrs are compressed
[  218.241953] TEST-50-DISSECT.sh[2964]: 	Fragments are present in the filesystem
[  218.242411] TEST-50-DISSECT.sh[2964]: 	Always-use-fragments option is not specified
[  218.242843] TEST-50-DISSECT.sh[2964]: 	Duplicates are removed
[  218.243560] TEST-50-DISSECT.sh[2964]: 	Xattrs are stored
[  218.243889] TEST-50-DISSECT.sh[2964]: 	Filesystem size 0.38 Kbytes (0.00 Mbytes)
[  218.244563] TEST-50-DISSECT.sh[2964]: 	Block size 131072
[  218.245051] TEST-50-DISSECT.sh[2964]: 	Number of fragments 1
[  218.245512] TEST-50-DISSECT.sh[2964]: 	Number of inodes 6
[  218.245851] TEST-50-DISSECT.sh[2964]: 	Number of ids 1
[  218.246393] TEST-50-DISSECT.sh[2964]: Parallel mksquashfs: Using 2 processors
[  218.246820] TEST-50-DISSECT.sh[2964]: Scanning existing filesystem...
[  218.247286] TEST-50-DISSECT.sh[2964]: Read existing filesystem, 5 inodes scanned
[  218.252974] TEST-50-DISSECT.sh[2964]: Appending to existing 4.0 filesystem on testkit.raw, block size 131072
[  218.253593] TEST-50-DISSECT.sh[2964]: All -b, -noI, -noD, -noF, -noX, -noId, -no-duplicates, -no-fragments,
[  218.253848] TEST-50-DISSECT.sh[2964]: -always-use-fragments, -exportable and -comp options ignored
[  218.257196] TEST-50-DISSECT.sh[2964]: If appending is not wanted, please re-run with -noappend specified!

https://github.com/systemd/systemd/actions/runs/17674609143/job/50233691148?pr=38867
2025-09-15 14:42:03 +01:00
Luca Boccassi
27833c409d test: consolidate checks for unpriv nspawn support in TEST-13-NSPAWN
[   69.058386] systemd-nspawn[4371]: varlink: Sending message: {"method":"io.systemd.NamespaceResource.AllocateUserRange","parameters":{"name":"nspawn-4371-zurps","mangleName":true,"size":65536,"userNamespaceFileDescriptor":0}}
[   69.058447] systemd-nsresourcework[4339]: varlink-6-6: Received message: {"method":"io.systemd.NamespaceResource.AllocateUserRange","parameters":{"name":"nspawn-4371-zurps","mangleName":true,"size":65536,"userNamespaceFileDescriptor":0}}
[   69.058455] systemd-nsresourcework[4339]: varlink-6-6: Changing state idle-server → processing-method
[   69.058479] systemd-nsresourcework[4339]: varlink-6-6: Sending message: {"error":"io.systemd.NamespaceResource.UserNamespaceInterfaceNotSupported","parameters":{}}
[   69.058482] systemd-nsresourcework[4339]: varlink-6-6: Changing state processing-method → processed-method
[   69.058486] systemd-nsresourcework[4339]: varlink-6-6: Changing state processed-method → idle-server
[   69.058599] systemd-nspawn[4371]: varlink: Received message: {"error":"io.systemd.NamespaceResource.UserNamespaceInterfaceNotSupported","parameters":{}}
[   69.058604] systemd-nspawn[4371]: varlink: Changing state calling → called
[   69.058609] systemd-nspawn[4371]: varlink: Changing state called → idle-client
[   69.058614] systemd-nspawn[4371]: Unprivileged user namespace delegation is not supported on this system.
[   69.058637] systemd-nsresourcework[4339]: varlink-6-6: Got POLLHUP from socket.
[   69.058647] systemd-nsresourcework[4339]: varlink-6-6: Changing state idle-server → pending-disconnect
[   69.058653] systemd-nsresourcework[4339]: varlink-6-6: Changing state pending-disconnect → processing-disconnect
[   69.058656] systemd-nsresourcework[4339]: varlink-6-6: Changing state processing-disconnect → disconnected
[   69.058698] systemd-nspawn[4371]: Failed to allocate user namespace with 64K users: Operation not supported
[   69.058779] systemd[4344]: systemd-nspawn@zurps.service: Got notification message from PID 4371: STOPPING=1, STATUS=Terminating...

Follow-up for bfd356da63
2025-09-15 15:39:05 +02:00
Luca Boccassi
310ab61139 meson: link with -Wl,-z,gcs-report-dynamic=none (#38901)
There is a botched arm64 linker transition going on, where a new feature
is enabled (GCS) and the linker fails the build unless all object files
being linked are built with the new specific feature. This was enabled
in the toolchain (GCC 15) _before_ all libraries were rebuilt, including
glibc, so everything fails. The toolchain maintainers declined to fix it
and instead say that this is a useless warning to have, and to just
disable it and ignore it.

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1110461
> systemd fails to build from source on arm64 if built with GCC-15, currently in
> experimental.
>
> GCC-15 includes support for an arm64 security feature called Guarded Control
> Stack (GCS). To help with GCS adoption, the linker warns about shared libraries
> built without GCS. For example:
>
> /usr/lib/gcc/aarch64-linux-gnu/15/../../../aarch64-linux-gnu/libncursesw.so.6:
> warning: GCS is required by -z gcs, but this shared library lacks the necessary property note.
> The dynamic loader might not enable GCS or refuse to load the program unless
> all the shared library dependencies have the GCS marking.
>
> The warning is harmless, and can be ignored. However, systemd is built with
> --fatal-warnings, and for this reason will fail to build on arm64 once GCC-15
> becomes the default compiler in Debian.

[585/3230] Linking target src/core/libsystemd-core-258.so
FAILED: src/core/libsystemd-core-258.so 
gcc  -o src/core/libsystemd-core-258.so  -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,-soname,libsystemd-core-258.so -Wl,--whole-archive -Wl,--start-group src/core/libsystemd-core-258.a -Wl,--no-whole-archive -fstack-protector -Wl,-z,relro -specs=/usr/share/debhelper/dh_package_notes/debian-package-notes.specs -g -O2 -Werror=implicit-function-declaration -ffile-prefix-map=/work/src=. -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -mbranch-protection=standard -O0 -g -Og -Wdate-time '-Wl,-rpath,$ORIGIN/../shared' src/shared/libsystemd-shared-258.so -shared -Wl,--version-script=/work/src/src/shared/libshared.sym /usr/lib/aarch64-linux-gnu/libacl.so /usr/lib/aarch64-linux-gnu/libaudit.so /usr/lib/aarch64-linux-gnu/libblkid.so -ldl -lm /usr/lib/aarch64-linux-gnu/libmount.so -lrt /usr/lib/aarch64-linux-gnu/libseccomp.so /usr/lib/aarch64-linux-gnu/libselinux.so -Wl,--end-group -pthread -Wl,--fatal-warnings -Wl,-z,now -Wl,-z,relro -Wl,--gc-sections -Wl,--warn-common
src/shared/libsystemd-shared-258.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libacl.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libaudit.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libblkid.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/aarch64-linux-gnu/libm.so.6: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/aarch64-linux-gnu/libmvec.so.1: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libmount.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libseccomp.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/usr/lib/aarch64-linux-gnu/libselinux.so: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/aarch64-linux-gnu/libc.so.6: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
/lib/ld-linux-aarch64.so.1: warning: GCS is required by -z gcs, but this shared library lacks the necessary property note. The dynamic loader might not enable GCS or refuse to load the program unless all the shared library dependencies have the GCS marking.
collect2: error: ld returned 1 exit status
2025-09-15 13:42:48 +02:00
Luca Boccassi
8fac2eb212 Revert "test: propagate log env vars in run-unit-tests.py wrapper"
The default is already to propagate the env vars, so this
was unnecessary and actually creates problem as it removes
custom PATHs

This reverts commit 994af53395.
2025-09-15 11:22:19 +02:00
Zbigniew Jędrzejewski-Szmek
8a9ab3dbbc generators: when creating symlinks, silently ignore existing links in one more place
After the update to systemd 257.7 in Fedora, there are reports that we fail to
create a symlink:
  systemd-gpt-auto-generator[585]: Failed to create symlink /run/systemd/generator/local-fs.target.wants/systemd-fsck-root.service: File exists
  (sd-exec-[574]: /usr/lib/systemd/system-generators/systemd-gpt-auto-generator failed with exit status 1.

I guess that some other generator created the symlink. We silently ignore
EEXIST in similar codepaths, so add that in one more place. (The target of the
symlink doesn't really matter. The name of the link matters. So something like
symlink_idempotent would not be better. For example, a different generator
might use a slightly different target path, and symlink_idempotent would be too
strict.)
2025-09-15 11:11:01 +02:00
AsciiWolf
bb4c00001d hwdb: add HydraSDR RFOne 2025-09-15 13:22:53 +09:00
anthisfan
778e95420a systemd-path: return accumulated error instead of last result
Because it returns the result of the final sd_path_lookup() call rather than the return value of RET_GATHER,
it appears that it may return success even if an error occurs during processing.

With this patch, errors encountered during the loop will be properly tallied and returned, and failures will not be silently ignored.

Signed-off-by: anthisfan <gtpgx305@gmail.com>
2025-09-14 22:18:19 +02:00
Luca Boccassi
a0203ac14c test: ensure journal dir is writable by container in TEST-13-NSPAWN
The systemd-journal group is not mapped, so ensure the test directory
is owned by root:root so that the mapping works.

Follow-up for 88fce09026
2025-09-14 13:23:17 +01:00
Luca Boccassi
e3f4aa4a75 shell-completion: add missing arguments for journalctl 2025-09-14 09:42:36 +01:00
Yu Watanabe
6c32948b25 dissect: include unistd.h
This is required by e.g. geteuid(), for the case when unistd.h is
indirectly included by other headers.

Continuation of 4f18ff2e29.
2025-09-14 09:47:30 +02:00
Daan De Meyer
5bf7438ff0 TEST-55-OOMD: Verify that ExecStopPost= runs on oom-kill 2025-09-13 00:20:56 +01:00
Luca Boccassi
f82d80da06 ansi-color: fix stack overflow with debug level and invalid SYSTEMD_COLORS env var
When SYSTEMD_COLORS is invalid, parse_systemd_colors() logs about it.
Logging helpers then call into parse_systemd_colors() to pretty-print
the log message, which then fails, so it logs about the failure,
rinse and repeat until segfault.

Follow-up for c8210d98a4
2025-09-12 10:58:26 +01:00
val4oss
6becea2859 mkosi conf opensuse: add libtss2-tcti-device0 dep
* Add the TPM recommended package for opensuse mkosi conf to fix the
  TEST-70-TPM failure.

Signed-off-by: val4oss <github.widget541@passmail.net>
2025-09-12 10:34:02 +01:00
Luca Boccassi
b7d3b45017 mkosi: pass through more toolchain flags 2025-09-12 10:31:32 +01:00
AsciiWolf
56347fe7f3 hwdb: add LimeSDR XTRX devices 2025-09-12 06:46:55 +09:00
AsciiWolf
69442f94b5 hwdb: add missing Ettus Research B200 rule
https://github.com/EttusResearch/uhd/blob/master/host/utils/uhd-usrp.rules#L18

Not sure why it was missing.
2025-09-11 18:41:26 +01:00
Luca Boccassi
f9bed8d52f test-namespace: more fixes (#38875) 2025-09-11 15:32:24 +01:00
Luca Boccassi
15818468f8 test: PR_DEATHSIG is reset after changing id/gid
Child processes are left hanging on abort() as these child procs
freeze(), so test suites hang as well when test-namespace fails,
and processes are leaked.

From the docs:

The parent-death signal setting is also cleared upon changes to any of
the following thread credentials: effective user ID, effective group ID,
filesystem user ID, or filesystem group ID.

Set the deathsig again after changing id.

Follow-up for 2ade821859
2025-09-11 13:37:34 +01:00
Luca Boccassi
aece4b0381 test: do not leave process hanging in test-namespace
It is killed when the main test process exists, but still,
it will be left hanging while other test cases run, so it's
not very clean.

Follow-up for 8b5e3be88e
2025-09-11 13:37:29 +01:00
Christopher Head
fafe447dcd ukify: fix backend/option applicability docs
The `SecureBootPrivateKey` and `SecureBootCertificate` options are used
by the `systemd-sbsign` backend, not just the `sbsign` backend.
2025-09-11 12:07:03 +01:00
Lennart Poettering
6b071ab14a todo - main 2025-09-11 11:30:52 +02:00
AsciiWolf
11c58b6774 hwdb: add MiriSDR MSi2500 devices 2025-09-11 09:58:49 +09:00
AsciiWolf
c61bdd79ef hwdb: add more devices
- FUNcube Dongle Pro
- Great Scott Gadgets HackRF
- Microtelecom Perseus
2025-09-11 08:44:48 +09:00
AsciiWolf
8fadcd15d3 hwdb: add Airspy devices 2025-09-11 07:27:07 +09:00
DeKoile
63254ed696 Update 60-sensor.hwdb - Add support for Lenovo Legion Go
This adds support for the 3D Accelerometer of the Lenovo Legion Go
2025-09-10 23:20:56 +01:00
Yu Watanabe
8685f8edd1 TEST-64-UDEV-STORAGE: forcibly create new physical volume
When the test VM is accidentally rebooted, there exists the previously
created volume, and the command fails with the following:
```
TEST-64-UDEV-STORAGE.sh[282]: + lvm pvcreate -y /dev/md/mdlvm
TEST-64-UDEV-STORAGE.sh[442]:   Can't initialize physical volume "/dev/md127" of volume group "mdlvm_vg" without -ff
TEST-64-UDEV-STORAGE.sh[442]:   /dev/md127: physical volume not initialized.
[FAILED] Failed to start TEST-64-UDEV-STORAGE-mdadm_lvm.service.
```
Let's ignore the existence of previous volume and forcibly create new one.

Workaround for issue #38240.
2025-09-11 00:06:33 +09:00
Luca Boccassi
994af53395 test: propagate log env vars in run-unit-tests.py wrapper
To make it easier to debug unit test failures
2025-09-10 14:34:01 +01:00
Luca Boccassi
e52a1acb81 test: exit from test child processes
Otherwise the child processes will continue, return to the test
main function, and try to run other test cases themselves:

<...>
/* test_namespace_get_leader */
PID hierarchy: 553438 ← 553459 ← 553460
/* test_detach_mount_namespace_harder */
/* test_detach_mount_namespace_harder */
/* test_detach_mount_namespace_harder */

Follow-up for 0b8b13324e
2025-09-10 00:27:14 +01:00
Martin Homuth-Rosemann
3efabf88cd Add Hantek DSO-6022 oscilloscopes and compatible devices
Signed-off-by: Martin Homuth-Rosemann <Ho-Ro@users.noreply.github.com>
2025-09-09 23:19:32 +01:00
Raura
d18a6c861d Remove mention of inactive Tanglu distro from systemd-nspawn man page (#38873)
Distribution seems inactive for a long time, and the mentioned website has disappeared.
https://distrowatch.com/table.php?distribution=tanglu
2025-09-09 22:19:46 +01:00
Luca Boccassi
9cc9e14ed4 test: remove extension from /var/lib/extensions at the end of the test
Otherwise it remains there, and another test case accidentally
uses it on refresh, which then makes another later test fail,
as the hierarchy is already merged:

[  203.969708] TEST-50-DISSECT.sh[890]: + systemd-sysext status
[  203.981831] TEST-50-DISSECT.sh[2795]: HIERARCHY EXTENSIONS SINCE
[  203.982196] TEST-50-DISSECT.sh[2795]: /opt      app0       Mon 2025-09-08 11:49:11 UTC
[  203.982551] TEST-50-DISSECT.sh[2795]: /usr      app0       Mon 2025-09-08 11:49:11 UTC

[  204.119772] TEST-50-DISSECT.sh[2799]: Hierarchy '/usr' is already merged.

Fixes https://github.com/systemd/systemd/issues/38282
2025-09-09 08:52:37 +02:00
Luca Boccassi
cb90434c2a bootctl: minor fixups (#38856) 2025-09-08 18:38:56 +01:00
Christian Hesse
e3b1743596 man/loader.conf: specify that default entry is id...
... which is the file name including literal suffix `.conf`.
2025-09-08 12:00:00 +01:00
Antonio Alvarez Feijoo
559da4a509 bash-completion/bootctl: add missing options and verb 2025-09-08 12:37:26 +02:00
Antonio Alvarez Feijoo
aa089759ad man/bootctl: replace reference to --no-variables with --variables=no 2025-09-08 12:32:13 +02:00
Antonio Alvarez Feijoo
5a70aa5315 bootctl: clarify that --secure-boot-auto-enroll requires a boolean value 2025-09-08 12:31:27 +02:00