]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agopager: also check for $SUDO_UID 37419/head
Zbigniew Jędrzejewski-Szmek [Tue, 6 May 2025 12:29:02 +0000 (14:29 +0200)] 
pager: also check for $SUDO_UID

This returns to the original approach proposed in
https://github.com/systemd/systemd/pull/17270. After review, the approach was
changed to use sd_pid_get_owner_uid() instead. Back then, when running in a
typical graphical session, sd_pid_get_owner_uid() would usually return the user
UID, and when running under sudo, geteuid() would return 0, so we'd trigger the
secure path.

sudo may allocate a new session if is invoked outside of a session (depending
on the PAM config). Since nowadays desktop environments usually start the user
shell through user units, the typical shell in a terminal emulator is not part
of a session, and when sudo is invoked, a new session is allocated, and
sd_pid_get_owner_uid() returns 0 too. Technically, the code still works as
documented in the man page, but in the common case, it doesn't do the expected
thing.

$ build/test-sd-login |& rg 'get_(owner_uid|cgroup|session)'
sd_pid_get_session(0) → No data available
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

$ sudo build/test-sd-login |& rg 'get_(owner_uid|cgroup|session)'
sd_pid_get_session(0) → c289
sd_pid_get_owner_uid(0) → 0
sd_pid_get_cgroup(0) → /user.slice/user-0.slice/session-c289.scope

I think it's worth checking for sudo because it is a common case used by users.
There obviously are other mechanims, so the man page is extended to say that
only some common mechanisms are supported, and to (again) recommend setting
SYSTEMD_LESSSECURE explicitly. The other option would be to set "secure mode"
by default. But this would create an inconvenience for users doing the right
thing, running systemctl and other tools directly, because then they can't run
privileged commands from the pager, e.g. to save the output to a file. (Or the
user would need to explicitly set SYSTEMD_LESSSECURE. One option would be to
set it always in the environment and to rely on sudo and other tools stripping
it from the environment before running privileged code. But that is also fairly
fragile and it obviously relies on the user doing a complicated setup to
support a fairly common use case. I think this decreases usability of the
system quite a bit. I don't think we should build solutions that work in
priniciple, but are painfully inconvenient in common cases.)

Fixes https://yeswehack.com/vulnerability-center/reports/346802.

Also see https://github.com/polkit-org/polkit/pull/562, which adds support for
$SUDO_UID/$SUDO_GID to pkexec.

6 months agoman: rework the description of $SYSTEMD_PAGER and $PAGER
Zbigniew Jędrzejewski-Szmek [Tue, 6 May 2025 09:37:26 +0000 (11:37 +0200)] 
man: rework the description of $SYSTEMD_PAGER and $PAGER

$PAGER wasn't documented, but actually we treat it same as $SYSTEMD_PAGER,
except for lower priority. And the two variables can be used to disable the
pager, even if $SYSTEMD_PAGERSECURE is not set.

Behaviour is (obviously) not changed by this patch, it intentionally just
updates the docs to match the code.

6 months agoman: reword the description of "secure pager" handling
Zbigniew Jędrzejewski-Szmek [Tue, 6 May 2025 09:14:10 +0000 (11:14 +0200)] 
man: reword the description of "secure pager" handling

The existing description was not *wrong*, but it was a bit muddled. Let's
reorder the text to give a short intro and then describe what the options
actually do and the clear "true" and "false" cases first, and then describe
autodetection.

Related to https://yeswehack.com/vulnerability-center/reports/346802.

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

6 months agotreewide: correct argument comments for show_boot_entry
Jelle van der Waa [Tue, 6 May 2025 11:11:40 +0000 (13:11 +0200)] 
treewide: correct argument comments for show_boot_entry

6 months agotest: correct argument comment expected
Jelle van der Waa [Tue, 6 May 2025 11:08:06 +0000 (13:08 +0200)] 
test: correct argument comment expected

6 months agotreewide: correct argument comments for event_reset_time_relative
Jelle van der Waa [Tue, 6 May 2025 11:06:00 +0000 (13:06 +0200)] 
treewide: correct argument comments for event_reset_time_relative

6 months agoshared: use implementation argument naming for dissect_loop_device
Jelle van der Waa [Tue, 6 May 2025 10:56:18 +0000 (12:56 +0200)] 
shared: use implementation argument naming for dissect_loop_device

6 months agotreewide: correct argument comments for sd_notify
Jelle van der Waa [Tue, 6 May 2025 10:53:13 +0000 (12:53 +0200)] 
treewide: correct argument comments for sd_notify

6 months agocore: correct argument comments
Jelle van der Waa [Tue, 6 May 2025 10:27:00 +0000 (12:27 +0200)] 
core: correct argument comments

6 months agocore/service: correct comment in service_deserialize_exec_command() 37362/head
Mike Yuan [Wed, 9 Apr 2025 13:22:37 +0000 (15:22 +0200)] 
core/service: correct comment in service_deserialize_exec_command()

