]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
6 months agoudev: move error handling in event_requeue() to caller 37384/head
Yu Watanabe [Tue, 6 May 2025 17:46:11 +0000 (02:46 +0900)] 
udev: move error handling in event_requeue() to caller

Also, remove udev database on failure.

6 months agoudev: split out device_broadcast_on_error()
Yu Watanabe [Tue, 6 May 2025 17:32:56 +0000 (02:32 +0900)] 
udev: split out device_broadcast_on_error()

6 months agosd-device: rename arguments
Yu Watanabe [Tue, 6 May 2025 17:31:46 +0000 (02:31 +0900)] 
sd-device: rename arguments

To make it consistent with its declaration and other function
prototypes.

6 months agoudev: move timeout event sources from struct Event to struct Worker
Yu Watanabe [Tue, 6 May 2025 10:23:53 +0000 (19:23 +0900)] 
udev: move timeout event sources from struct Event to struct Worker

The timeout event sources are enabled only when the event is being
processed by a worker, hence they are not necessary to be owned by the
event.

No effective functional change, just refactoring.

6 months agoudev: list up all dependencies of an event when the first time it is examined
Yu Watanabe [Mon, 5 May 2025 17:25:32 +0000 (02:25 +0900)] 
udev: list up all dependencies of an event when the first time it is examined

No functional change, just refactoring.

6 months agoudev: check earlier if there is a free room for processing an event
Yu Watanabe [Mon, 5 May 2025 16:37:16 +0000 (01:37 +0900)] 
udev: check earlier if there is a free room for processing an event

6 months agoudev: cache last queued event entry
Yu Watanabe [Sat, 26 Apr 2025 06:09:12 +0000 (15:09 +0900)] 
udev: cache last queued event entry

When we have N queued events, LIST_APPEND() takes O(N).
Let's cache the last event to optimize queueing.

6 months agoudev: introduce event_freep() and use it as cleanup attribute
Yu Watanabe [Sat, 26 Apr 2025 06:37:11 +0000 (15:37 +0900)] 
udev: introduce event_freep() and use it as cleanup attribute

No functional change, just refactoring and preparation for later change.

