]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 months agocore,sd-bus: drop empty lines between function call and error check
Yu Watanabe [Sun, 29 Dec 2024 06:10:53 +0000 (15:10 +0900)] 
core,sd-bus: drop empty lines between function call and error check

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 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

10 months agosystemd-path: guarantee that tool exit status is zero on success
Lennart Poettering [Tue, 10 Dec 2024 13:05:04 +0000 (14:05 +0100)] 
systemd-path: guarantee that tool exit status is zero on success

Let's not inherit the error code from an earlier function invocation.

10 months agosystemd-path: order all listed paths by their ID alphabetically
Lennart Poettering [Tue, 10 Dec 2024 13:01:13 +0000 (14:01 +0100)] 
systemd-path: order all listed paths by their ID alphabetically

Let's add some system to the madness, given we added user-specific dirs
to the end of the list, but they should really be listed together with
the other user-specific ones.

10 months agosd-path: don't chop off trailing slash in sd_path apis, when user provided them
Lennart Poettering [Tue, 10 Dec 2024 12:37:56 +0000 (13:37 +0100)] 
sd-path: don't chop off trailing slash in sd_path apis, when user provided them

This is a minor compat break, but given the slow adoption of the
sd-path.h APIs I think it's one we should take. Basically, the idea is
that if the user provides a suffix path with a trailing slash (thus
encoding in the path that the last element must be a dir), we should
keep it in place, and not suppress it, in order to not willy nilly
reduce the amount of information contained in the path.

Simplifications that do not alter meaning, and do not suppress
information should be fine to apply to a path, but otherwise we really
should be conservative on this.

10 months agopid1: normalize oom error handling a bit
Lennart Poettering [Tue, 10 Dec 2024 10:10:30 +0000 (11:10 +0100)] 
pid1: normalize oom error handling a bit

10 months agopo: Translated using Weblate (Finnish)
Ricky Tigg [Fri, 20 Dec 2024 15:38:37 +0000 (16:38 +0100)] 
po: Translated using Weblate (Finnish)

Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Ricky Tigg <ricky.tigg@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fi/
Translation: systemd/main

10 months agoAdd .venv to gitignore
Septatrix [Fri, 20 Dec 2024 14:44:20 +0000 (15:44 +0100)] 
Add .venv to gitignore

This directory is commonly used for virtual Python environments.
These are useful when developing to install different Python versions
as well as install tooling like mkosi and mypy in an isolated fashion
without influencing the global system.

