1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-20 18:04:03 +03:00

77986 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
3efa9e717f tmpfiles: reduce quoting in warning message
We printed:
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/20-systemd-shell-extra.conf:10: Unknown modifiers in command 'L$'.
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/systemd-network.conf:10: Unknown modifiers in command 'd$'.
systemd-tmpfiles[705]: /usr/lib/tmpfiles.d/systemd-network.conf:11: Unknown modifiers in command 'd$'.
...

There's a lot of additional characters here make the message harder to parse. We know
that the command is a word without any whitespace, so quoting isn't really necessary.

Change this to:
... unknown modifiers in command: L$

(cherry picked from commit 390bab53923eea822ac525d0e4aa4b7f86d8cd92)
2024-12-19 09:56:00 +00:00
Florian Schmaus
9d36809256 logind: let system-wide idle begin at the time logind was initialized
Initialize the start of the system-wide idle time with the time logind was
initialized and not with the start of the Unix epoch. This means that systemd
will not repport a unreasonable long idle time (around 54 years at the time of
writing this), especially at in the early boot, while no login manager session,
e.g,. gdm, had a chance to provide a more accurate start of the idle period.

Fixes #35163

(cherry picked from commit 718b31138b9a93f262259f297ad6b521454decc6)
2024-12-19 09:56:00 +00:00
Luca Boccassi
63b6d6aab1 shell-completion: add smbios11 verb to systemd-analyze
Follow-up for 8c5045f9b2681774e8731dc0d142c207b61aedf6

(cherry picked from commit e7fce6a370894de3a3ded32910e0a4b251d805df)
2024-12-19 09:55:11 +00:00
Luca Boccassi
1a259b4e60 mkosi: update debian commit reference
* e8b7c9a4dd Install 81-net-bridge.rules
* 50d2997a07 Install systemd-creds bash completion
* ff0c42823c test: fix flaky boot-and-services test
* 2a19dee4ba test: fix flaky boot-and-services test
* a15a0bfe60 Update changelog for 257-2 release
* c24eafcb7e Backport patches to fix test failures
* 29840f9b68 udev: install dmi_memory_id and its rules on riscv64
* 44893bdb32 Update changelog for 257-1 release
* 7f71d995fb Update symbols file for v257
* 2dd2b80499 Update upstream source from tag 'upstream/257'
* 51a3271a85 Update changelog for 257~rc3-1 release
* 8e687227c5 Update symbols for 257~rc3
* c9bae527d6 Drop patches, merged upstream
* e8cf329870 Update upstream source from tag 'upstream/257_rc3'
* 794457516d autopkgtest: fix one more tzdata dependency
* 16bb143da1 Bump version in tzdata dependency due to p-u upload
* f2ddf70604 sysctl: Add file trigger on /usr/lib/sysctl.d to restart systemd-sysctl
* 79260cb0f4 Increase minimum sections in stub PE header on arm64/armhf/riscv64 to 500
* ed3af24635 systemd-ukfy: recommend systemd-boot-efi for the stub

(cherry picked from commit 8d20606eec236232fb003594b3e6c88131744f6b)
2024-12-19 09:55:11 +00:00
Luca Boccassi
1fb4673a69 test-loop-block: return -77 on skip in more places
(cherry picked from commit 81e0693465402d2e72cb3ba1b28e25e3c4c0206a)
2024-12-19 09:55:11 +00:00
Luca Boccassi
29cdad871e battery-check: parse options before checking for kernel command line
Otherwise --help/--version/etc which exit immediately will do pointless work

(cherry picked from commit 60d23b7f4ae26d934e5748d30bb7ae956f3ad83d)
2024-12-19 09:55:11 +00:00
Luca Boccassi
1f6e192848 units: use PrivateTmp=disconnected instead of 'yes' if DefaultDependencies=no
Avoids subtle race conditions such as the one described at
#35582.

Fixes #35582