6 months agoMore header cleanups (#37381)
Daan De Meyer [Fri, 9 May 2025 15:22:33 +0000 (17:22 +0200)] 
More header cleanups (#37381)

6 months agoudev: replace get_user/group_creds() with userdb/groupdb_by_name() (#37304)
Yu Watanabe [Fri, 9 May 2025 11:54:16 +0000 (20:54 +0900)] 
udev: replace get_user/group_creds() with userdb/groupdb_by_name() (#37304)

This also makes networkd not refuse User=/Group=root.

6 months agohwdb: keyboard: Add Alienware special keys
Kurt Borja [Thu, 8 May 2025 07:37:55 +0000 (04:37 -0300)] 
hwdb: keyboard: Add Alienware special keys

Add Alienware *Performance mode* toggle key and *Macro* keys.

Signed-off-by: Kurt Borja <kuurtb@gmail.com>
6 months agoAdd emulated release to G-Mode key
Marcos Alano [Thu, 8 May 2025 10:28:16 +0000 (07:28 -0300)] 
Add emulated release to G-Mode key

6 months agostrv: Move STRV_FOREACH() to strv-fundamental.h 37381/head
Daan De Meyer [Wed, 7 May 2025 19:43:39 +0000 (21:43 +0200)] 
strv: Move STRV_FOREACH() to strv-fundamental.h

6 months agoalloc-util: Remove unneeded stdlib.h include
Daan De Meyer [Tue, 6 May 2025 12:20:43 +0000 (14:20 +0200)] 
alloc-util: Remove unneeded stdlib.h include

6 months agocompress: Drop lz4 includes from compress.h
Daan De Meyer [Wed, 7 May 2025 09:43:44 +0000 (11:43 +0200)] 
compress: Drop lz4 includes from compress.h

The lz4 functions are only used in test-compress.c, so let's just
put the declarations and includes in there instead of having everyone
including compress.h pull in the lz4 headers.

6 months agoterminal-util: Move various functions to ansi-color.c
Daan De Meyer [Wed, 7 May 2025 09:26:36 +0000 (11:26 +0200)] 
terminal-util: Move various functions to ansi-color.c

6 months agobasic: Move parts of audit-util.{c,h} to libaudit-util.{c,h} in shared/
Daan De Meyer [Wed, 7 May 2025 09:15:12 +0000 (11:15 +0200)] 
basic: Move parts of audit-util.{c,h} to libaudit-util.{c,h} in shared/

6 months agomacro: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 14:03:20 +0000 (16:03 +0200)] 
macro: Reduce transitive includes

6 months agobasic: Override glibc's sys/param.h header with an empty file
Daan De Meyer [Tue, 6 May 2025 13:39:03 +0000 (15:39 +0200)] 
basic: Override glibc's sys/param.h header with an empty file

Instead of unconditionally including sys/param.h in
macro-fundamental.h which itself includes a bunch of other unnecessary
headers, let's override it with an empty file to avoid it from overriding
our MAX() macro. We can't make including it an error as it's included (
for seemingly no good reason) by <resolv.h>.

6 months agoudevadm-info: parse all arguments before doing anything (#37292)
Yu Watanabe [Fri, 9 May 2025 05:09:45 +0000 (14:09 +0900)] 
udevadm-info: parse all arguments before doing anything (#37292)

6 months agoudevadm-info: use string table to parse query type 37292/head
David Tardon [Wed, 7 May 2025 13:05:22 +0000 (15:05 +0200)] 
udevadm-info: use string table to parse query type

6 months agoudevadm-info: drop args of stat_device()
David Tardon [Fri, 25 Apr 2025 12:56:35 +0000 (14:56 +0200)] 
udevadm-info: drop args of stat_device()

They are all static vars now, so can be used directly.

6 months agoudevadm-info: shorten the code a bit
David Tardon [Fri, 25 Apr 2025 12:36:02 +0000 (14:36 +0200)] 
udevadm-info: shorten the code a bit

6 months agoudevadm-info: reject devices passed via opts too
David Tardon [Wed, 7 May 2025 12:35:54 +0000 (14:35 +0200)] 
udevadm-info: reject devices passed via opts too

Follow-up-for a6b4b2fa010f6dc5e18f1a14d93204c6c1416278

6 months agoudevadm-info: split arg. parsing into a separate function
David Tardon [Fri, 3 Nov 2023 13:56:52 +0000 (14:56 +0100)] 
udevadm-info: split arg. parsing into a separate function

6 months agoudevadm-info: drop superfluous pager_open() call
David Tardon [Fri, 25 Apr 2025 12:42:34 +0000 (14:42 +0200)] 
udevadm-info: drop superfluous pager_open() call

It's already called in advance in info_main().

6 months agoudevadm-info: make arg_pager_flags static
David Tardon [Thu, 17 Apr 2025 08:21:41 +0000 (10:21 +0200)] 
udevadm-info: make arg_pager_flags static

6 months agoudevadm-info: move static dtor closer to args
David Tardon [Thu, 17 Apr 2025 08:20:33 +0000 (10:20 +0200)] 
udevadm-info: move static dtor closer to args

6 months agoudev: use userdb_by_name()/groupdb_by_name() 37304/head
Yu Watanabe [Wed, 30 Apr 2025 11:43:44 +0000 (20:43 +0900)] 
udev: use userdb_by_name()/groupdb_by_name()

Prompted by https://github.com/systemd/systemd/pull/37294#discussion_r2068141968.

6 months agouserdb: introduce USERDB_SYNTHESIZE_NUMERIC flag
Yu Watanabe [Fri, 9 May 2025 02:18:02 +0000 (11:18 +0900)] 
userdb: introduce USERDB_SYNTHESIZE_NUMERIC flag

When the flag is set, even if the specified UID/GID does not exist,
create a synthetic user record for the UID/GID.
Currently, only system UID/GID are supported.

6 months agonetwork/tuntap: allow to specify root to User=/Group=
Yu Watanabe [Wed, 30 Apr 2025 16:30:35 +0000 (01:30 +0900)] 
network/tuntap: allow to specify root to User=/Group=

Follow-up for 940441b44c7040d62ae58b66bf124e9a0dae578d.

With the commit, User=/Group=root was refused and warned that the root
is not a system user. Typically it is not necessary to specify such, but
let's not log confusing warning and honor the setting.

6 months agouser-record: introduce USERDB_MATCH_ROOT_AND_SYSTEM
Yu Watanabe [Wed, 30 Apr 2025 14:27:59 +0000 (23:27 +0900)] 
user-record: introduce USERDB_MATCH_ROOT_AND_SYSTEM

It may be useful when we want to resolve root and system user/group
but want to refuse nobody user/group.

6 months agouserdb: introduce user/group_record_buildo() helper macros
Yu Watanabe [Wed, 30 Apr 2025 13:53:35 +0000 (22:53 +0900)] 
userdb: introduce user/group_record_buildo() helper macros

6 months agouser-util,user-record-nss: initialize buffer before calling getpwnam_r() and friends
Yu Watanabe [Thu, 1 May 2025 03:44:23 +0000 (12:44 +0900)] 
user-util,user-record-nss: initialize buffer before calling getpwnam_r() and friends

The buffer will be used by a library outside of our code base,
and may not be initialized even on success. Let's initialize
them for safety.

Hopefully fixes the following fuzzer warning:
```
==2039==WARNING: MemorySanitizer: use-of-uninitialized-value
    #0 0x7f9ad8be3ae6 in _nss_files_getsgnam_r (/lib/x86_64-linux-gnu/libnss_files.so.2+0x8ae6) (BuildId: 013bf05b4846ebbdbebdb05585acc9726c2fabce)
    #1 0x7f9ad93e5902 in getsgnam_r (/lib/x86_64-linux-gnu/libc.so.6+0x126902) (BuildId: 0323ab4806bee6f846d9ad4bccfc29afdca49a58)
    #2 0x7f9ad9b98153 in nss_sgrp_for_group /work/build/../../src/systemd/src/shared/user-record-nss.c:357:21
    #3 0x7f9ad9b98926 in nss_group_record_by_gid /work/build/../../src/systemd/src/shared/user-record-nss.c:431:21
    #4 0x7f9ad9bcebd7 in groupdb_by_gid_fallbacks /work/build/../../src/systemd/src/shared/userdb.c:1372:29

  Uninitialized value was created by a heap allocation
    #0 0x556fd5294302 in malloc /src/llvm-project/compiler-rt/lib/msan/msan_interceptors.cpp:1021:3
    #1 0x7f9ad9b9811d in nss_sgrp_for_group /work/build/../../src/systemd/src/shared/user-record-nss.c:353:23
    #2 0x7f9ad9b98926 in nss_group_record_by_gid /work/build/../../src/systemd/src/shared/user-record-nss.c:431:21
    #3 0x7f9ad9bcebd7 in groupdb_by_gid_fallbacks /work/build/../../src/systemd/src/shared/userdb.c:1372:29
```

6 months agoudevadm-trigger: parse all arguments before doing anything (#37293)
Yu Watanabe [Fri, 9 May 2025 03:09:18 +0000 (12:09 +0900)] 
udevadm-trigger: parse all arguments before doing anything (#37293)

6 months agoudev: enable kill workers timer when processing events stopped (#37382)
Yu Watanabe [Fri, 9 May 2025 01:42:48 +0000 (10:42 +0900)] 
udev: enable kill workers timer when processing events stopped (#37382)

This also extends test cases for
`udevadm control --start-exec-queue/--stop-exec-queue`.

6 months agoudevadm-trigger: use string table to parse scan type 37293/head
David Tardon [Wed, 7 May 2025 14:11:38 +0000 (16:11 +0200)] 
udevadm-trigger: use string table to parse scan type

6 months agoudevadm-trigger: add prefix to enumeration values
David Tardon [Tue, 29 Apr 2025 12:02:37 +0000 (14:02 +0200)] 
udevadm-trigger: add prefix to enumeration values

6 months agoudevadm-trigger: replace home-made key/value splitting function
David Tardon [Tue, 29 Apr 2025 11:57:10 +0000 (13:57 +0200)] 
udevadm-trigger: replace home-made key/value splitting function

6 months agotest: extend udevadm coverage test a bit
David Tardon [Tue, 29 Apr 2025 12:34:44 +0000 (14:34 +0200)] 
test: extend udevadm coverage test a bit

6 months agoudevadm: allow key without a value
David Tardon [Tue, 29 Apr 2025 12:29:59 +0000 (14:29 +0200)] 
udevadm: allow key without a value

6 months agoudevadm: move key/value parsing func. to udevadm-util.c
David Tardon [Tue, 29 Apr 2025 12:22:15 +0000 (14:22 +0200)] 
udevadm: move key/value parsing func. to udevadm-util.c

6 months agoudevadm-trigger: split arg. parsing into a separate function
David Tardon [Tue, 29 Apr 2025 08:36:28 +0000 (10:36 +0200)] 
udevadm-trigger: split arg. parsing into a separate function

6 months agoudevadm-trigger: add vertical space to separate cases
David Tardon [Tue, 29 Apr 2025 08:09:11 +0000 (10:09 +0200)] 
udevadm-trigger: add vertical space to separate cases

6 months agoTEST-17-UDEV: extend test cases for udevadm control --start-exec-queue/--stop-exec... 37382/head
Yu Watanabe [Wed, 7 May 2025 19:18:58 +0000 (04:18 +0900)] 
TEST-17-UDEV: extend test cases for udevadm control --start-exec-queue/--stop-exec-queue

6 months agoTEST-17-UDEV: drop needless numbering
Yu Watanabe [Wed, 7 May 2025 19:07:04 +0000 (04:07 +0900)] 
TEST-17-UDEV: drop needless numbering

The subtest was renamed from TEST-17-UDEV.10.sh.
Let's also drop the numbering from function name and interface name.

Follow-up for 40959dcc028a6884fbea00c11d89217a77716d4d.

6 months agoudev: enable kill workers timer when processing queued events stopped
Yu Watanabe [Wed, 7 May 2025 16:07:44 +0000 (01:07 +0900)] 
udev: enable kill workers timer when processing queued events stopped

It is not necessary to keep idle workers so long time in that case.

6 months agohashmap,prioq: check hash_ops or compare_func is identical to one already set (#37379)
Mike Yuan [Thu, 8 May 2025 20:50:38 +0000 (22:50 +0200)] 
hashmap,prioq: check hash_ops or compare_func is identical to one already set (#37379)

6 months agoudev-worker: send path to device node of whole disk when it is locked, and one cleanu...
Daan De Meyer [Thu, 8 May 2025 06:20:21 +0000 (08:20 +0200)] 
udev-worker: send path to device node of whole disk when it is locked, and one cleanup (#37385)

6 months agoboot: add an option to control action after SecureBoot enrollment (#36684)
Itxaka [Thu, 8 May 2025 04:28:41 +0000 (06:28 +0200)] 
boot: add an option to control action after SecureBoot enrollment (#36684)

This PR provides a new option for systemd-boot
`secure-boot-enroll-action` which allows to configure the behavior after
SecureBoot keys are enrolled.

Provides the option to either reboot or power off.

The current behavior is not changed, it will by default reboot as it did
before.

It also provides a small message about the action its going to take with
a small delay so the user can read it.

6 months agoprioq: make prioq_ensure_put() type safe 37379/head
Yu Watanabe [Wed, 7 May 2025 16:59:40 +0000 (01:59 +0900)] 
prioq: make prioq_ensure_put() type safe

6 months agoprioq: check if identical compare func is specified if already allocated
Yu Watanabe [Wed, 7 May 2025 17:01:55 +0000 (02:01 +0900)] 
prioq: check if identical compare func is specified if already allocated

6 months agohashmap: check if identical hash_ops is specified if already allocated
Yu Watanabe [Wed, 7 May 2025 17:06:28 +0000 (02:06 +0900)] 
hashmap: check if identical hash_ops is specified if already allocated

6 months agoresolve: use set_put_strdup_full() to specify hash_ops
Yu Watanabe [Wed, 7 May 2025 20:53:23 +0000 (05:53 +0900)] 
resolve: use set_put_strdup_full() to specify hash_ops

6 months agocore/unit: use the same hash_ops originally used on allocation
Yu Watanabe [Wed, 7 May 2025 19:59:37 +0000 (04:59 +0900)] 
core/unit: use the same hash_ops originally used on allocation

See unit_file_build_name_map().

6 months agoset: rename _set_ensure_allocated() -> set_ensure_allocated()
Yu Watanabe [Wed, 7 May 2025 17:10:31 +0000 (02:10 +0900)] 
set: rename _set_ensure_allocated() -> set_ensure_allocated()

Follow-ups for c09ce222b6379e8f73695e5ce53fce76a44d78c7.

6 months agonetwork: log_link_message_debug_errno() automatically append %m if necessary
Yu Watanabe [Wed, 7 May 2025 17:21:59 +0000 (02:21 +0900)] 
network: log_link_message_debug_errno() automatically append %m if necessary

Follow-up for d28746ef552b11cba8890963f49ce3e0082e6053.
Fixes CID#1609753.

6 months agoudev-worker: notify device node of whole disk to manager when the disk is locked 37385/head
Yu Watanabe [Tue, 6 May 2025 16:02:26 +0000 (01:02 +0900)] 
udev-worker: notify device node of whole disk to manager when the disk is locked

It is currently unused, but will be used later.

6 months agoudev-worker: allocate UdevEvent object just before use
Yu Watanabe [Tue, 6 May 2025 15:59:56 +0000 (00:59 +0900)] 
udev-worker: allocate UdevEvent object just before use

No functional change, just refactoring.

6 months agoman: fix typo
Yu Watanabe [Wed, 7 May 2025 18:37:35 +0000 (03:37 +0900)] 
man: fix typo

Follow-up for a50fa2a40f4a91d49503d3588a3dd29ea05e559b.

6 months agoboot: Add EDID (#36843)
Yu Watanabe [Wed, 7 May 2025 17:48:00 +0000 (02:48 +0900)] 
boot: Add EDID (#36843)

This adds a couple of custom CHIDs which include panel manufacturer and
product code.

6 months agoexec-util: make missing agents a gracefull handled issues
Lennart Poettering [Wed, 7 May 2025 15:47:01 +0000 (17:47 +0200)] 
exec-util: make missing agents a gracefull handled issues

Just downgrade the log message in case of ENOENT of agent binaries to
LOG_DEBUG. Do this in order to support distros which split off some
agent bianries into separate optional binaries.

Fixes: #37369
6 months agoflush_ports: flush POSIX message queues properly
Todd C. Miller [Tue, 6 May 2025 22:39:14 +0000 (16:39 -0600)] 
flush_ports: flush POSIX message queues properly

On Linux, read() on a message queue descriptor returns the message
queue statistics, not the actual message queue data.  We need to use
mq_receive() to drain the queues instead.

Fixes a problem where a POSIX message queue socket unit with messages
in the queue at shutdown time could result in a hang on reboot/shutdown.

6 months agounits: enable IgnoreOnIsolate=yes on systemd-udevd-kernel.socket
Yu Watanabe [Wed, 7 May 2025 12:44:22 +0000 (21:44 +0900)] 
units: enable IgnoreOnIsolate=yes on systemd-udevd-kernel.socket

Otherwise, initrd-cleanup.service requests isolation thus the socket
is stopped before switching root, and several early events after
switching root may be lost.

6 months agoanalyze-chid: Support EDID CHIDs 36843/head
anonymix007 [Mon, 31 Mar 2025 17:41:15 +0000 (20:41 +0300)] 
analyze-chid: Support EDID CHIDs

6 months agosd-device: Introduce sd_device_get_sysattr_value_with_size()
anonymix007 [Tue, 1 Apr 2025 14:40:29 +0000 (17:40 +0300)] 
sd-device: Introduce sd_device_get_sysattr_value_with_size()

6 months agochid: Setup EDID CHIDs
anonymix007 [Mon, 24 Mar 2025 13:53:49 +0000 (16:53 +0300)] 
chid: Setup EDID CHIDs

6 months agochid-fundamental: Introduce new CHID types
anonymix007 [Mon, 24 Mar 2025 13:43:12 +0000 (16:43 +0300)] 
chid-fundamental: Introduce new CHID types

These are extra types needed to distinguish devices by the installed
display panel

6 months agoboot: Add EDID parsing
anonymix007 [Mon, 31 Mar 2025 17:56:58 +0000 (20:56 +0300)] 
boot: Add EDID parsing

Will be used for identifying the currently used display panel
and choosing the appropriate DTB

6 months agofundamental: Introduce EDID header parsing
anonymix007 [Mon, 31 Mar 2025 17:38:24 +0000 (20:38 +0300)] 
fundamental: Introduce EDID header parsing

6 months agoboot: Add be16toh, le16toh and le32toh
anonymix007 [Mon, 31 Mar 2025 17:37:13 +0000 (20:37 +0300)] 
boot: Add be16toh, le16toh and le32toh

6 months agofundamental: Move common string constants from basic/string-util.h to string-util...
anonymix007 [Wed, 7 May 2025 15:01:07 +0000 (18:01 +0300)] 
fundamental: Move common string constants from basic/string-util.h to string-util-fundamental.h

6 months agoReduce the number of transitive includes (#37364)
Yu Watanabe [Wed, 7 May 2025 13:58:09 +0000 (22:58 +0900)] 
Reduce the number of transitive includes (#37364)

6 months agostatic-destruct: Reduce transitive includes 37364/head
Daan De Meyer [Mon, 5 May 2025 12:28:08 +0000 (14:28 +0200)] 
static-destruct: Reduce transitive includes

6 months agoiovec-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 12:15:47 +0000 (14:15 +0200)] 
iovec-util: Reduce transitive includes

6 months agorm-rf: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 12:13:11 +0000 (14:13 +0200)] 
rm-rf: Reduce transitive includes

6 months agoconf-parser: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 12:09:05 +0000 (14:09 +0200)] 
conf-parser: Reduce transitive includes

6 months agodevice-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 11:32:55 +0000 (13:32 +0200)] 
device-util: Reduce transitive includes

6 months agostrv: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 11:27:39 +0000 (13:27 +0200)] 
strv: Reduce transitive includes

6 months agopath-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 10:18:39 +0000 (12:18 +0200)] 
path-util: Reduce transitive includes

6 months agofs-util: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 08:50:25 +0000 (10:50 +0200)] 
fs-util: Reduce transitive includes

6 months agoaf-list: Remove transitive includes
Daan De Meyer [Tue, 6 May 2025 11:33:49 +0000 (13:33 +0200)] 
af-list: Remove transitive includes

6 months agotest-sd-login: add a "test" that just calls all sd_pid_get_* functions
Zbigniew Jędrzejewski-Szmek [Tue, 6 May 2025 11:42:27 +0000 (13:42 +0200)] 
test-sd-login: add a "test" that just calls all sd_pid_get_* functions

As a test, it just increases our code coverage in a fake way.
When run manually, it can be used to conveniently print what logind
thinks about various processes:

$ build/test-sd-login
sd_pid_get_session(0) → No data available
sd_pid_get_unit(0) → user@1000.service
sd_pid_get_user_unit(0) → app-ghostty-transient-5088.scope
sd_pid_get_machine_name(0) → No such file or directory
sd_pid_get_slice(0) → user-1000.slice
sd_pid_get_user_slice(0) → app.slice
sd_pid_get_owner_uid(0) → 1000
sd_pid_get_cgroup(0) → /user.slice/user-1000.slice/user@1000.service/app.slice/app-ghostty-transient-5088.scope/surfaces/556FAF50BA40.scope

$ build/test-sd-login cgroup 1
sd_pid_get_cgroup(1) → /init.scope

6 months agotest-sd-device: drop chunk added by mistake
Zbigniew Jędrzejewski-Szmek [Thu, 10 Apr 2025 14:00:59 +0000 (16:00 +0200)] 
test-sd-device: drop chunk added by mistake

I initially wrote it this way, but then decided to implement a loop
limit, but forgot to drop the first approach in one place.
Fixup for 74cb65e45fbf3468cf6b522e4b4fa568d95f12c6.

6 months agoReword descriptions of RestrictAddressFamilies= and SystemCallFilter= (#37367)
Yu Watanabe [Wed, 7 May 2025 06:34:25 +0000 (15:34 +0900)] 
Reword descriptions of RestrictAddressFamilies= and SystemCallFilter= (#37367)

6 months agostring-table: annotate _to_string and _from_string with _const_ and _pure_, respectively
Mike Yuan [Tue, 6 May 2025 17:28:48 +0000 (19:28 +0200)] 
string-table: annotate _to_string and _from_string with _const_ and _pure_, respectively

Follow-up for c94f6ab1bf659963bd040301cfe24c991b8db069

6 months agoman/systemd.exec: reword description of RestrictAddressFamilies= 37367/head
Zbigniew Jędrzejewski-Szmek [Tue, 6 May 2025 18:59:59 +0000 (20:59 +0200)] 
man/systemd.exec: reword description of RestrictAddressFamilies=

The text is reordered and broken into more paragraphs.
A recommendation to combine RestrictAddressFamilies= with
SystemCallFilter=@service is added.

6 months agoman/systemd.exec: reword description of SystemCallFilter=
Zbigniew Jędrzejewski-Szmek [Tue, 6 May 2025 19:04:00 +0000 (21:04 +0200)] 
man/systemd.exec: reword description of SystemCallFilter=

The existing text grew organically as features were added and was
not very organized. Reorder it and break into paragraphs grouped
by topic. The description of the :errno syntax is replaced by a short
reference to the SystemCallErrorNumber= setting. This makes the
text shorter and makes it easier to explain how the two settings combine.

6 months agoReplace reference URLs with working ones
damnkiwi6120 [Tue, 6 May 2025 18:53:32 +0000 (02:53 +0800)] 
Replace reference URLs with working ones

The linuxfoundation.org entry at L50 goes 404, so I replace it with a working one from kernel.org.

Both links are checked with archive.org.
https://web.archive.org/web/20231114104223/https://lists.linuxfoundation.org/pipermail/virtualization/2015-August/030331.html
https://web.archive.org/web/20230503084037/https://docs.kernel.org/s390/pci.html

6 months agocore/service: minor cleanups (#37362)
Yu Watanabe [Tue, 6 May 2025 17:09:19 +0000 (02:09 +0900)] 
core/service: minor cleanups (#37362)

Split out from #37071

6 months agorun0: disable IgnoreSIGPIPE= for transient unit
Mike Yuan [Tue, 15 Apr 2025 19:19:25 +0000 (21:19 +0200)] 
run0: disable IgnoreSIGPIPE= for transient unit

6 months agoBugprone argument comments - round 3 (#37356)
Yu Watanabe [Tue, 6 May 2025 16:38:34 +0000 (01:38 +0900)] 
Bugprone argument comments - round 3 (#37356)

Follow up from https://github.com/systemd/systemd/pull/37346

6 months agodocs: fix typos
Salim B [Tue, 6 May 2025 15:33:54 +0000 (17:33 +0200)] 
docs: fix typos

6 months agotree-wide: Get rid of prefix_roota() in favor of path_join()
Daan De Meyer [Mon, 5 May 2025 10:05:15 +0000 (12:05 +0200)] 
tree-wide: Get rid of prefix_roota() in favor of path_join()

We deprecated prefix_roota() in favor of chase() and path_join().
Let's finish the removal by replacing the few remaining call sites
with path_join().

6 months agotree-wide: Remove strv_from_stdarg_alloca()
Daan De Meyer [Mon, 5 May 2025 10:42:08 +0000 (12:42 +0200)] 
tree-wide: Remove strv_from_stdarg_alloca()

It's trivial to replace all uses of this function with STRV_MAKE()
and strv_new_ap() so let's get rid of this variant.

6 months agomacro: implement ABS via __builtin_imaxabs()
Mike Yuan [Tue, 6 May 2025 12:41:17 +0000 (14:41 +0200)] 
macro: implement ABS via __builtin_imaxabs()

6 months agoboot: make console_key_read() return param optional
Lennart Poettering [Tue, 6 May 2025 13:05:05 +0000 (15:05 +0200)] 
boot: make console_key_read() return param optional

Inspired by #36684

6 months agoAdd missing alloc-util.h to string-util.h
Daan De Meyer [Tue, 6 May 2025 13:48:49 +0000 (15:48 +0200)] 
Add missing alloc-util.h to string-util.h

Used by strndupa_safe() and strdupa_safe().

Follow up for 02207b54d5edceb11fc1deea7553ff83ccb5acf6

6 months agocore: prefer American spelling of canceled 37356/head
Jelle van der Waa [Tue, 6 May 2025 14:24:42 +0000 (16:24 +0200)] 
core: prefer American spelling of canceled

6 months agolibsystemd-network: correct argument comment
Jelle van der Waa [Tue, 6 May 2025 11:26:06 +0000 (13:26 +0200)] 
libsystemd-network: correct argument comment