The index of ExecCommand is serialized, not PID.

6 months agocore/service: drop duplicate ExecCommand check
Mike Yuan [Mon, 5 May 2025 20:12:09 +0000 (22:12 +0200)] 
core/service: drop duplicate ExecCommand check

It is verified in config_parse_exec() and bus_set_transient_exec_command()
already.

6 months agoalloc-util: Move strdupa_safe() and strndupa_safe() to string-util.h
Daan De Meyer [Mon, 5 May 2025 19:50:56 +0000 (21:50 +0200)] 
alloc-util: Move strdupa_safe() and strndupa_safe() to string-util.h

6 months agosd-varlink: sd_varlink_dispatch rename table to dispatch_table
Jelle van der Waa [Tue, 6 May 2025 09:52:24 +0000 (11:52 +0200)] 
sd-varlink: sd_varlink_dispatch rename table to dispatch_table

Follow the argument style used throughout the codebase.

6 months agostring-util: Remove utf8.h and alloc-util.h includes
Daan De Meyer [Sun, 4 May 2025 15:43:09 +0000 (17:43 +0200)] 
string-util: Remove utf8.h and alloc-util.h includes

6 months agocleanup: bugprone argument issues (#37346)
Yu Watanabe [Tue, 6 May 2025 09:56:07 +0000 (18:56 +0900)] 
cleanup: bugprone argument issues (#37346)

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

6 months agoVarious preparatory changes from #37344 (#37348)
Daan De Meyer [Tue, 6 May 2025 09:23:15 +0000 (11:23 +0200)] 
Various preparatory changes from #37344 (#37348)

6 months agohashmap: Drop debug params 37348/head
Daan De Meyer [Sun, 4 May 2025 11:31:07 +0000 (13:31 +0200)] 
hashmap: Drop debug params

Passing in the func, file and line information complicates the
interface. On top of that, it prevents forward declaring Hashmap in
strv.h, as we need to pass the macros everywhere that we allocate a
hashmap, which means we have to include the hashmap header everywhere
we have a function that allocates a hashmap instead of just having to
forward declare Hashmap.

Let's drop the file, func and line information from the debug information.
Instead, in the future we can add a description field to hashmaps like we
already have in various other structs to describe the purpose of the hashmap
which should be much more useful than having the file, line and function where
the hashmap was allocated.

6 months agomacro: Introduce ABS() macro and use it in header files
Daan De Meyer [Tue, 6 May 2025 07:53:56 +0000 (09:53 +0200)] 
macro: Introduce ABS() macro and use it in header files

abs() requires including the entirety of stdlib.h just for a single
trivial function. Let's introduce the ABS() macro and use it in header
files instead so we can get rid of stdlib.h transitive includes in header
files in a later commit.

6 months agostring-table: Move more implementation logic into functions
Daan De Meyer [Sat, 3 May 2025 15:59:19 +0000 (17:59 +0200)] 
string-table: Move more implementation logic into functions

Let's move some more implementation logic into functions. We keep
the logic that requires the macro in the macro and move the rest into
functions.

While we're at it, let's also make the parameter declarations of
all the string table macros less clausthrophobic.

6 months agomain-func: Reduce transitive includes
Daan De Meyer [Mon, 5 May 2025 20:06:17 +0000 (22:06 +0200)] 
main-func: Reduce transitive includes

Let's move some logic from _DEFINE_MAIN_FUNCTION() and other places
in main-func.h into functions that we implement in main-func.c to
allow moving some included headers from the header to the .c file.

6 months agoshared: fix leftover bool value from flags conversion 37346/head
Jelle van der Waa [Tue, 6 May 2025 07:31:50 +0000 (09:31 +0200)] 
shared: fix leftover bool value from flags conversion

Follow-up for 5c48335ef4cc1c930c86c6e893f3ab3e5472f7f6

6 months agohibernate-resume: automatically decrypt dissected swap (#37335)
Yu Watanabe [Tue, 6 May 2025 04:00:24 +0000 (13:00 +0900)] 
hibernate-resume: automatically decrypt dissected swap (#37335)

Closes https://github.com/systemd/systemd/issues/27247
(https://github.com/systemd/systemd/pull/35328,
https://github.com/systemd/systemd/issues/37330)

6 months agonetwork,udev: several improvements for logging (#37337)
Yu Watanabe [Tue, 6 May 2025 03:43:15 +0000 (12:43 +0900)] 
network,udev: several improvements for logging (#37337)

No functional changes. Continuation of #37269.

6 months agoprioq: coding style fixes
Yu Watanabe [Mon, 5 May 2025 13:28:16 +0000 (22:28 +0900)] 
prioq: coding style fixes

6 months agoshared: rename type to fstype
Jelle van der Waa [Mon, 5 May 2025 19:34:31 +0000 (21:34 +0200)] 
shared: rename type to fstype

Follow the argument comment naming already used.