]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 months agopcrextend: split out varlink server setup into its own function
Lennart Poettering [Wed, 6 Nov 2024 10:58:56 +0000 (11:58 +0100)] 
pcrextend: split out varlink server setup into its own function

10 months agosd-varlink: expose api to get input/output fd separately
Lennart Poettering [Thu, 7 Nov 2024 10:49:33 +0000 (11:49 +0100)] 
sd-varlink: expose api to get input/output fd separately

10 months agosystemctl: certainly ignore ENOENT in checking inhibitors
Yu Watanabe [Thu, 2 Jan 2025 12:15:02 +0000 (21:15 +0900)] 
systemctl: certainly ignore ENOENT in checking inhibitors

Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.

Follow-up for 084f361b509cbffe7ffd5ab6085469f76f799fe5 and
a1417e5563acb73a0accdc12b3af91e4ec1c7f46.

Note, ERRNO_IS_NEG_DISCONNECT() includes ENONET rather than ENOENT...
So, ENOENT needs to be handled explicitly.

Fixes #35757 and #35806.

10 months agomkosi: Allow disabling vcs-tag via environment variable
Daan De Meyer [Thu, 2 Jan 2025 12:11:48 +0000 (13:11 +0100)] 
mkosi: Allow disabling vcs-tag via environment variable