10 months agocore/device: handle ID_PROCESSING udev property (#35351)
Lennart Poettering [Fri, 20 Dec 2024 09:12:39 +0000 (10:12 +0100)] 
core/device: handle ID_PROCESSING udev property (#35351)

Continuation of #35332.

10 months agodebug-generator: add a kernel cmdline option to pause the boot process (#35410)
Daan De Meyer [Fri, 20 Dec 2024 09:04:41 +0000 (10:04 +0100)] 
debug-generator: add a kernel cmdline option to pause the boot process (#35410)

Introduce the `systemd.break=` kernel command line option to allow
stopping the boot process at a certain point and spawn a debug shell.
After exiting this shell, the system will resume booting.

It accepts the following values:
- `pre-udev`: before starting to process kernel uevents (initrd and
host).
- `pre-basic`: before leaving early boot and regular services start
(initrd and host).
- `pre-mount`: before the root filesystem is mounted (initrd).
- `pre-switch-root`: before switching root (initrd).

10 months ago[RFC] better naming for Azure MANA network devices (#34255)
Lennart Poettering [Fri, 20 Dec 2024 08:52:40 +0000 (09:52 +0100)] 
[RFC] better naming for Azure MANA network devices (#34255)

The Azure MANA folks would like the PCI domain to be suppressed from
naming network interfaces. Let's introduce a somewhat generic way to do
this, without hardcoding anything to Azure.

Specifically: we'll ship a new hwdb entry that sets a new
ID_NET_NAME_INCLUDE_DOMAIN=0 property on relevant MANA devices. Then we
make net_id look for that property, and if it is set we simply suppress
the PCI domain.

(Untested as of now, needs feedback from Azure MANA folks that this
actually works and does what is requested here).

10 months agomkosi: move config options
Matteo Croce [Thu, 19 Dec 2024 18:51:42 +0000 (19:51 +0100)] 
mkosi: move config options

Move some config option in the right section, fixes the following warning:
```
mkosi.conf: Setting Credentials should be configured in [Runtime], not [Host].
mkosi.conf: Setting RuntimeBuildSources should be configured in [Runtime], not [Host].
mkosi.conf: Setting RuntimeScratch should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuSmp should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuSwtpm should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuVsock should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuKvm should be configured in [Runtime], not [Host].
```

10 months agoaudit-util: rename output parameter
Yu Watanabe [Fri, 20 Dec 2024 06:11:47 +0000 (15:11 +0900)] 
audit-util: rename output parameter

To make them consistent with in audit-util.c.

Follow-up for 7e02ee98d86702b8e7055f0a6d8e6ea48267ad23.

10 months agoTEST-71-HOSTNAME: do not start user session
Yu Watanabe [Fri, 20 Dec 2024 05:55:10 +0000 (14:55 +0900)] 
TEST-71-HOSTNAME: do not start user session

The user session may trigger hostnamed, and the job of stopping
hostnamed may be cancelled, and the test may fail:
```
[ 4633.613578] TEST-71-HOSTNAME.sh[175]: + stop_hostnamed
[ 4633.613578] TEST-71-HOSTNAME.sh[175]: + systemctl stop systemd-hostnamed.service
[ 4633.664670] systemd[1]: Stopping systemd-hostnamed.service - Hostname Service...
[ 4636.022277] systemd-logind[121]: New session c2 of user root.
[ 4636.032532] systemd[1]: Created slice user-0.slice - User Slice of UID 0.
[ 4636.042675] systemd[1]: Starting user-runtime-dir@0.service - User Runtime Directory /run/user/0...
[ 4636.176140] systemd[1]: Finished user-runtime-dir@0.service - User Runtime Directory /run/user/0.
[ 4636.202951] systemd[1]: Starting user@0.service - User Manager for UID 0...
[ 4636.292204] systemd-logind[121]: New session c3 of user root.
[ 4636.300065] (systemd)[268]: pam_unix(systemd-user:session): session opened for user root(uid=0) by root(uid=0)
[ 4636.757667] systemd[268]: Queued start job for default target default.target.
[ 4636.774419] systemd[268]: Created slice app.slice - User Application Slice.
[ 4636.774579] systemd[268]: Started systemd-tmpfiles-clean.timer - Daily Cleanup of User's Temporary Directories.
[ 4636.774747] systemd[268]: Reached target paths.target - Paths.
[ 4636.776418] systemd[268]: Reached target sysinit.target - System Initialization.
[ 4636.776604] systemd[268]: Reached target timers.target - Timers.
[ 4636.784997] systemd[268]: Starting dbus.socket - D-Bus User Message Bus Socket...
[ 4636.799472] systemd[268]: Starting systemd-tmpfiles-setup.service - Create User Files and Directories...
[ 4637.027125] systemd[268]: Finished systemd-tmpfiles-setup.service - Create User Files and Directories.
[ 4637.031721] systemd[268]: Listening on dbus.socket - D-Bus User Message Bus Socket.
[ 4637.036189] systemd[268]: Reached target sockets.target - Sockets.
[ 4637.036373] systemd[268]: Reached target basic.target - Basic System.
[ 4637.036558] systemd[268]: Reached target default.target - Main User Target.
[ 4637.036646] systemd[268]: Startup finished in 702ms.
[ 4637.049075] systemd[1]: Started user@0.service - User Manager for UID 0.
[ 4637.075263] systemd[1]: Started session-c2.scope - Session c2 of User root.
[ 4637.084917] login[136]: pam_unix(login:session): session opened for user root(uid=0) by root(uid=0)
[ 4637.117348] login[136]: ROOT LOGIN ON pts/0
[ 4637.238572] systemctl[261]: Job for systemd-hostnamed.service canceled.
[ 4637.290369] systemd[1]: TEST-71-HOSTNAME.service: Main process exited, code=exited, status=1/FAILURE
```

Fixes #35643.

10 months agodebug-generator: add a kernel cmdline option to pause the boot process 35410/head
Antonio Alvarez Feijoo [Fri, 20 Dec 2024 07:51:23 +0000 (08:51 +0100)] 
debug-generator: add a kernel cmdline option to pause the boot process

Introduce the `systemd.break=` kernel command line option to allow stopping the
boot process at a certain point and spawn a debug shell. After exiting this
shell, the system will resume booting.

It accepts the following values:
- `pre-udev`: before starting to process kernel uevents (initrd and host).
- `pre-basic`: before leaving early boot and regular services start (initrd and
host).
- `pre-mount`: before the root filesystem is mounted (initrd).
- `pre-switch-root`: before switching root (initrd).

10 months agoman/debug-generator: add a section for kernel command line options
Antonio Alvarez Feijoo [Fri, 29 Nov 2024 10:29:17 +0000 (11:29 +0100)] 
man/debug-generator: add a section for kernel command line options

10 months agocapability-util: generalize helper to acquire local caps (#35403)
Yu Watanabe [Fri, 20 Dec 2024 02:52:24 +0000 (11:52 +0900)] 
capability-util: generalize helper to acquire local caps (#35403)

This generalizes and modernizes the code to acquire set of local caps,
based on the code for this in the condition logic. Uses PidRef, and
acquires the full quintuplet of caps.

This can be considered preparation to one day maybe build without
libcap.

10 months agoanalyze: add "chid" verb to display CHIDs of the local system (#35175)
Yu Watanabe [Fri, 20 Dec 2024 02:47:03 +0000 (11:47 +0900)] 
analyze: add "chid" verb to display CHIDs of the local system (#35175)

We already have the code for it, expose it in systemd-analyze, because
it's useful.

10 months agoSmall fixes to nspawn and other stuff (#35686)
Yu Watanabe [Fri, 20 Dec 2024 02:03:59 +0000 (11:03 +0900)] 
Small fixes to nspawn and other stuff (#35686)

Split out ouf #35685.

10 months agoTEST-17: add test case for ID_PROCESSING flag on add uevent 35351/head
Yu Watanabe [Mon, 25 Nov 2024 19:11:28 +0000 (04:11 +0900)] 
TEST-17: add test case for ID_PROCESSING flag on add uevent

Also, check the state of the device units on change event.

10 months agocore/device: handle ID_PROCESSING udev property
Yu Watanabe [Mon, 25 Nov 2024 16:19:35 +0000 (01:19 +0900)] 
core/device: handle ID_PROCESSING udev property

If an enumerated device has ID_PROCESSING=1 property, and the service
manager does not know if the device has been processed by udevd
previously (that is, Device.deserialized_found does not have
DEVICE_FOUND_UDEV), then drop DEVICE_FOUND_UDEV flag from the device and
make the device not enter the active state.

Follow-up for 405be62f05d76f1845f347737b5972158c79dd3e, which was
reverted by c4fc22c4defc5983e53f4ce048e15ea7d31e6a75.

10 months agocore/device: use path_equal() to compare sysfs path
Yu Watanabe [Mon, 16 Dec 2024 16:42:16 +0000 (01:42 +0900)] 
core/device: use path_equal() to compare sysfs path

The hashmap Manager.devices_by_sysfs uses path_hash_ops.
Let's consistent compare function.

10 months agocore/device: rename output parameters of device_setup_units() to ret_xyz
Yu Watanabe [Mon, 25 Nov 2024 13:48:37 +0000 (22:48 +0900)] 
core/device: rename output parameters of device_setup_units() to ret_xyz

No functional change, just refactoring.

10 months agoudev: support reloading udev.conf (#35458)
Yu Watanabe [Fri, 20 Dec 2024 00:00:48 +0000 (09:00 +0900)] 
udev: support reloading udev.conf (#35458)

This makes systemd-udevd reload udev.conf when explicitly requested by
e.g. `udevadm control --reload`.