]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agomissing_syscall: drop raw_getpid() 36609/head
Mike Yuan [Tue, 4 Mar 2025 17:49:04 +0000 (18:49 +0100)] 
missing_syscall: drop raw_getpid()

This used to be relevant since in old versions of glibc an internal
cache is maintained, while we might sidestep their invalidation
with raw_clone(). After glibc 2.25 getpid() is a trivial wrapper
for the syscall, and hence there's no need to have a separate
raw_getpid().

8 months agolocale-util: modernize is_locale_utf8() a bit
Mike Yuan [Tue, 4 Mar 2025 17:42:24 +0000 (18:42 +0100)] 
locale-util: modernize is_locale_utf8() a bit

8 months agosd-journal/journal-send: use is_main_thread() where appropriate
Mike Yuan [Tue, 4 Mar 2025 17:41:23 +0000 (18:41 +0100)] 
sd-journal/journal-send: use is_main_thread() where appropriate

8 months agobasic/sys/mount: sort includes
Mike Yuan [Tue, 4 Mar 2025 17:08:21 +0000 (18:08 +0100)] 
basic/sys/mount: sort includes

8 months agomissing_fs: drop FS_KEY_DESCRIPTOR_SIZE
Mike Yuan [Tue, 4 Mar 2025 16:25:42 +0000 (17:25 +0100)] 
missing_fs: drop FS_KEY_DESCRIPTOR_SIZE

We now directly import linux/fscrypt.h, so this def is duplicate

8 months agodirent-util: add several assertions in posix_getdents()
Yu Watanabe [Tue, 4 Mar 2025 15:05:31 +0000 (00:05 +0900)] 
dirent-util: add several assertions in posix_getdents()

Follow-up for e86a492ff08526e5adf85fa881c76f80adc3c84a.

8 months agopath: Close inotify FD asynchronously
Michal Koutný [Mon, 17 Feb 2025 14:40:24 +0000 (15:40 +0100)] 
path: Close inotify FD asynchronously

inotify FD may take several milliseconds to close.  We measured
daemon-reload

        default: (0.427 ± 0.05) s
        async:   (0.323 ± 0.02) s

with 5 path units out of 422 units. I.e. ~1% of units cause ~25% of
delay, hence this fix seems like low-hanging fruit on the daemon-reload
critical path.

Particular inotify slowness pointed out by @fbuihuu.

8 months agopam-systemd: default to "lightweight" sessions if area is selected
Lennart Poettering [Mon, 3 Mar 2025 12:24:18 +0000 (13:24 +0100)] 
pam-systemd: default to "lightweight" sessions if area is selected

We currently don't support invoking a per-area service manager instance,
hence don't try to pull in one if we log into an area.

Once we add support for per-area service managers we can relax this
again.

8 months agovarlink: optionally create leading dirs when binding AF_UNIX socket
Lennart Poettering [Tue, 4 Mar 2025 14:39:46 +0000 (15:39 +0100)] 
varlink: optionally create leading dirs when binding AF_UNIX socket

This is such a common case, let's make it easy to do this.

8 months agolog: explicitly size log_target_max_level()
Lennart Poettering [Tue, 4 Mar 2025 14:41:12 +0000 (15:41 +0100)] 
log: explicitly size log_target_max_level()

We always validate that the target value is below _LOG_TARGET_SINGLE_MAX
before acessing it, but we don't actually size the array like that.
let's fix that.

This doesn#t effectively change anything, but it makes things more
explicit what the limit here is.