(cherry picked from commit 1ca315be0097bccc9ff55e09ac339a48fdb9a040)
2024-12-19 09:55:11 +00:00
Daan De Meyer
4162c331dd mkosi: Fix opensuse build
The opensuse spec still looks for README.testsuite so hack it to look
for README.md instead now that we changed the name in the repo.

(cherry picked from commit 3aa725732161f11788a51405f9c5204190e7a0e9)
2024-12-19 09:55:11 +00:00
Yu Watanabe
070c28a12a exec-util: allow to invoke polkit/ask-password agent even if STDIN is not a tty
Closes #35018.

(cherry picked from commit 0f81c8406f0f47175c699715e84de8291057033c)
2024-12-19 09:55:03 +00:00
Ronan Pigott
bcf740e4a3 manager: add list of subscribers to dump info
This is handy for debugging.

(cherry picked from commit 91713841491d0d4775566ed59f621f0f9a2413b5)
2024-12-19 09:55:03 +00:00
Ronan Pigott
c189ecc7fe dbus: log disconnect on api and system busses
This is an interesting event. Let's log about it.

(cherry picked from commit 11ee1bab60abde67cd0edc470c93c1afe10d975d)
2024-12-19 09:55:03 +00:00
Yu Watanabe
644f2a02c8 journalctl: honor --quiet with --setup-keys
Closes #35504.

(cherry picked from commit a5b2973850e5952b9dffdfa3f6a0ef486957cb17)
2024-12-19 09:55:03 +00:00
Luca Boccassi
3267661c62 meson.version: change to 257.1
This is used to detect in various CIs that we are on a stable branch,
so set the new version early, otherwise some scripts will think it's
running in main
2024-12-12 16:33:57 +00:00
Yu Watanabe
3b6b819a28 README: drop CentOS CI badges
CentOS CIs are disabled after ead814a0b0f64c572282b9e27a0a995893f10cf0.

(cherry picked from commit 1fe583861feb5796fa0be937dc7f4c2ce07bcde5)
2024-12-12 16:33:57 +00:00
Luca Boccassi
06467e1dbc test: add more coverage for extensions and verity
(cherry picked from commit c7fcb08324774c62bd2a786b03a7104a33049db6)
2024-12-12 16:33:57 +00:00
Luca Boccassi
c52f82b8d5 core: fix loading verity settings for MountImages=
The MountEntry logic was refactored to store the verity
settings, and updated for ExtensionImages=, but not for
MountImages=.

Follow-up for a1a40297dbfa5bcd926d1a19320deb73c033c6f5

(cherry picked from commit 59a83e11887e13a35d88fd7dc71a13b450433715)
2024-12-12 16:33:57 +00:00
Luca Boccassi
b256e149d4 shell completion: add systemd-creds
(cherry picked from commit 783f794e89996ae7f2ae1872d65c515a672437fa)
2024-12-12 16:33:57 +00:00
Luca Boccassi
e768cf55b1 semaphore: skip some tests
semaphore CI runs are always very close to the limit of 1hr, and often
time out when it's particularly oversubscribed.
Skip some low-value test cases to shorten the runtime.