10 months agobash-completion/journalctl: list user units when --user is already specified (#35799)
Luca Boccassi [Thu, 2 Jan 2025 11:20:31 +0000 (11:20 +0000)] 
bash-completion/journalctl: list user units when --user is already specified (#35799)

Also, escape the current input before matching listed user units.

Fixes #35794.

10 months agoerrno-list: prefer strerrorname_np() as errno_to_name() provider
Mike Yuan [Tue, 31 Dec 2024 01:46:28 +0000 (02:46 +0100)] 
errno-list: prefer strerrorname_np() as errno_to_name() provider

10 months agobash-completion/journalctl: also escape the current input of user unit 35799/head
Yu Watanabe [Thu, 2 Jan 2025 02:50:38 +0000 (11:50 +0900)] 
bash-completion/journalctl: also escape the current input of user unit

Follow-up for cec82cb943d0fd23dd09309be62c6bcde6b47839.

10 months agobash-completion/journalctl: list user units when --user is already specified
Yu Watanabe [Thu, 2 Jan 2025 02:48:58 +0000 (11:48 +0900)] 
bash-completion/journalctl: list user units when --user is already specified

Follow-up for 52051dd84c45c745ca877d8893be6f71aa27bf97.
Fixes #35794.

10 months ago60-sensor.hwdb: Loosen model mask to include entire series
richfifeg [Mon, 30 Dec 2024 18:07:02 +0000 (10:07 -0800)] 
60-sensor.hwdb: Loosen model mask to include entire series

This sensor is the same for Asus's entire Q5##L series, so match accordingly.

Tested with my Q502LAB.

10 months agopo: Translated using Weblate (German)
Ettore Atalan [Mon, 30 Dec 2024 22:38:37 +0000 (23:38 +0100)] 
po: Translated using Weblate (German)

Currently translated at 96.8% (249 of 257 strings)

Co-authored-by: Ettore Atalan <atalanttore@googlemail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/de/
Translation: systemd/main

10 months agomkosi: switch to github mirror of openSUSE sources from build.opensuse.org (#35789)
Luca Boccassi [Mon, 30 Dec 2024 18:42:29 +0000 (18:42 +0000)] 
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org (#35789)

The commit history of
[src.opensuse.org](https://src.opensuse.org/pool/systemd/src/branch/devel)
has been reset again to 2015 (both branches, factory and devel)... this
is unusable for now. I'd suggest switching to the github mirror of
code.opensuse.org, maintained since 2019 (at least github is not down
that often and the commit history does not change).

10 months agomkosi: switch to github mirror of openSUSE sources from build.opensuse.org 35789/head
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 16:39:16 +0000 (17:39 +0100)] 
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org

The current src.opensuse.org is very unstable and commit hashes are reset (or
even removed) every now and then. While the official repo is not fixed, let's
move to a more stable source, the github mirror of code.opensuse.org, maintained
since 2019.

10 months agomkosi: add libopenssl devel package to openSUSE tools tree
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 16:38:36 +0000 (17:38 +0100)] 
mkosi: add libopenssl devel package to openSUSE tools tree

Otherwise, the build fails with:

```
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /mnt/work/src/systemd/upstream-fork/main/build-mkosi
ninja: Entering directory `/mnt/work/src/systemd/upstream-fork/main/build-mkosi'
[463/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
FAILED: src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
cc -Isrc/shared/libsystemd-shared-258.a.p -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-json -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-path -I../src/libsystemd/sd-resolve -I../src/libsystemd/sd-varlink -I/usr/include/blkid -I/usr/include/libmount -I/usr/include/p11-kit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=3 --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fPIC -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -fvisibility=default -MD -MQ src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -MF src/shared/libsystemd-shared-258.a.p/openssl-util.c.o.d -o src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -c ../src/shared/openssl-util.c
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_read’:
../src/shared/openssl-util.c:1395:65: error: implicit declaration of function ‘UI_method_get_ex_data’; did you mean ‘UI_method_get_reader’? [-Wimplicit-function-declaration]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~
      |                                                                 UI_method_get_reader
../src/shared/openssl-util.c:1395:65: warning: nested extern declaration of ‘UI_method_get_ex_data’ [-Wnested-externs]
../src/shared/openssl-util.c:1395:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                           ^
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_new’:
../src/shared/openssl-util.c:1479:13: error: implicit declaration of function ‘UI_method_set_ex_data’; did you mean ‘UI_method_set_reader’? [-Wimplicit-function-declaration]
 1479 |         if (UI_method_set_ex_data(ui->method, 0, &ui->request) == 0)
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             UI_method_set_reader
../src/shared/openssl-util.c:1479:13: warning: nested extern declaration of ‘UI_method_set_ex_data’ [-Wnested-externs]
[480/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/pkcs11-util.c.o
ninja: build stopped: subcommand failed.
```

10 months agoFollow-ups for recent PRs plus modernizations prompted thereby (#35760)
Mike Yuan [Mon, 30 Dec 2024 15:35:59 +0000 (16:35 +0100)] 
Follow-ups for recent PRs plus modernizations prompted thereby (#35760)

Please backport the first commit to stable.

10 months agomkosi: update openSUSE commit reference
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 10:00:07 +0000 (11:00 +0100)] 
mkosi: update openSUSE commit reference

Force-pushed as usual, now HEAD is v257.1.

10 months agoukify: fix typos
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 08:41:32 +0000 (09:41 +0100)] 
ukify: fix typos

10 months agoman: change "secureboot-private-key.pem" filename for consistency
cvlc12 [Sat, 28 Dec 2024 18:19:08 +0000 (19:19 +0100)] 
man: change "secureboot-private-key.pem" filename for consistency

10 months agoman: adjust description of PrivateUsers= so it is in line with reality
Michal Sekletar [Fri, 15 Nov 2024 22:08:37 +0000 (23:08 +0100)] 
man: adjust description of PrivateUsers= so it is in line with reality

When the option is not available unit will not even start so there is
no security risk.

Fixes #34983

10 months agotree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v) 35760/head
Mike Yuan [Thu, 26 Dec 2024 19:30:12 +0000 (20:30 +0100)] 
tree-wide: replace FLAGS_SET(..., 1 << v) with BIT_SET(..., v)

10 months agoshared/condition: use BIT_SET where appropriate
Mike Yuan [Thu, 26 Dec 2024 18:53:23 +0000 (19:53 +0100)] 
shared/condition: use BIT_SET where appropriate

10 months agocapability-util: make CAPABILITY_QUINTET_NULL const, introduce capability_quintet_is_...
Mike Yuan [Tue, 24 Dec 2024 15:59:48 +0000 (16:59 +0100)] 
capability-util: make CAPABILITY_QUINTET_NULL const, introduce capability_quintet_is_fully_set() helper

Follow-up for 1184626a269e38dcdfcd1042975a31d4eb30cd5e

See 9bb64f1b8d2252d558f209a04b171d65b5ef131b for rationale
of the first change.

10 months agocapability-util: minor modernizations
Mike Yuan [Thu, 26 Dec 2024 18:53:12 +0000 (19:53 +0100)] 
capability-util: minor modernizations

10 months agosd-varlink: add missing error check in sd_varlink_listen_auto()
Mike Yuan [Wed, 25 Dec 2024 14:23:19 +0000 (15:23 +0100)] 
sd-varlink: add missing error check in sd_varlink_listen_auto()

Follow-up for 50994b2f91093079917e01d04004425f101327ba

10 months agocore/unit-serialize: fix serialization of markers
Mike Yuan [Thu, 26 Dec 2024 20:15:44 +0000 (21:15 +0100)] 
core/unit-serialize: fix serialization of markers

Follow-up for ff68472a20c208121b69ea13586f3105a219bc14

10 months agolocale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged
Yu Watanabe [Sat, 28 Dec 2024 06:07:31 +0000 (15:07 +0900)] 
locale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged

Previously, when /etc/locale.conf is unchanged, locales were loaded from
possibly outdated environment variable.

Fixes a bug introduced by 018befcff6b51f8a50ca232e1984d34526037241 (v253).
Fixes #35717.

10 months agomachine: GC machine when no leader PID is set
Yu Watanabe [Sat, 28 Dec 2024 02:38:24 +0000 (11:38 +0900)] 
machine: GC machine when no leader PID is set

After d8854ff1aca4434db0d7d6dcaf9fcf2f38105fb4, if a serialized
leader PID of a machine is already dead when deserialized, then the
leader PID and PIDFD are unset for the machine, and subsequent
machine_start() -> machine_watch_pidfd() will trigger an assertion.
This makes a Machine object without leader PID GCed.

Fixes a bug introduced by the combination of
d8854ff1aca4434db0d7d6dcaf9fcf2f38105fb4 (v255) and
1762c2c045d3a78d3cad54c6b1e5ee9624b32b00 (v257).

Fixes #35602.

10 months agoTEST-74-AUX: add reproducer of issue #35746
Yu Watanabe [Sat, 28 Dec 2024 03:06:24 +0000 (12:06 +0900)] 
TEST-74-AUX: add reproducer of issue #35746

Addresses https://github.com/systemd/systemd/pull/35752#pullrequestreview-2523080117.

10 months agosystemctl: also ignore ENOENT in checking inhibitors
Yu Watanabe [Sat, 28 Dec 2024 04:36:32 +0000 (13:36 +0900)] 
systemctl: also ignore ENOENT in checking inhibitors

Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.
Follow-up for a1417e5563acb73a0accdc12b3af91e4ec1c7f46.
Fixes #35757.

10 months agologs-show: skip journal entry with an invalid timestamp (#35774)
Yu Watanabe [Sat, 28 Dec 2024 11:34:15 +0000 (20:34 +0900)] 
logs-show: skip journal entry with an invalid timestamp (#35774)

Fixes #35737.

10 months agostring-util: modernize split_pair()
Yu Watanabe [Sat, 21 Dec 2024 18:34:43 +0000 (03:34 +0900)] 
string-util: modernize split_pair()

- use _cleanup_free_ attribute,
- rename output arguments,
- trigger assertion when an empty separator is passed.

10 months agofuzz-journal-remote: use ASSERT_OK() and friends 35774/head
Yu Watanabe [Sat, 28 Dec 2024 05:17:47 +0000 (14:17 +0900)] 
fuzz-journal-remote: use ASSERT_OK() and friends

10 months agologs-show: skip journal entry with an invalid timestamp
Yu Watanabe [Sat, 28 Dec 2024 05:09:22 +0000 (14:09 +0900)] 
logs-show: skip journal entry with an invalid timestamp

Follow-up for 275e6be052e690adcad5d2a557acb9dcb5bedbc6.
Fixes oss-fuzz#385221809 (https://issues.oss-fuzz.com/issues/385221809).
Fixes #35737.

10 months agoGrammar fixes to manpages (#35753)
Yu Watanabe [Sat, 28 Dec 2024 03:46:56 +0000 (12:46 +0900)] 
Grammar fixes to manpages (#35753)

Fix some missing commas, missing conjunction words, wrong
inflections, and trim excess parenthesizing.

10 months agodocs: Clarify requirement
Alexander Krabler [Fri, 27 Dec 2024 17:29:57 +0000 (18:29 +0100)] 
docs: Clarify requirement

10 months agocreds: fix use-after-free in varlink interface
Luca Boccassi [Fri, 27 Dec 2024 15:06:39 +0000 (15:06 +0000)] 
creds: fix use-after-free in varlink interface

All other usages of sd_varlink_call* do not free the json return parameter,
and it is owned by the varlink object instead. Do the same here.

TEST-54-CREDS.sh[1074]: ==1074==ERROR: AddressSanitizer: heap-use-after-free on address 0x50c00000095a at pc 0x55cf8cd18a0f bp 0x7ffd7b9d4f10 sp 0x7ffd7b9d4f08
TEST-54-CREDS.sh[1074]: READ of size 2 at 0x50c00000095a thread T0 ((sd-mkdcreds))
TEST-54-CREDS.sh[1074]:     #0 0x55cf8cd18a0e in sd_json_variant_unref /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:887:16
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd4cecb in varlink_clear_current /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:593:22
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cd4975e in varlink_clear /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:614:9
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cd3dc3c in varlink_destroy /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:651:9
TEST-54-CREDS.sh[1074]:     #4 0x55cf8cd3dc3c in sd_varlink_unref /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:657:1
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cb47a82 in sd_varlink_unrefp /usr/src/debug/systemd/src/systemd/sd-varlink.h:279:1
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cb47a82 in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1660:1
TEST-54-CREDS.sh[1074]:     #7 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #9 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #10 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #12 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #13 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #14 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #15 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #16 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #17 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: 0x50c00000095a is located 26 bytes inside of 120-byte region [0x50c000000940,0x50c0000009b8)
TEST-54-CREDS.sh[1074]: freed by thread T0 ((sd-mkdcreds)) here:
TEST-54-CREDS.sh[1074]:     #0 0x7f64b48d57ea in free (/usr/lib/clang/19/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so+0xd57ea) (BuildId: c59bbd28ceb74038a60373d4a8cd4c258bcf0b4e)
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd188ab in sd_json_variant_unref /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:895:25
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cb47a4c in sd_json_variant_unrefp /usr/src/debug/systemd/src/systemd/sd-json.h:98:1
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cb47a4c in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1660:1
TEST-54-CREDS.sh[1074]:     #4 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #7 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #9 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #10 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #12 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #13 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #14 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: previously allocated by thread T0 ((sd-mkdcreds)) here:
TEST-54-CREDS.sh[1074]:     #0 0x7f64b48d5a83 in malloc (/usr/lib/clang/19/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so+0xd5a83) (BuildId: c59bbd28ceb74038a60373d4a8cd4c258bcf0b4e)
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd16bb7 in malloc_multiply /usr/src/debug/systemd/src/basic/alloc-util.h:119:16
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cd16bb7 in sd_json_variant_new_object /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:737:13
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cd32e58 in json_parse_internal /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3161:29
TEST-54-CREDS.sh[1074]:     #4 0x55cf8cd37326 in sd_json_parse_with_source /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3408:16
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cd37326 in sd_json_parse /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3437:16
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cd3f753 in varlink_parse_message /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:962:13
TEST-54-CREDS.sh[1074]:     #7 0x55cf8cd3f753 in sd_varlink_process /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:1466:13
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cd4c0a9 in sd_varlink_call_full /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2160:21
TEST-54-CREDS.sh[1074]:     #9 0x55cf8cd4d617 in sd_varlink_callb_ap /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2237:16
TEST-54-CREDS.sh[1074]:     #10 0x55cf8cd4da3c in sd_varlink_callb /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2251:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8cb47686 in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1623:13
TEST-54-CREDS.sh[1074]:     #12 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #13 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #14 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #15 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #16 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #17 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #18 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #19 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #20 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #21 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #22 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: SUMMARY: AddressSanitizer: heap-use-after-free /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:887:16 in sd_json_variant_unref
TEST-54-CREDS.sh[1074]: Shadow bytes around the buggy address:
TEST-54-CREDS.sh[1074]:   0x50c000000680: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
TEST-54-CREDS.sh[1074]:   0x50c000000780: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
TEST-54-CREDS.sh[1074]:   0x50c000000800: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
TEST-54-CREDS.sh[1074]: =>0x50c000000900: fa fa fa fa fa fa fa fa fd fd fd[fd]fd fd fd fd
TEST-54-CREDS.sh[1074]:   0x50c000000980: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000b00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]: Shadow byte legend (one shadow byte represents 8 application bytes):
TEST-54-CREDS.sh[1074]:   Addressable:           00
TEST-54-CREDS.sh[1074]:   Partially addressable: 01 02 03 04 05 06 07
TEST-54-CREDS.sh[1074]:   Heap left redzone:       fa
TEST-54-CREDS.sh[1074]:   Freed heap region:       fd
TEST-54-CREDS.sh[1074]:   Stack left redzone:      f1
TEST-54-CREDS.sh[1074]:   Stack mid redzone:       f2
TEST-54-CREDS.sh[1074]:   Stack right redzone:     f3
TEST-54-CREDS.sh[1074]:   Stack after return:      f5
TEST-54-CREDS.sh[1074]:   Stack use after scope:   f8
TEST-54-CREDS.sh[1074]:   Global redzone:          f9
TEST-54-CREDS.sh[1074]:   Global init order:       f6
TEST-54-CREDS.sh[1074]:   Poisoned by user:        f7
TEST-54-CREDS.sh[1074]:   Container overflow:      fc
TEST-54-CREDS.sh[1074]:   Array cookie:            ac
TEST-54-CREDS.sh[1074]:   Intra object redzone:    bb
TEST-54-CREDS.sh[1074]:   ASan internal:           fe
TEST-54-CREDS.sh[1074]:   Left alloca redzone:     ca
TEST-54-CREDS.sh[1074]:   Right alloca redzone:    cb

Follow-up for 2c3cbc5c018e05b3a3e5ec6c6a2da6f3c6c3fb09

10 months agomkosi: update opensuse spec repo commit
Luca Boccassi [Thu, 26 Dec 2024 12:08:34 +0000 (12:08 +0000)] 
mkosi: update opensuse spec repo commit

10 months agotree-wide: add missing header for glibc < 2.34 (#35756)
Luca Boccassi [Thu, 26 Dec 2024 12:24:26 +0000 (12:24 +0000)] 
tree-wide: add missing header for glibc < 2.34 (#35756)

`unistd.h` gets into the dependency tree via
`/usr/include/bits/sigstksz.h`, which was added with glibc-2.34.

10 months agoptyfwd: fix draining on exit (#35752)
Daan De Meyer [Thu, 26 Dec 2024 10:53:46 +0000 (11:53 +0100)] 
ptyfwd: fix draining on exit (#35752)

Fixes a bug introduced by #35663.
Fixes #35746.

10 months agoudevd: add missing header for glibc < 2.34 35756/head
Antonio Alvarez Feijoo [Thu, 26 Dec 2024 10:02:55 +0000 (11:02 +0100)] 
udevd: add missing header for glibc < 2.34

```
[77/1697] Compiling C object udevadm.p/src_udev_udevd.c.o
FAILED: udevadm.p/src_udev_udevd.c.o
cc -Iudevadm.p -I. -I.. -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-json -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-path -I../src/libsystemd/sd-resolve -I../src/libsystemd/sd-varlink -Isrc/shared -I../src/shared -I/usr/include/blkid -I/usr/include/kmod -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fno-strict-aliasing -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -MD -MQ udevadm.p/src_udev_udevd.c.o -MF udevadm.p/src_udev_udevd.c.o.d -o udevadm.p/src_udev_udevd.c.o -c ../src/udev/udevd.c
../src/udev/udevd.c: In function ‘run_udevd’:
../src/udev/udevd.c:67:23: error: implicit declaration of function ‘fork’ [-Werror=implicit-function-declaration]
   67 |                 pid = fork();
      |                       ^~~~
../src/udev/udevd.c:75:24: error: implicit declaration of function ‘setsid’; did you mean ‘setbit’? [-Werror=implicit-function-declaration]
   75 |                 (void) setsid();
      |                        ^~~~~~
      |                        setbit
../src/udev/udevd.c:75:24: warning: nested extern declaration of ‘setsid’ [-Wnested-externs]
```

Follow-up for 394a678aec3b8bba0f0b1a8d7b9427c62468fe68

10 months agovmspawn-register: add missing header for glibc < 2.34
Antonio Alvarez Feijoo [Thu, 26 Dec 2024 10:02:34 +0000 (11:02 +0100)] 
vmspawn-register: add missing header for glibc < 2.34

Fixes #35755

10 months agoman: grammar fixes for userdbctl(1) 35753/head
Jan Engelhardt [Wed, 25 Dec 2024 15:08:49 +0000 (16:08 +0100)] 
man: grammar fixes for userdbctl(1)

10 months agoman: grammar fixes for varlinkctl(1)
Jan Engelhardt [Wed, 25 Dec 2024 11:30:47 +0000 (12:30 +0100)] 
man: grammar fixes for varlinkctl(1)

Fix some missing commas, missing conjunction words, wrong
inflections, and trim excess parenthesizing.

10 months agoman: grammar fixes for introductory adverbs/phrases
Jan Engelhardt [Wed, 25 Dec 2024 16:07:17 +0000 (17:07 +0100)] 
man: grammar fixes for introductory adverbs/phrases

10 months agoman: expand word contractions
Jan Engelhardt [Wed, 25 Dec 2024 15:13:02 +0000 (16:13 +0100)] 
man: expand word contractions

For written text, contractions are not normally used.

10 months agoman: grammar fixes for "regardless"
Jan Engelhardt [Wed, 25 Dec 2024 15:59:15 +0000 (16:59 +0100)] 
man: grammar fixes for "regardless"

10 months agoman: grammar fixes: replace "respectively"
Jan Engelhardt [Wed, 25 Dec 2024 11:28:04 +0000 (12:28 +0100)] 
man: grammar fixes: replace "respectively"

Unlike the German "bzw.", "respectively" cannot be used as an infix,
and is not abbreviated either.

10 months agoptyfwd: try to drain on exit only once 35752/head
Yu Watanabe [Wed, 25 Dec 2024 08:38:54 +0000 (17:38 +0900)] 
ptyfwd: try to drain on exit only once

Reading or writing a fd may fail with EBUSY, and the loop might run
without doing mostly nothing and the event loop may finish with ELOOP.

10 months agoptyfwd,run: process remaining outputs in IO event sources
Yu Watanabe [Wed, 25 Dec 2024 08:40:04 +0000 (17:40 +0900)] 
ptyfwd,run: process remaining outputs in IO event sources

This partially reverts 12807b5a49d1fe60434d473afe11ff81a4c92306.

Otherwise, reading or writing a fd in on_exit_event() handler may return
EBUSY, and the event loop may finish with -ELOOP.

Also, this makes drained() returns true if the PTY forwarder is already
disconnected, for safety. Hence, it is not necessary to re-introduce
pty_forward_is_done().

10 months agoptyfwd: fix infinite loop
Yu Watanabe [Wed, 25 Dec 2024 05:10:11 +0000 (14:10 +0900)] 
ptyfwd: fix infinite loop

This makes we exit from the loop in do_shovel() when
PTYForward.out_buffer_write_len is zero but PTYForward.out_buffer_full
is non-zero.

Fixes a bug introduced by 5e6a48bf99d2adb3c9d22414197a593f2aa8a121.
Fixes #35746.

10 months agoDrop legacy glibc version check and inclusion of linux/memfd.h (#35748)
Yu Watanabe [Wed, 25 Dec 2024 04:58:02 +0000 (13:58 +0900)] 
Drop legacy glibc version check and inclusion of linux/memfd.h (#35748)

10 months agodocs: Explicitly mention ~/.local/bin in section on installing mkosi
Daan De Meyer [Mon, 23 Dec 2024 20:30:32 +0000 (21:30 +0100)] 
docs: Explicitly mention ~/.local/bin in section on installing mkosi

10 months agodocs: Use meson compile instead of ninja
Daan De Meyer [Tue, 24 Dec 2024 08:53:53 +0000 (09:53 +0100)] 
docs: Use meson compile instead of ninja

"ninja -C build mkosi" doesn't actually work and fails because ninja
thinks the mkosi target does not exist. "meson compile -C build mkosi"
dpes work so let's use that instead.

Fixes #35741

10 months agopo: Translated using Weblate (Italian)
Salvatore Cocuzza [Tue, 24 Dec 2024 03:29:00 +0000 (04:29 +0100)] 
po: Translated using Weblate (Italian)

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Salvatore Cocuzza <info@salvatorecocuzza.it>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/it/
Translation: systemd/main

10 months agotree-wide: drop inclusion of linux/memfd.h 35748/head
Mike Yuan [Tue, 24 Dec 2024 15:52:08 +0000 (16:52 +0100)] 
tree-wide: drop inclusion of linux/memfd.h

We carry our own definitions in missing_mman.h, and otherwise
sys/mman.h is employed. Let's drop the unneeded detection/inclusion
of linux/memfd.h hence.

10 months agobasic/missing_threads: drop glibc < 2.16 check
Mike Yuan [Tue, 24 Dec 2024 15:50:05 +0000 (16:50 +0100)] 
basic/missing_threads: drop glibc < 2.16 check

glibc 2.16 has been our baseline for ~10y
(c.f. 3dd26f3e3aa7fa0696d304e14551362133dd281f)

10 months agomachine: add debugging info to trace #35115
Ivan Kruglov [Fri, 20 Dec 2024 15:16:56 +0000 (16:16 +0100)] 
machine: add debugging info to trace #35115

10 months agomeson: sort source files
Yu Watanabe [Sat, 21 Dec 2024 16:36:54 +0000 (01:36 +0900)] 
meson: sort source files

10 months agoUse device3.xml for testing chid_match
Ani Sinha [Sun, 22 Dec 2024 14:03:04 +0000 (19:33 +0530)] 
Use device3.xml for testing chid_match

device3.xml was not used. Use it now.

10 months agosd-varlink: add sd_varlink_server_listen_name (#35697)
Thorsten Kukuk [Sat, 21 Dec 2024 07:53:07 +0000 (08:53 +0100)] 
sd-varlink: add sd_varlink_server_listen_name (#35697)

10 months agoshell-completion: add bash completion for userdbctl (#35720)
Joey Holtzman [Sun, 22 Dec 2024 17:24:12 +0000 (11:24 -0600)] 
shell-completion: add bash completion for userdbctl (#35720)

Closes #35660.

10 months agotest: answer 2nd mdadm --create question for compat with new version
Luca Boccassi [Sun, 22 Dec 2024 13:31:36 +0000 (13:31 +0000)] 
test: answer 2nd mdadm --create question for compat with new version

New version of mdadm now asks a second question, so send 'y' twice
to it in the test scripts

[    5.253483] TEST-64-UDEV-STORAGE.sh[684]: + echo y
[    5.254412] TEST-64-UDEV-STORAGE.sh[685]: + mdadm --create /dev/md/mdmirror --name mdmirror --uuid aaaaaaaa:bbbbbbbb:cccccccc:00000001 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm0 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm1 -v -f --level=1 --raid-devices=2
[    5.254759] TEST-64-UDEV-STORAGE.sh[685]: To optimalize recovery speed, it is recommended to enable write-indent bitmap, do you want to enable it now? [y/N]? mdadm: Note: this array has metadata at the start and
[    5.255085] TEST-64-UDEV-STORAGE.sh[685]:     may not be suitable as a boot device.  If you plan to
[    5.255418] TEST-64-UDEV-STORAGE.sh[685]:     store '/boot' on this device please ensure that
[    5.255745] TEST-64-UDEV-STORAGE.sh[685]:     your boot-loader understands md/v1.x metadata, or use
[    5.256285] TEST-64-UDEV-STORAGE.sh[685]:     --metadata=0.90
[    5.256672] TEST-64-UDEV-STORAGE.sh[685]: mdadm: size set to 64512K
[    5.257063] TEST-64-UDEV-STORAGE.sh[685]: Continue creating array [y/N]? mdadm: create aborted.

This is backward compatible with the older version that asks just one
question

10 months agoRemove leftover .gitmodules file
Daan De Meyer [Sat, 21 Dec 2024 20:21:42 +0000 (21:21 +0100)] 
Remove leftover .gitmodules file

10 months agomkosi: Fix authselect systemd-homed feature name
Daan De Meyer [Sat, 21 Dec 2024 18:10:42 +0000 (19:10 +0100)] 
mkosi: Fix authselect systemd-homed feature name

The feature name is with-systemd-homed, not with-homed.

10 months agosystemd-homed: Give access to /dev/btrfs-control
Daan De Meyer [Sat, 21 Dec 2024 16:52:03 +0000 (17:52 +0100)] 
systemd-homed: Give access to /dev/btrfs-control

Otherwise, we see "WARNING: failed to open /dev/btrfs-control,
skipping device registration: Operation not permitted" in systemd-homed's
logs when creating a btrfs on luks home.

10 months agounits: Order systemd-oomd after systemd-sysusers
Daan De Meyer [Sat, 21 Dec 2024 16:01:27 +0000 (17:01 +0100)] 
units: Order systemd-oomd after systemd-sysusers

systemd-sysusers might create the systemd-oom system user that
systemd-oomd runs under so let's order systemd-oomd after
systemd-sysusers.

10 months agohwdb: comment out the entry for Logitech MX Keys for Mac
Yu Watanabe [Fri, 20 Dec 2024 18:13:18 +0000 (03:13 +0900)] 
hwdb: comment out the entry for Logitech MX Keys for Mac

This effectively reverts the commit f70e5620b6ac319beac1d5ce26331bdc48d25daa,
as the entry seems to match multiple models.

Fixes #35691.

10 months agoimage-discovery: add per-user scope (#35510)
Lennart Poettering [Fri, 20 Dec 2024 21:12:35 +0000 (22:12 +0100)] 
image-discovery: add per-user scope (#35510)

10 months agopid1: complete per-user credentials support (#35536)
Lennart Poettering [Fri, 20 Dec 2024 21:12:08 +0000 (22:12 +0100)] 
pid1: complete per-user credentials support (#35536)

Fixes: #33887 #33796 #33318
10 months agoanalyze: extend CHID support to more types (#35699)
Lennart Poettering [Fri, 20 Dec 2024 21:11:39 +0000 (22:11 +0100)] 
analyze: extend CHID support to more types (#35699)

Let's implement the spec more comprehensively.

This is piece by piece work, There's more to do on the EFI side before
all CHID types are supported, but in userspace it should be reasonably
complete now.

10 months agoVarious mkosi improvements (#35684)
Daan De Meyer [Fri, 20 Dec 2024 20:24:51 +0000 (21:24 +0100)] 
Various mkosi improvements (#35684)

10 months agodocs: Simplify hacking documentation 35684/head
Daan De Meyer [Thu, 19 Dec 2024 10:45:01 +0000 (11:45 +0100)] 
docs: Simplify hacking documentation

Let's use "mkosi sandbox" in the docs so that users can build systemd
without having to install anything except mkosi. Using mkosi sandbox
will use tools and dependencies from the tools tree which is also used
in CI and thus has a higher chance of working from the first try compared
to whatever tools might be installed on the host system of a new contributor.

10 months agomkosi.clangd: Fail on command errors
Daan De Meyer [Thu, 19 Dec 2024 14:05:51 +0000 (15:05 +0100)] 
mkosi.clangd: Fail on command errors

10 months agomkosi.clangd: Don't pass --host if we're not using flatpak-spawn
Daan De Meyer [Thu, 19 Dec 2024 14:05:33 +0000 (15:05 +0100)] 
mkosi.clangd: Don't pass --host if we're not using flatpak-spawn

10 months agomkosi: Use build/ as extra search path by default
Daan De Meyer [Thu, 19 Dec 2024 10:43:01 +0000 (11:43 +0100)] 
mkosi: Use build/ as extra search path by default

Building systemd with mkosi generally requires a very recent version
of systemd which might not be installed on the host. Let's configure
mkosi to look for extra executables in the build/ directory by default
so that we prefer systemd executables from the build directory over those
on the host as those on the host are likely to be too old.

10 months agomkosi: Use tools tree by default
Daan De Meyer [Thu, 19 Dec 2024 10:41:40 +0000 (11:41 +0100)] 
mkosi: Use tools tree by default

Let's enable usage of a tools tree by default to simplify the setup
for new contributors and save them from having to install or upgrade
a bunch of extra tools to get mkosi working as expected.

10 months agomkosi: Enable EPEL for CentOS Stream tools tree
Daan De Meyer [Thu, 19 Dec 2024 15:49:59 +0000 (16:49 +0100)] 
mkosi: Enable EPEL for CentOS Stream tools tree

We need packages from EPEL to be able to build CentOS Stream images
with a CentOS Stream tools tree so enable it. This is broken on CentOS
Stream 10 but given using a CentOS Stream tools tree is broken without
EPEL as well, we might as well enable it and just wait until the packages
are added to EPEL 10.

10 months agomkosi: Add libz1 to opensuse tools tree
Daan De Meyer [Thu, 19 Dec 2024 13:43:48 +0000 (14:43 +0100)] 
mkosi: Add libz1 to opensuse tools tree

Without meson fails to configure properly.

10 months agomkosi: Add gdb to tools tree
Daan De Meyer [Thu, 19 Dec 2024 10:32:51 +0000 (11:32 +0100)] 
mkosi: Add gdb to tools tree

10 months agodocs: Move fuzzers documentation to test README.md
Daan De Meyer [Thu, 19 Dec 2024 10:26:25 +0000 (11:26 +0100)] 
docs: Move fuzzers documentation to test README.md

10 months agocoverage: Run on pull request in a few cases
Daan De Meyer [Fri, 20 Dec 2024 09:21:12 +0000 (10:21 +0100)] 
coverage: Run on pull request in a few cases

If we're changing the integration test wrapper or coverage.yml, let's
run the coverage workflow on PRs as well to make sure it doesn't break.

10 months agomkosi: Update to latest
Daan De Meyer [Thu, 19 Dec 2024 12:54:13 +0000 (13:54 +0100)] 
mkosi: Update to latest

10 months agoanalyze-chid: fully support all CHID types 35699/head
Lennart Poettering [Fri, 20 Dec 2024 11:21:01 +0000 (12:21 +0100)] 
analyze-chid: fully support all CHID types

This adds logic to read the missing SMBIOS fields from userspace, too.
With this we should have full CHID coverage now, matching fwupd's output
fully.

10 months agoanalyze-chid: split out code that reads smbios into helper
Lennart Poettering [Fri, 20 Dec 2024 11:20:09 +0000 (12:20 +0100)] 
analyze-chid: split out code that reads smbios into helper

10 months agoanalyze: C escape weird chars in SMBIOS fields
Lennart Poettering [Fri, 20 Dec 2024 11:13:43 +0000 (12:13 +0100)] 
analyze: C escape weird chars in SMBIOS fields

just in case, let's not write garbled crap to the TTY but escape and
potential weird chars before output.

10 months agochid: add missing CHID type definitions
Lennart Poettering [Fri, 20 Dec 2024 11:12:02 +0000 (12:12 +0100)] 
chid: add missing CHID type definitions

This add he missing CHID types to our tables, but doesn't add all
necessary code to calculate them yet.

This brings us closer to what the CHID spec documents, and what
"fupwdtool hwids" outputs.

10 months agoanalyze-chid: show friendly smbios field names
Lennart Poettering [Fri, 20 Dec 2024 11:10:55 +0000 (12:10 +0100)] 
analyze-chid: show friendly smbios field names

Some of the field names between kernel and smbios spec differ. Kinda
confusing. Let's use the smbios field names, to match the CHID spec,
which also uses them, and thus be least confusing, treating kernel
attribute fields as an internal Linux thing only.

10 months agoanalyze: not all smbios fields are always defined, deal with that
Lennart Poettering [Fri, 20 Dec 2024 11:09:41 +0000 (12:09 +0100)] 
analyze: not all smbios fields are always defined, deal with that

As per previous commit, accept that not all SMBIOS fields are alwaysa
available (or set, but empty), hence handle this gracefully and don't
generate relevant CHIDs, as per docs.

10 months agochid-fundamental: rework bit checking to use FLAGS_SET()
Lennart Poettering [Fri, 20 Dec 2024 17:13:16 +0000 (18:13 +0100)] 
chid-fundamental: rework bit checking to use FLAGS_SET()

10 months agochid-fundamental: use right type to iterate through smbios fields
Lennart Poettering [Fri, 20 Dec 2024 11:04:18 +0000 (12:04 +0100)] 
chid-fundamental: use right type to iterate through smbios fields

10 months agochid-fundamental: make namespace GUID static, too
Lennart Poettering [Fri, 20 Dec 2024 11:03:50 +0000 (12:03 +0100)] 
chid-fundamental: make namespace GUID static, too

10 months agochid-fundamental: not all SMBIOS fields are available on all systems
Lennart Poettering [Fri, 20 Dec 2024 11:02:33 +0000 (12:02 +0100)] 
chid-fundamental: not all SMBIOS fields are available on all systems

And the CHID documentation says that CHIDs that require fields that are
not available on the local system should not be generated. Follow that,
and generate a NULL CHID in that case (which we generally ignore
otherwise).

10 months agoupdate TODO 35510/head
Lennart Poettering [Mon, 9 Dec 2024 10:46:54 +0000 (11:46 +0100)] 
update TODO

10 months agodiscover-image: introduce per-user image directories
Lennart Poettering [Mon, 9 Dec 2024 10:38:05 +0000 (11:38 +0100)] 
discover-image: introduce per-user image directories

We nowadays support unprivileged invocation of systemd-nspawn +
systemd-vmspawn, but there was no support for discovering suitable disk
images (i.e. no per-user counterpart of /var/lib/machines). Add this
now, and hook it up everywhere.

Instead of hardcoding machined's, importd's, portabled's, sysupdated's
image discovery to RUNTIME_SCOPE_SYSTEM I introduced a field that make
the scope variable, even if this field is always initialized to
RUNTIME_SCOPE_SYSTEM for now. I think these four services should
eventually be updated to support a per-user concept too, this is
preparation for that, even though it doesn't outright add support for
this.

This is for the largest part not user visible, except for in nspawn,
vmspawn and the dissect tool. For the latter I added a pair of
--user/--system switches to select the discovery scope.

10 months agoupdate TODO 35536/head
Lennart Poettering [Tue, 10 Dec 2024 19:49:31 +0000 (20:49 +0100)] 
update TODO

10 months agoman: document the new per-use credstore paths
Lennart Poettering [Tue, 10 Dec 2024 20:34:06 +0000 (21:34 +0100)] 
man: document the new per-use credstore paths

(And some other minor tweaks)

10 months agotest: add integration test that makes sure unpriv creds work correctly
Lennart Poettering [Tue, 10 Dec 2024 19:50:19 +0000 (20:50 +0100)] 
test: add integration test that makes sure unpriv creds work correctly

This checks both the per-user credstore directory logic, and that
unprivileged, encrypted credentials work.

10 months agopid1: add support for decrypting per-user credentials
Lennart Poettering [Tue, 10 Dec 2024 13:56:18 +0000 (14:56 +0100)] 
pid1: add support for decrypting per-user credentials

When I added support for unprivileged credentials I apparently never
hooked them up to service management correctly. Let's fix that.

Fixes: #33796 #33318
10 months agoexecute: introduce a user-scoped credstore
Lennart Poettering [Tue, 10 Dec 2024 12:35:39 +0000 (13:35 +0100)] 
execute: introduce a user-scoped credstore

Fixes: #33887
10 months agosd-path: expose credential store in sd-path
Lennart Poettering [Tue, 10 Dec 2024 13:34:41 +0000 (14:34 +0100)] 
sd-path: expose credential store in sd-path

10 months agosystemd-path: add the usual ANSI sequences to --help text
Lennart Poettering [Tue, 10 Dec 2024 20:38:37 +0000 (21:38 +0100)] 
systemd-path: add the usual ANSI sequences to --help text