8 months agotest: Connect test unit to console when running interactively (#36586)
Daan De Meyer [Tue, 4 Mar 2025 16:06:49 +0000 (17:06 +0100)] 
test: Connect test unit to console when running interactively (#36586)

8 months agodns-stream: only read DNS packet data if we identified the peer properly 36531/head
Lennart Poettering [Mon, 3 Mar 2025 23:17:21 +0000 (00:17 +0100)] 
dns-stream: only read DNS packet data if we identified the peer properly

If we use TCP fastopen to connect to a DNS server via TCP, and it
responds really quickly between our connection attempt and our immediate
check back, then we have not identified the peer yet, and will not be
able to use the peer metadata to fill in our packet info.

Let's fix that, and simply not read from the socket until identification
is complete.

Fixes: #34956
8 months agoresolved: pick up new DNSSEC KSC from 2024
Lennart Poettering [Mon, 3 Mar 2025 21:40:05 +0000 (22:40 +0100)] 
resolved: pick up new DNSSEC KSC from 2024

Import thew new key from https://data.iana.org/root-anchors/root-anchors.xml.

The old one remains valid, as per provided data.

Fixes: #36260
8 months agobasic: remove unnecessary definition in missing_xyz.h (#36565)
Daan De Meyer [Tue, 4 Mar 2025 07:41:14 +0000 (08:41 +0100)] 
basic: remove unnecessary definition in missing_xyz.h (#36565)

8 months agohwdb: add rotation profile matrix for Rog Ally X (2024) (#36591)
Harrison Vanderbyl [Tue, 4 Mar 2025 04:15:23 +0000 (15:15 +1100)] 
hwdb: add rotation profile matrix for Rog Ally X (2024) (#36591)

8 months agochattr-util: two trivial cleanups (#36593)
Yu Watanabe [Tue, 4 Mar 2025 04:13:25 +0000 (13:13 +0900)] 
chattr-util: two trivial cleanups (#36593)

8 months agotree-wide: several cleanups and fixlets prompted by Coverity (#36431)
Lennart Poettering [Mon, 3 Mar 2025 22:17:28 +0000 (23:17 +0100)] 
tree-wide: several cleanups and fixlets prompted by Coverity (#36431)

8 months agoCoverity fixups (#36503)
Lennart Poettering [Mon, 3 Mar 2025 21:54:42 +0000 (22:54 +0100)] 
Coverity fixups (#36503)

Details in individual commits.

8 months agoexec-invoke: add missing assertions and drop unnecessary conditions 36431/head
Yu Watanabe [Tue, 18 Feb 2025 19:46:08 +0000 (04:46 +0900)] 
exec-invoke: add missing assertions and drop unnecessary conditions

Fixes CID#1534358.

8 months agoexec-invoke: modernize get_supplementary_groups()
Yu Watanabe [Tue, 18 Feb 2025 19:43:59 +0000 (04:43 +0900)] 
exec-invoke: modernize get_supplementary_groups()

- drop unused argument 'group',
- rename output arguments,
- add missing assertions for output arguments,
- always initialize output arguments on success.

8 months agohwdb-util: drop unused value assignment
Yu Watanabe [Tue, 18 Feb 2025 18:46:55 +0000 (03:46 +0900)] 
hwdb-util: drop unused value assignment

The values assigned to 'r' were never used, and overwritten by the next
call of read_line_full().

Fixes CID#1548043 and CID#1548064.

8 months agope-binary: fix array overrun
Yu Watanabe [Tue, 18 Feb 2025 18:09:38 +0000 (03:09 +0900)] 
pe-binary: fix array overrun

This is a kind of paranoia, as memeqzero() does not read anyting if
length is zero. But, strictly speaking C language does not allow such,
and Coverity warn about that.

Fixes CID#1561177.

8 months agope-binary: trivial coding style fixlets
Yu Watanabe [Tue, 18 Feb 2025 18:02:32 +0000 (03:02 +0900)] 
pe-binary: trivial coding style fixlets

8 months agogenerator: insert parentheses to make the code clearer
Yu Watanabe [Tue, 18 Feb 2025 17:45:30 +0000 (02:45 +0900)] 
generator: insert parentheses to make the code clearer

Silence CID#1563781.

8 months agofileio: move call of label_ops_post() before error handling of creating files
Yu Watanabe [Tue, 18 Feb 2025 17:41:03 +0000 (02:41 +0900)] 
fileio: move call of label_ops_post() before error handling of creating files

Fixes CID#1563946.

8 months agoasync: voidify call of fsync()
Yu Watanabe [Tue, 18 Feb 2025 17:34:13 +0000 (02:34 +0900)] 
async: voidify call of fsync()

Fixes CID#1564787.

8 months agonetwork: Use RTNH_COMPARE_MASK in route_can_update() (#36585)
Daan De Meyer [Mon, 3 Mar 2025 20:00:33 +0000 (21:00 +0100)] 
network: Use RTNH_COMPARE_MASK in route_can_update() (#36585)

Let's only compare flags that can be set by userspace and not all flags.

Fixes a bug introduced by 7027cdbd79c26d5a8890759a37d70165c8aeb214 (v256).
Fixes #36544

8 months agocopy: slightly optimize around chattr_fd() 36593/head
Yu Watanabe [Mon, 3 Mar 2025 19:49:18 +0000 (04:49 +0900)] 
copy: slightly optimize around chattr_fd()

8 months agodirent-util: introduce simple wrapper of posix_getdents() 36565/head
Yu Watanabe [Mon, 3 Mar 2025 18:11:58 +0000 (03:11 +0900)] 
dirent-util: introduce simple wrapper of posix_getdents()

glibc exports getdents64 syscall as is, but musl exports it as
posix_getdents(). Let's introduce a simple wrapper of posix_getdents().

Note, our baseline for glibc is 2.31. Hence, we can assume getdents64()
always defined when building with glibc.

8 months agoTEST-13-NSPAWN.nss-mymachines: Use negative matching switch 36503/head
Michal Koutný [Tue, 25 Feb 2025 10:36:51 +0000 (11:36 +0100)] 
TEST-13-NSPAWN.nss-mymachines: Use negative matching switch

The test expects _not_ to find the patterns but the run_and_grep would
still print 'FAIL:' message. Use the dedicated -n option that inverts
the semantics cleaner than shell's !.

8 months agouser-record: Make user and group matching functions total
Michal Koutný [Fri, 28 Feb 2025 14:28:04 +0000 (15:28 +0100)] 
user-record: Make user and group matching functions total

Since we can evaluate even the case with invalid ids (non-matching) we
can switch the function to pure boolean with no error cases and simpler
(none) return error handling.

8 months agouserdb: Fix return value of groupdb_by_name()
Michal Koutný [Mon, 3 Mar 2025 18:15:42 +0000 (19:15 +0100)] 
userdb: Fix return value of groupdb_by_name()

The commit 7419291670 ("userdb: move UserDBMatch handling from userdbctl
into generic userdb code to allow it to be done server side")
unintentionally passes return value from group_record_match() as its
return value and thus diverges from other search functions that return 0
on success. Align that by returning 0 instead of 1, all existing callers
are invariant to this change.

8 months agouser-record: Handle invalid uid/gid case
Michal Koutný [Mon, 24 Feb 2025 15:22:59 +0000 (16:22 +0100)] 
user-record: Handle invalid uid/gid case

I'm not that familiar with outer code to guide Coverity with an
assert(), so consider invalid uid/gid as non-matching in order to avoid
-EINVAL for bit shifts calculation.

Fixes: CID#1590746
8 months agobasic: introduce our own sys/mount.h implementation
Yu Watanabe [Mon, 3 Mar 2025 14:26:38 +0000 (23:26 +0900)] 
basic: introduce our own sys/mount.h implementation

To resolve conflict with sys/mount.h and linux/mount.h or linux/fs.h.

The conflict between sys/mount.h and linux/mount.h is resolved in
glibc-2.37 (774058d72942249f71d74e7f2b639f77184160a6), but our baseline
is still glibc-2.31. Also, even with the version or newer, still
sys/mount.h conflicts with linux/fs.h, which is included by
linux/btrfs.h.

This introduces our own implementation of sys/mount.h, that can be
simultaneously included with linux/mount.h and linux/fs.h. This also
imports linux/fs.h, linux/mount.h, and several other dependent headers.
The introduced sys/mount.h header itself may not be enough simple, but
by using the header, we can drop most of workarounds in other source files.

8 months agomissing_audit: AUDIT_NLGRP_READLOG is defined since kernel v3.16
Yu Watanabe [Fri, 28 Feb 2025 20:34:23 +0000 (05:34 +0900)] 
missing_audit: AUDIT_NLGRP_READLOG is defined since kernel v3.16

More specifically, since 451f921639fea4600dfb9ab2889332bdcc7b48d3.
Now, our kernel baseline is 5.4. Hence, we can drop the definition.

8 months agobasic/linux: import capability.h from kernel 6.14-rc4
Yu Watanabe [Fri, 28 Feb 2025 20:24:48 +0000 (05:24 +0900)] 
basic/linux: import capability.h from kernel 6.14-rc4

8 months agomissing_wait: add short comment about P_PIDFD
Yu Watanabe [Fri, 28 Feb 2025 20:13:32 +0000 (05:13 +0900)] 
missing_wait: add short comment about P_PIDFD

8 months agomissing_timerfd: TFD_TIMER_CANCEL_ON_SET is defined since glibc-2.26
Yu Watanabe [Fri, 28 Feb 2025 20:09:58 +0000 (05:09 +0900)] 
missing_timerfd: TFD_TIMER_CANCEL_ON_SET is defined since glibc-2.26

8 months agomissing_threads.h: threads.h exists since glibc-2.28
Yu Watanabe [Fri, 28 Feb 2025 19:57:49 +0000 (04:57 +0900)] 
missing_threads.h: threads.h exists since glibc-2.28

8 months agomissing_socket: drop unnecessary definitions
Yu Watanabe [Fri, 28 Feb 2025 19:47:31 +0000 (04:47 +0900)] 
missing_socket: drop unnecessary definitions

All removed definitions are in glibc-2.31

8 months agomissing_securebits: remove unnecessary header
Yu Watanabe [Fri, 28 Feb 2025 19:37:01 +0000 (04:37 +0900)] 
missing_securebits: remove unnecessary header

Our kernel baseline is 5.4, hence all entries in the headers are defined
in linux/securebits.h.

8 months agomissing_resource.h: RLIMIT_RTTIME is defined since glibc-2.14
Yu Watanabe [Fri, 28 Feb 2025 19:14:28 +0000 (04:14 +0900)] 
missing_resource.h: RLIMIT_RTTIME is defined since glibc-2.14

Now our baseline is glibc-2.31.

8 months agobasic/linux: import prctl.h from linux 6.14-rc4
Yu Watanabe [Fri, 28 Feb 2025 19:01:07 +0000 (04:01 +0900)] 
basic/linux: import prctl.h from linux 6.14-rc4

8 months agomissing_network: drop unnecessary definitions
Yu Watanabe [Fri, 28 Feb 2025 18:55:14 +0000 (03:55 +0900)] 
missing_network: drop unnecessary definitions

They are already defined in glibc-2.31.

8 months agomissing_namespace: drop unnecessary entries
Yu Watanabe [Fri, 28 Feb 2025 18:50:46 +0000 (03:50 +0900)] 
missing_namespace: drop unnecessary entries

Our kernel baseline is 5.4.

8 months agobasic/linux: import loop.h from kernel 6.14-rc4, and drop missing_loop.h
Yu Watanabe [Fri, 28 Feb 2025 18:43:33 +0000 (03:43 +0900)] 
basic/linux: import loop.h from kernel 6.14-rc4, and drop missing_loop.h

8 months agomissing_keyctl: import keyctl.h from kernel 6.14-rc4
Yu Watanabe [Fri, 28 Feb 2025 18:38:23 +0000 (03:38 +0900)] 
missing_keyctl: import keyctl.h from kernel 6.14-rc4

8 months agobasic/linux: import ioprio.h from kernel 6.14-rc4
Yu Watanabe [Fri, 28 Feb 2025 18:09:43 +0000 (03:09 +0900)] 
basic/linux: import ioprio.h from kernel 6.14-rc4

This also fixes the maximum allowed ioprio class: 8 -> 7

8 months agomissing_input: replace the header with genuine linux header
Yu Watanabe [Fri, 28 Feb 2025 18:02:00 +0000 (03:02 +0900)] 
missing_input: replace the header with genuine linux header

8 months agobasic/linux: import hidraw.h and hid.h from linux-6.14-rc4
Yu Watanabe [Fri, 28 Feb 2025 17:54:35 +0000 (02:54 +0900)] 
basic/linux: import hidraw.h and hid.h from linux-6.14-rc4

8 months agomissing_fs: drop unnecessary entries
Yu Watanabe [Fri, 28 Feb 2025 17:50:07 +0000 (02:50 +0900)] 
missing_fs: drop unnecessary entries

Now our kernel baseline is 5.4.

8 months agomissing_fcntl: drop definitions covered by glibc-2.31
Yu Watanabe [Fri, 28 Feb 2025 17:40:45 +0000 (02:40 +0900)] 
missing_fcntl: drop definitions covered by glibc-2.31

Note, this also fixes the definition for O_TMPFILE for parisc and hppa,
it should be 040000000 (seven zeros) rather than 0400000000 (eight zeros).

8 months agomeson: cleanup glibc header checkers
Yu Watanabe [Fri, 28 Feb 2025 16:05:05 +0000 (01:05 +0900)] 
meson: cleanup glibc header checkers

8 months agomissing_type: char16_t and char32_t are always defined in uchar.h since C11
Yu Watanabe [Fri, 28 Feb 2025 15:08:35 +0000 (00:08 +0900)] 
missing_type: char16_t and char32_t are always defined in uchar.h since C11

Now, we use C17, hence the fallback definitions can be dropped.

8 months agomissing_stdlib: secure_getenv() exists since glibc-2.17
Yu Watanabe [Fri, 28 Feb 2025 16:07:35 +0000 (01:07 +0900)] 
missing_stdlib: secure_getenv() exists since glibc-2.17

8 months agoalloc-util: reallocarray() exists since glibc-2.26
Yu Watanabe [Fri, 28 Feb 2025 15:15:56 +0000 (00:15 +0900)] 
alloc-util: reallocarray() exists since glibc-2.26

8 months agomemory-util: explicit_bzero() exists since glibc-2.25
Yu Watanabe [Fri, 28 Feb 2025 15:14:24 +0000 (00:14 +0900)] 
memory-util: explicit_bzero() exists since glibc-2.25

8 months agomissing_syscall: drop unnecessary definition of AT_EMPTY_PATH
Yu Watanabe [Mon, 3 Mar 2025 04:25:52 +0000 (13:25 +0900)] 
missing_syscall: drop unnecessary definition of AT_EMPTY_PATH

It is defined since glibc-2.14 (46998f745736b3c8df5901a27b6c2a19f5cc5e98),
and the value was never changed.

8 months agomissing_syscall: drop unnecessary ifdefs for syscall number
Yu Watanabe [Mon, 3 Mar 2025 04:15:34 +0000 (13:15 +0900)] 
missing_syscall: drop unnecessary ifdefs for syscall number

Nowadays, we define syscall numbers for newer syscalls.
Hence the conditions are not necessary.

This also adds several comments about when syscalls are introduced.

8 months agomissing_syscall: drop unnecessary syscall number definitions
Yu Watanabe [Mon, 3 Mar 2025 04:07:21 +0000 (13:07 +0900)] 
missing_syscall: drop unnecessary syscall number definitions

8 months agomissing_syscall: drop unused rt_sigqueueinfo wrapper
Yu Watanabe [Mon, 3 Mar 2025 02:42:10 +0000 (11:42 +0900)] 
missing_syscall: drop unused rt_sigqueueinfo wrapper

The syscall is unused since 19e1a908b512410e0968fec9259a8fc221001f12.

8 months agomissing_syscall: copy_file_range is supported by glibc since 2.27
Yu Watanabe [Fri, 28 Feb 2025 13:57:42 +0000 (22:57 +0900)] 
missing_syscall: copy_file_range is supported by glibc since 2.27

Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

8 months agomissing_syscall: renameat2 is supported by glibc since 2.28
Yu Watanabe [Fri, 28 Feb 2025 13:50:32 +0000 (22:50 +0900)] 
missing_syscall: renameat2 is supported by glibc since 2.28

Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

8 months agomissing_syscall: setns is supported by glibc since 2.14
Yu Watanabe [Fri, 28 Feb 2025 13:45:25 +0000 (22:45 +0900)] 
missing_syscall: setns is supported by glibc since 2.14

Also, CLONE_PIDFD is defined in sched.h since 2.31.
Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

8 months agomissing_syscall: name_to_handle_at is supported by glibc since 2.14
Yu Watanabe [Fri, 28 Feb 2025 13:30:42 +0000 (22:30 +0900)] 
missing_syscall: name_to_handle_at is supported by glibc since 2.14

Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

8 months agomissing_syscall: gettid is supported by glibc since 2.30
Yu Watanabe [Fri, 28 Feb 2025 13:27:32 +0000 (22:27 +0900)] 
missing_syscall: gettid is supported by glibc since 2.30

Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

8 months agomissing_syscall: getrandom is supported by glibc since 2.25
Yu Watanabe [Fri, 28 Feb 2025 13:17:01 +0000 (22:17 +0900)] 
missing_syscall: getrandom is supported by glibc since 2.25

Now our baseline of glibc is 2.31, hence it is OK to drop our
definition.

8 months agomissing_syscall: memfd_create() is supported by glibc since 2.27
Yu Watanabe [Fri, 28 Feb 2025 12:49:03 +0000 (21:49 +0900)] 
missing_syscall: memfd_create() is supported by glibc since 2.27

Now, our baseline of glibc is 2.31, hence it is OK to drop it.

8 months agochattr-util: drop mostly unused 'previous' argument from chattr_path() and friends
Yu Watanabe [Mon, 3 Mar 2025 07:18:29 +0000 (16:18 +0900)] 
chattr-util: drop mostly unused 'previous' argument from chattr_path() and friends

8 months agomount-tool: various tweaks (#36584)
Lennart Poettering [Mon, 3 Mar 2025 12:57:27 +0000 (13:57 +0100)] 
mount-tool: various tweaks (#36584)

Split out from #36337

8 months agotty-askpw-agent: react to SIGTERM while waiting for console (#36568)
Lennart Poettering [Mon, 3 Mar 2025 12:56:44 +0000 (13:56 +0100)] 
tty-askpw-agent: react to SIGTERM while waiting for console (#36568)

I noticed that systemd-tty-password-agent would time out when asked to
stop via SIGTERM, and eventually be killed, under some circumstances. It
took me a while but i figured out what was going on:

systemd-ask-pw-agent blocks SIGTERM because it wants async notifications
on SIGTERM via signalfd() to listen on. That mostly works great: except
for one case: if we actually get a pw query request, and hence need to
acquire the terminal: we issue open_terminal() in that case, but if the
terminal is used otherwsie we'll hang, and because SIGTERM is blocked
we'll hang and cannot exit cleanly.

Address that: optionally, in open_terminal() look for SIGTERM by
unblcking the signal mask via ppoll() while we wait.

8 months agotest: Connect test unit to console when running interactively 36586/head
Daan De Meyer [Mon, 3 Mar 2025 11:35:11 +0000 (12:35 +0100)] 
test: Connect test unit to console when running interactively

When running interactively, let's connect the test unit directly
to the console. This enables adding "bash" anywhere within an
integration test to get a shell within the test environment.

8 months agotest: Disable status messages when we start running a test
Daan De Meyer [Mon, 3 Mar 2025 11:33:56 +0000 (12:33 +0100)] 
test: Disable status messages when we start running a test

As soon as we start running a test, we want pid 1 to stop showing
status messages so let's tell pid 1 to stop showing status messages.

8 months agotest: Move getty-pre.target logic into integration-test-wrapper.py
Daan De Meyer [Mon, 3 Mar 2025 10:51:13 +0000 (11:51 +0100)] 
test: Move getty-pre.target logic into integration-test-wrapper.py

Also pull in getty-pre.target via Wants= so it actually gets pulled
into the transaction.

8 months agotest: Check stdin for interactivity, not stderr
Daan De Meyer [Mon, 3 Mar 2025 10:44:42 +0000 (11:44 +0100)] 
test: Check stdin for interactivity, not stderr

8 months agoio-util: fix ppoll_usec() bypass 36568/head
Lennart Poettering [Mon, 3 Mar 2025 08:34:59 +0000 (09:34 +0100)] 
io-util: fix ppoll_usec() bypass

If a non-zero timeout is specified we should not bypass ppoll() even if
no fds are specified, since it will still act as a time based sleep in
that case.

8 months agounits: don't block on terminating agents
Lennart Poettering [Fri, 28 Feb 2025 22:35:14 +0000 (23:35 +0100)] 
units: don't block on terminating agents

Terminating the plymouth/console agents when the wall agent takes over
can happen asynchronously, after all the pw queries are async anyway and
hence can be seen by both the plymouth/console agents and the wall
agent.

By stopping the two agents with "--no-block" we add a bit of robustness,
since trouble of them exiting won't block the wall agent to start.

This addresses the issue the previous commit fixes in a different way.

8 months agotty-askpw-agent: react to SIGTERM while waiting for console
Lennart Poettering [Fri, 28 Feb 2025 22:30:55 +0000 (23:30 +0100)] 
tty-askpw-agent: react to SIGTERM while waiting for console

I noticed that systemd-tty-password-agent would time out when asked to
stop via SIGTERM, and eventually be killed, under some circumstances.
It took me a while but i figured out what was going on:

systemd-ask-pw-agent blocks SIGTERM because it wants async notifications
on SIGTERM via signalfd() to listen on. That mostly works great: except
for one case: if we actually get a pw query request, and hence need to
acquire the terminal: we issue open_terminal() in that case, but if the
terminal is used otherwsie we'll hang, and because SIGTERM is blocked
we'll hang and cannot exit cleanly.

Address that: optionally, in acquire_terminal() look for SIGTERM by
unblcking the signal mask via ppoll() while we wait.

8 months agomount-tool: never bind to device on explicit x-systemd.device-bound=no 36584/head
Mike Yuan [Sat, 15 Feb 2025 17:42:31 +0000 (18:42 +0100)] 
mount-tool: never bind to device on explicit x-systemd.device-bound=no

8 months agomount-tool: correct arg_bind_device check
Mike Yuan [Sun, 23 Feb 2025 16:47:09 +0000 (17:47 +0100)] 
mount-tool: correct arg_bind_device check

8 months agomount-tool: accept fstab-style identifiers for remote what too
Mike Yuan [Fri, 14 Feb 2025 22:41:58 +0000 (23:41 +0100)] 
mount-tool: accept fstab-style identifiers for remote what too

fstab-style identifiers have stable translation to absolute paths
in the file system, hence it makes no sense to reject them
even for remote mounts.

8 months agomount-tool: some modernizations and log message tweaks
Mike Yuan [Fri, 14 Feb 2025 22:45:51 +0000 (23:45 +0100)] 
mount-tool: some modernizations and log message tweaks

8 months agotests: remove cache=unsafe from TEST-64-UDEV-STORAGE
Jörg Behrmann [Sun, 2 Mar 2025 14:52:08 +0000 (15:52 +0100)] 
tests: remove cache=unsafe from TEST-64-UDEV-STORAGE

mkosi switch to the newer -blockdev qemu option in systemd/mkosi#3557 [1], but
cache=unsafe is an option only -drive supports.

Since the qemu-system_x86-64 man page [2] says this, cache.writeback=on is the
default and mkosi setting the other two options to the values corresponding to
unsafe, it should be fine to drop the cache=unsafe option.

┌─────────────┬─────────────────┬──────────────┬────────────────┐
│             │ cache.writeback │ cache.direct │ cache.no-flush │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│writeback    │ on              │ off          │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│none         │ on              │ on           │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│writethrough │ off             │ off          │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│directsync   │ off             │ on           │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│unsafe       │ on              │ off          │ on             │
└─────────────┴─────────────────┴──────────────┴────────────────┘

[1] https://github.com/systemd/mkosi/pull/3557
[2] https://manpages.ubuntu.com/manpages/noble/en/man1/qemu-system-x86_64.1.html

8 months agocore: DelegateNamespaces= does not depend on seccomp (#36580)
Steve Ramage [Sun, 2 Mar 2025 19:23:36 +0000 (11:23 -0800)] 
core: DelegateNamespaces= does not depend on seccomp (#36580)

8 months agosd-id128: gracefully handle systems where kernel keyring access is blocked
Lennart Poettering [Sun, 2 Mar 2025 06:51:05 +0000 (07:51 +0100)] 
sd-id128: gracefully handle systems where kernel keyring access is blocked

In various scenarios we invoke containers with access to the kernel
keyring blocked. Let's make sure we can handle this properly: when the
invocation ID is stored in in the kernel keyring and we try to read it
and get EPERM we should handle it gracefully, like EOPNOTSUPP.

8 months agoosc-context: several follow-ups (#36579)
Lennart Poettering [Sun, 2 Mar 2025 21:00:09 +0000 (22:00 +0100)] 
osc-context: several follow-ups (#36579)

8 months agovmspawn: switch from -drive to -blockdev option
Jörg Behrmann [Sun, 2 Mar 2025 15:07:54 +0000 (16:07 +0100)] 
vmspawn: switch from -drive to -blockdev option

8 months agocore/main: don't write shutdown OSC context outside of pid1 36579/head
Mike Yuan [Sun, 2 Mar 2025 14:11:29 +0000 (15:11 +0100)] 
core/main: don't write shutdown OSC context outside of pid1

Follow-up for 98c283131cda67c98946ef373e3bb33aa52de59a

8 months agorun: send out TERM= only if actually set
Mike Yuan [Sun, 2 Mar 2025 13:35:59 +0000 (14:35 +0100)] 
run: send out TERM= only if actually set

Follow-up for 4d6eb6441a5332c285e35907894c7d4f3463ba64

8 months agorun: log about osc_context_open_chpriv() failure
Mike Yuan [Sun, 2 Mar 2025 13:45:28 +0000 (14:45 +0100)] 
run: log about osc_context_open_chpriv() failure

Follow-up for 575922c914c732bb77c99aee54c84dc365d60631

8 months agoosc-context: drop unneeded temporary variable
Mike Yuan [Sun, 2 Mar 2025 15:00:39 +0000 (16:00 +0100)] 
osc-context: drop unneeded temporary variable

8 months agologin/pam_systemd: use isatty_safe()
Mike Yuan [Sun, 2 Mar 2025 15:00:05 +0000 (16:00 +0100)] 
login/pam_systemd: use isatty_safe()

Follow-up for d8069b8add9a2290d7ed85012f8459fccfc632ed

8 months agoRevert "sd-json: add new sd_json_variant_unset_field() call"
Lennart Poettering [Sun, 2 Mar 2025 05:57:25 +0000 (06:57 +0100)] 
Revert "sd-json: add new sd_json_variant_unset_field() call"

This reverts commit b6a2df630701de0bcf77850ced213d7fc3d0c4de.

The functionality is entirely redundant, we already have
sd_json_variant_filter() which does the same, and is in fact even more
powerful, since it takes a list instead of a single field to remove.

8 months agohwdb: Add accel orientation quirk for the GPD Pocket 4
Chris Grant [Sat, 1 Mar 2025 12:14:22 +0000 (01:14 +1300)] 
hwdb: Add accel orientation quirk for the GPD Pocket 4

8 months agohwdb: add Code Mercenaries Hard- und Software GmbH Virtual RC USB
Jaroslav Škarvada [Sat, 1 Mar 2025 12:16:24 +0000 (13:16 +0100)] 
hwdb: add Code Mercenaries Hard- und Software GmbH Virtual RC USB

It's official VRC USB dongle. Make it work in SDL apps, wine,
Steam, ... and fix the erratic mouse events when the dongle is in use.

8 months agoAdd a few more bypass environment variables
Daan De Meyer [Fri, 28 Feb 2025 16:14:49 +0000 (17:14 +0100)] 
Add a few more bypass environment variables

When we're building ParticleOS images, we don't want the package
manager (or mkosi) to run systemd-sysusers, systemd-tmpfiles or
systemctl preset so let's add a few more bypass environment
variables that we can set to have execution of these skipped like
we already have $SYSTEMD_HWDB_UPDATE_BYPASS and $KERNEL_INSTALL_BYPASS.

8 months agocore: Add DelegateNamespaces= (#36532)
Daan De Meyer [Sat, 1 Mar 2025 14:18:45 +0000 (15:18 +0100)] 
core: Add DelegateNamespaces= (#36532)

8 months agobuild(deps): bump github/codeql-action from 3.27.5 to 3.28.10
dependabot[bot] [Sat, 1 Mar 2025 09:57:32 +0000 (09:57 +0000)] 
build(deps): bump github/codeql-action from 3.27.5 to 3.28.10

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.28.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f09c1c0a94de965c15400f5634aa42fac8fb8f88...b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agobuild(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1
dependabot[bot] [Sat, 1 Mar 2025 09:57:25 +0000 (09:57 +0000)] 
build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1

Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.4.0 to 2.4.1.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/62b2cac7ed8198b15735ed49ab1e5cf35480ba46...f49aabe0b5af0936a0987cfb85d86b75731b0186)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Sat, 1 Mar 2025 09:57:22 +0000 (09:57 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.4.0 to 5.5.3.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/cc6721c45a8800cc666de45493545a07a638d121...dd551ce780d8af741f8cd8bab6982667b906b457)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>