(cherry picked from commit e19cae12ff2e832ce7d79aa483e1aa27ed0ea1f4)
2024-12-12 16:33:57 +00:00
Carlo Teubner
df38ba869c systemd-cryptenroll.xml: fix typo
(cherry picked from commit dfbd4d8bc5f18746051929e32f772078d6782e90)
2024-12-12 16:33:57 +00:00
cvlc12
926f5ab6bf man: update example in systemd-measure.xml (#35506)
In the example from systemd-measure(1), do not bind to PCR 7 in
addition to the PCR policy.

As long as this is still done by default, see #35280.

(cherry picked from commit 693038fce47a819c5eebeb4fce39c9ac991acf84)
2024-12-12 16:33:57 +00:00
Daan De Meyer
ab99950f1a test-bpf-restrict-fs: Migrate to new assertion macros
(cherry picked from commit 1c658c639db1c902266735754f2e2883fe67d1d9)
2024-12-12 16:33:57 +00:00
andrejpodzimek
9fad72cc52 Fixing VLAN ranges in man systemd.network.
Otherwise it doesn't hold that VLANs 100-400 are allowed (because 201-299 are disallowed).

(cherry picked from commit ae2f3af63962ba6e2f67cfce07c9fee61722e30e)
2024-12-12 16:33:57 +00:00
Tobias Klauser
6b90a13789 profile.d: don't bail if $SHELL_* variables are unset
If - for whatever reason - a script uses set -u (nounset) and includes
/etc/profile.d/70-systemd-shell-extra.sh (e.g. transitively via
/etc/profile) the script would fail with:

    /etc/profile.d/70-systemd-shell-extra.sh: line 15: SHELL_PROMPT_PREFIX: unbound variable

For example:

    $ cat > foo.sh <<EOF
    #!/bin/sh
    set -u

    source /etc/profile
    EOF
    $ chmod 700 foo.sh
    $ ./foo.sh
    /etc/profile.d/70-systemd-shell-extra.sh: line 15: SHELL_PROMPT_PREFIX: unbound variable

Fix this by using shell parameter substitution[^1] (which is a POSIX
shell concept) to set the $SHELL_* variables to the empty string if
undefined.

[^1]: https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/utilities/V3_chap02.html

(cherry picked from commit 12e33d332b3f8754f4d5d0d21d5d3f0de8adc54c)
2024-12-12 16:33:57 +00:00
Katariina Lounento
cd727031a4 man: document unprivileged is not for reading properties
Document the fact that read-only properties may not have the flag
SD_BUS_VTABLE_UNPRIVILEGED as that is not obvious especially given the
flag is accepted for writable properties.

Based on the check in `add_object_vtable_internal` called by
`sd_bus_add_object_vtable` (as of the current tip of the main branch
f7f5ba019206cacd486b0892fec76f70f525e04d):

    case _SD_BUS_VTABLE_PROPERTY: {
            [...]
            if ([...] ||
                [...]
                (v->flags & SD_BUS_VTABLE_UNPRIVILEGED && v->type == _SD_BUS_VTABLE_PROPERTY)) {
                    r = -EINVAL;
                    goto fail;
            }

(where `_SD_BUS_VTABLE_PROPERTY` means read-only property whereas
`_SD_BUS_VTABLE_WRITABLE_PROPERTY` maps to writable property).

This was implemented in the commit
adacb9575a09981fcf11279f2f661e3fc21e58ff ("bus: introduce "trusted" bus
concept and encode access control in object vtables") where
`SD_BUS_VTABLE_UNPRIVILEGED` was introduced:

    Writable properties are also subject to SD_BUS_VTABLE_UNPRIVILEGED
    and SD_BUS_VTABLE_CAPABILITY() for controlling write access to them.
    Note however that read access is unrestricted, as PropertiesChanged
    messages might send out the values anyway as an unrestricted
    broadcast.

(cherry picked from commit 3ca09aa4dd57327989eceb1298754601046ac041)
2024-12-12 16:33:57 +00:00
Luca Boccassi
e1659133e7 mkosi: use inetutils package instead of hostname for Archlinux
In Arch the hostname binary is in a different package

Follow-up for cf48bde7aea52b18ac3fa218d3f60fd3d533ef66

(cherry picked from commit 446d737cba3652a9f3dbd07cea9cb4082350b241)
2024-12-12 16:33:57 +00:00
Luca Boccassi
c026cecac3 test-fd-util: compare FDs to /bin/sh instead of /dev/null
/dev/null is a character device, so same_fd() in the fallback path
that compares fstat will fail, as that bails out if the fd refers
to a char device. This happens on kernels without F_DUPFD_QUERY and
without kcmp.

/* test_same_fd */
Assertion 'same_fd(d, e) > 0' failed at src/test/test-fd-util.c:111, function test_same_fd(). Aborting.

Fixes #35552

(cherry picked from commit 3b32d333e88f2a66651d58e32e01599fa84c3d19)
2024-12-12 16:33:57 +00:00
Luca Boccassi
5573ac7d9c test-fd-util: skip test when lacking privileges to create a new namespace
To reproduce, as an unprivileged user start a docker container and build
and run the unit tests inside it:

$ docker run --rm -ti debian:bookworm bash
...
/* test_close_all_fds */
Successfully forked off '(caf-plain)' as PID 10496.
Skipping PR_SET_MM, as we don't have privileges.
(caf-plain) succeeded.
Failed to fork off '(caf-noproc)': Operation not permitted
Assertion 'r >= 0' failed at src/test/test-fd-util.c:392, function test_close_all_fds(). Aborting.

Partially fixes #35552

(cherry picked from commit 630a2e7ee195ca96e102acac8df67a278a879124)
2024-12-12 16:33:57 +00:00
Luca Boccassi
d80ab6aed6 test-capability: CAP_LINUX_IMMUTABLE is not available in unprivileged containers
have ambient caps: yes
Capabilities:cap_chown,cap_dac_override,cap_fowner,cap_fsetid,cap_kill,cap_setgid,cap_setuid,cap_setpcap,cap_net_bind_service,cap_net_raw,cap_sys_chroot,cap_mknod,cap_audit_write,cap_setfcap=ep
Failed to drop auxiliary groups list: Operation not permitted
Failed to change group ID: Operation not permitted
Capabilities:cap_dac_override,cap_net_raw=ep
Capabilities:cap_dac_override=ep
Successfully forked off '(getambient)' as PID 12505.
Skipping PR_SET_MM, as we don't have privileges.
Ambient capability cap_linux_immutable requested but missing from bounding set, suppressing automatically.
Assertion 'x < 0 || FLAGS_SET(c, UINT64_C(1) << CAP_LINUX_IMMUTABLE)' failed at src/test/test-capability.c:273, function test_capability_get_ambient(). Aborting.
(getambient) terminated by signal ABRT.
src/test/test-capability.c:258: Assertion failed: expected "r" to succeed, but got error: Protocol error

Partially fixes #35552

(cherry picked from commit 058a07635f3ff70cc99943dcf4f2a079bc9c28b9)
2024-12-12 16:33:57 +00:00
Nick Rosbrook
1b945fb1a7 test: set nsec3-salt-length=8 in knot.conf
TEST-75-RESOLVED fails on Ubuntu autopkgtest due to this warning from
knot:

 notice: config, policy 'auto_rollover_nsec3' depends on default nsec3-salt-length=8, since version 3.5 the default becomes 0

Explicitly set nsec3-salt-length=8 to silence.

(cherry picked from commit 59e5108fb4e61957cb40bb15ac7966d085d13af2)
2024-12-12 16:33:57 +00:00
Lennart Poettering
bbeb07ad24 analyze: add missing --mask option to --help text
Follow-up for: 3e7a029c2856e7814b930443cc2d4fb089377592

(cherry picked from commit 4d09f976f6c10729619c7f4c87dd121aa34d019b)
2024-12-12 16:33:57 +00:00
Lennart Poettering
f4215e7909 analyze: tab fix
(cherry picked from commit 7167bee6c672f9a0729631ba1f7459dd5e18f549)
2024-12-12 16:33:57 +00:00
Antonio Alvarez Feijoo
2f2cd7a865 man/systemd-cryptenroll: sort --fido2-credential-algorithm after --fido2-device
And also fix a typo.

(cherry picked from commit 62b7b70bb78f85198509b3327cb29b83ed9218ec)
2024-12-12 16:33:57 +00:00
Yu Watanabe
1601149c5b test: also generate list of symbols from header files
To make the generated tests able to detect issues like #35554.

(cherry picked from commit 0b39dc23ba2d8d3e99f5dc30c3da5d0f6baf10d7)
2024-12-12 16:33:57 +00:00
Yu Watanabe
e231110a64 test: modernize generate-sym-test.py
(cherry picked from commit 6e399ece1fd6dc8cbf5830c263a118b58d36acac)
2024-12-12 16:33:57 +00:00
Yu Watanabe
d7eeb60cdf sd-json,sd-varlink: drop unexported functions from public headers
These functions are exported by e11f5aa7226253bf31b2ed61be8599bb213c1819
and 5fcabde35b8d2592e4ba3f4915839a54d2f246ba in upstream after v257.

Fixes #35554 in v257.
2024-12-12 16:33:57 +00:00
Luca Boccassi
217666530e
Create CNAME 2024-12-10 19:39:23 +00:00
Luca Boccassi
70bae7648f Finalize NEWS and meson.version for v257 v257 2024-12-10 19:23:45 +00:00
Luca Boccassi
97eccc4850
Chores for v257 (#35525) 2024-12-10 19:21:43 +00:00
Yu Watanabe
edd0a3c5e9 copy: do not try to copy zero size data
Hopefully fixes the following sanitizer issue:
===
[ 3754.797377] systemd-journald[776]: ../src/src/shared/copy.c:463:37: runtime error: variable length array bound evaluates to non-positive value 0
[ 3755.101713] systemd-journald[776]: Received SIGTERM from PID 1 (systemd).
[ 3755.124580] systemd-journald[776]: Journal stopped
Found 1 sanitizer issues (0 internal, 0 asan, 0 ubsan, 0 msan).
===
2024-12-10 19:20:50 +00:00
Yu Watanabe
a33813e9e9 TEST-07-PID: wait for sleep command being executed by sd-executor
Hopefully fixes #35528.
2024-12-10 19:19:54 +00:00
Luca Boccassi
29d1f4dbd0
sd-varlink: add function to configure server object info (#35519) 2024-12-10 15:26:24 +00:00
Luca Boccassi
9e5e1cf6ca NEWS: update list of contributors 2024-12-10 15:18:39 +00:00
Luca Boccassi
0d740f4bc0 Update hwdb
ninja -C build update-hwdb
2024-12-10 15:18:39 +00:00
Luca Boccassi
ab828def6d test: skip TEST-13-NSPAWN.nspawn/machined, TEST-86-MULTI-PROFILE-UKI and TEST-07-PID1.private-pids.sh
These new tests are flaky, so disable them temporarily, until after
the release, to avoid pushing out new flakiness to consumers. They
will be re-enabled immediately after.
2024-12-10 15:18:39 +00:00
Luca Boccassi
b8a34813b0 test: add TEST_SKIP_SUBTESTS/TEST_SKIP_TESTCASES
Inverse of the TEST_MATCH_SUBTEST/TEST_MATCH_TESTCASE variables
2024-12-10 15:18:39 +00:00
Luca Boccassi
18d2d10c17
Cryptenroll pager and tweaks (#35517) 2024-12-10 14:07:26 +00:00
Luca Boccassi
491b9a8575 test: use mkdir -p in TEST-25-IMPORT
[   15.896174] TEST-25-IMPORT.sh[473]: + mkdir /var/tmp/scratch
[   15.902524] TEST-25-IMPORT.sh[519]: mkdir: cannot create directory ‘/var/tmp/scratch’: File exists

https://github.com/systemd/systemd/actions/runs/12248114409/job/34167155679?pr=35520
2024-12-10 13:51:53 +00:00
Zbigniew Jędrzejewski-Szmek
40b4fd35d1
Update syscall tables (#35520) 2024-12-10 12:21:01 +01:00
Sebastian Gross
f0484e096c hostnamectl: respect SYSTEMD_COLORS
Instead of the wrapper functions the color defines where used directly.
This was especially a problem for ANSI_HIGHLIGHT_YELLOW which is not
legible at all for light themes such as solarized. The 16 color palette
fallback can be set to a sane yellow or orange on that matter but it was
not used though `SYSTEMD_COLORS=16` was set.

Use the proper wrapper functions and let the right color be selected the
way other components do it already.
2024-12-10 11:03:19 +01:00
Zbigniew Jędrzejewski-Szmek
da64932dc7 cryptsetup: add debug message 2024-12-10 10:58:58 +01:00