]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
12 days agoudev-builtin-input-id: drop unused value 41065/head
Yu Watanabe [Thu, 12 Mar 2026 05:37:37 +0000 (14:37 +0900)] 
udev-builtin-input-id: drop unused value

12 days agotree-wide: use device_get_sysattr_unsigned() and friends
Yu Watanabe [Wed, 11 Mar 2026 22:07:12 +0000 (07:07 +0900)] 
tree-wide: use device_get_sysattr_unsigned() and friends

12 days agoudev-builtin-usb_id: make set_usb_iftype() and friends return const char*
Yu Watanabe [Sun, 17 May 2026 16:10:17 +0000 (01:10 +0900)] 
udev-builtin-usb_id: make set_usb_iftype() and friends return const char*

12 days agoudev-builtin-usb_id: use device_get_sysattr_unsigned() and friends
Yu Watanabe [Wed, 11 Mar 2026 22:06:00 +0000 (07:06 +0900)] 
udev-builtin-usb_id: use device_get_sysattr_unsigned() and friends

This also fix the parser of bInterfaceClass from safe_atoi() to
safe_atou_full() as it is unsigned hex.

12 days agosd-device: also add device_get_sysattr_streq()
Yu Watanabe [Thu, 12 Mar 2026 00:53:13 +0000 (09:53 +0900)] 
sd-device: also add device_get_sysattr_streq()

12 days agosd-device: also add device_get_sysattr_u8() and _u16()
Yu Watanabe [Thu, 12 Mar 2026 00:48:22 +0000 (09:48 +0900)] 
sd-device: also add device_get_sysattr_u8() and _u16()

12 days agosd-device: use macro to define device_get_sysattr_int() and friends
Yu Watanabe [Thu, 12 Mar 2026 00:26:29 +0000 (09:26 +0900)] 
sd-device: use macro to define device_get_sysattr_int() and friends

12 days agotest: add test cases for device_get_sysattr_int() and friends
Yu Watanabe [Thu, 12 Mar 2026 00:19:34 +0000 (09:19 +0900)] 
test: add test cases for device_get_sysattr_int() and friends

12 days agosd-device: rename argument names for storing result
Yu Watanabe [Thu, 12 Mar 2026 00:00:10 +0000 (09:00 +0900)] 
sd-device: rename argument names for storing result

When a function takes only one argument for storing result, the argument
is not necessary to be named as ret_xyz, but ret should be enough.

12 days agotree-wide: use device_get_sysattr_safe_string()
Yu Watanabe [Wed, 11 Mar 2026 22:00:06 +0000 (07:00 +0900)] 
tree-wide: use device_get_sysattr_safe_string()

The obtained strings are passed to another function, e,g, handled as a
path and opened, printed to the terminal, written to a file, saved to
udev database as udev property, exposed through DBus, passed to logger,
and so on. Hence, these should not contain any malicious characters.

12 days agoudev-builtin-net_id: quote strings in log messages
Yu Watanabe [Sun, 17 May 2026 15:52:29 +0000 (00:52 +0900)] 
udev-builtin-net_id: quote strings in log messages

12 days agoudev-builtin-net_id: use EINVAL when we get unexpected sysattr value
Yu Watanabe [Fri, 13 Mar 2026 20:40:14 +0000 (05:40 +0900)] 
udev-builtin-net_id: use EINVAL when we get unexpected sysattr value

The results are completely ignored or only checked if it is negative or
not. Hence, this does not change anything.

12 days agoudev: drop redundant checks
Yu Watanabe [Wed, 11 Mar 2026 22:16:46 +0000 (07:16 +0900)] 
udev: drop redundant checks

This partially reverts 16325b35fa6ecb25f66534a562583ce3b96d52f3,
as bad characters are already filtered.

12 days agoRevert "udev-builtin-net-id: print cescaped bad attributes"
Yu Watanabe [Wed, 11 Mar 2026 22:14:44 +0000 (07:14 +0900)] 
Revert "udev-builtin-net-id: print cescaped bad attributes"

This reverts commit 7c4047957ef58744ecfad6d277f7c45d430f6d70.

This is not necessary, as bad characters are already filtered.

12 days agoudev: use device_get_sysattr_safe_string() in device_get_sysattr_value_filtered()
Yu Watanabe [Wed, 11 Mar 2026 22:09:44 +0000 (07:09 +0900)] 
udev: use device_get_sysattr_safe_string() in device_get_sysattr_value_filtered()

Then, renamed to device_get_sysattr_safe_string_filtered().

12 days agosd-device: use device_get_sysattr_safe_string()
Yu Watanabe [Wed, 11 Mar 2026 20:44:51 +0000 (05:44 +0900)] 
sd-device: use device_get_sysattr_safe_string()

The read value are exposed by sd_device_get_subsystem() and friends.
Hence, it is better to filter invalid characters.
Of course, these should be always safe unless the kernel is buggy.
But, just for safety.

Note, even if uevent file contains invalid characters, then
device_read_uevent_file() should succeed without parsing the contents.
The caller should fail later with a proper error code if a necessary
field is unset. E.g. sd_device_get_ifindex() should still return -ENOENT
even when uevent file contains an invalid characters.

12 days agosd-device: introduce device_get_sysattr_safe_string()
Yu Watanabe [Wed, 11 Mar 2026 20:39:42 +0000 (05:39 +0900)] 
sd-device: introduce device_get_sysattr_safe_string()

This introduce a helper function that verifies read sysattr value.
Some sysattr value may come from firmware, and kernel may expose unsafe
string. The introduced function should be used when we use the result as
a string.

12 days agostring-util: introduce STRING_ALLOW_NEWLINES switch for string_is_safe()
Yu Watanabe [Sun, 17 May 2026 15:18:23 +0000 (00:18 +0900)] 
string-util: introduce STRING_ALLOW_NEWLINES switch for string_is_safe()

This also make StringSafeFlags defined in basic-forward.h so other
headers can use the enum.

12 days agosd-device: use string_is_safe() at one more place
Yu Watanabe [Sun, 17 May 2026 16:17:42 +0000 (01:17 +0900)] 
sd-device: use string_is_safe() at one more place

12 days agosd-device: logs about refused property
Yu Watanabe [Wed, 11 Mar 2026 20:19:25 +0000 (05:19 +0900)] 
sd-device: logs about refused property

Follow-up for a62cd5a153ffe18c27aff02685ed75c5bc4509a2.

12 days agonetworkctl: introduce 'dhcp-lease' command to dump acquired DHCP lease (#42137)
Yu Watanabe [Sun, 17 May 2026 16:28:11 +0000 (01:28 +0900)] 
networkctl: introduce 'dhcp-lease' command to dump acquired DHCP lease (#42137)

12 days agosd-dhcp-client: use dhcp_message_send_{udp,raw}() and update BPF code (#42138)
Yu Watanabe [Sun, 17 May 2026 16:26:55 +0000 (01:26 +0900)] 
sd-dhcp-client: use dhcp_message_send_{udp,raw}() and update BPF code (#42138)

12 days agosd-dhcp-client: drop unused data in sd_dhcp_client 42138/head
Yu Watanabe [Sun, 3 May 2026 05:50:13 +0000 (14:50 +0900)] 
sd-dhcp-client: drop unused data in sd_dhcp_client

With the previous commit, now sd_dhcp_client.link is not used anymore.
Let's drop it.

12 days agodhcp-client-send: move/update BPF code and socket initialization from dhcp-network.c
Yu Watanabe [Sat, 2 May 2026 18:24:41 +0000 (03:24 +0900)] 
dhcp-client-send: move/update BPF code and socket initialization from dhcp-network.c

- BPF code now supports the case when IP header has IP packet options,
- also set socket priority to UDP socket.

Co-developed-by: Google Gemini Pro
12 days agodhcp-client-send: use dhcp_message_send_{udp,raw}()
Yu Watanabe [Mon, 4 May 2026 07:19:17 +0000 (16:19 +0900)] 
dhcp-client-send: use dhcp_message_send_{udp,raw}()

12 days agoNEWS: mention new 'networkctl dhcp-lease' command 42137/head
Yu Watanabe [Sun, 17 May 2026 12:03:39 +0000 (21:03 +0900)] 
NEWS: mention new 'networkctl dhcp-lease' command

12 days agonetworkctl: add dhcp-lease verb to dump DHCP lease
Yu Watanabe [Thu, 16 Apr 2026 17:58:52 +0000 (02:58 +0900)] 
networkctl: add dhcp-lease verb to dump DHCP lease

This shows the DHCP message of an acquired DHCP lease.
Example:
```
$ networkctl dhcp-lease eth0
Header:
              KEY VALUE
   Hardware Type: ETHER
Hardware Address: 41:42:43:31:32:33
  Client Address: 192.0.2.123
  Server Address: 192.0.2.1

Options:
CODE NAME               DATA
   1 subnet mask        255.255.255.0
   3 router             192.0.2.1
   6 domain name server 192.0.2.1
  12 hostname           test-node
  15 domain name        lan
  28 broadcast address  192.0.2.255
  42 NTP server         192.0.2.11
                        192.0.2.12
  51 lease time         1d
  53 message type       5
  54 server identifier  192.0.2.1
  58 renewal time       11h 5min 38s
  59 rebinding time     20h 5min 38s
 119 domain search      hoge.example.com
                        foo.example.com
```

12 days agodhcp: cleanups for sd-dhcp-lease.c and rewrite test-dhcp-client (#42135)
Yu Watanabe [Sun, 17 May 2026 11:12:37 +0000 (20:12 +0900)] 
dhcp: cleanups for sd-dhcp-lease.c and rewrite test-dhcp-client (#42135)

12 days agodhcp-message-dump: introduce dump_dhcp_message()
Yu Watanabe [Fri, 17 Apr 2026 19:31:37 +0000 (04:31 +0900)] 
dhcp-message-dump: introduce dump_dhcp_message()

It dumps DHCP messages in a human friendly format.
It will be used in networkctl in a later commit.

12 days agoci/alpine: do not install util-linux-login
Yu Watanabe [Sat, 16 May 2026 18:20:45 +0000 (03:20 +0900)] 
ci/alpine: do not install util-linux-login

For some reasons, after util-linux is bumped from 2.41.4-r0 to 2.42-r0,
the 'su' command from util-linux-login seems to not correctly run commands in
https://github.com/jirutka/setup-alpine/blob/v1.4.1/alpine.sh
and causes the following spurious failure:
```
2026-05-15T21:19:15.6539432Z ##[group]Set up user runner
2026-05-15T21:19:15.6981963Z /bin/sh: line 0: ��: not found
2026-05-15T21:19:15.6982503Z /bin/sh: line 1: ␡ELF␂␁␁␃: not found
2026-05-15T21:19:15.6985788Z /bin/sh: line 10: ␒␐␆␒B␈␒�␄␒y␄␒�␁␒␞␇␒:␁␒�␃␒�␄␒@␁␒9␈␒?␆␒␚␈␒x: not found
2026-05-15T21:19:15.7010731Z /bin/sh: line 33: can't open ␂␒-␂␒�: no such file
2026-05-15T21:19:15.7016026Z /bin/sh: line 33: syntax error: unexpected word (expecting ")")
2026-05-15T21:19:15.7049583Z
2026-05-15T21:19:15.7050199Z ␛[1;31mError occurred at line 338:␛[0m
2026-05-15T21:19:15.7050830Z   335 |  echo 'permit nopass keepenv $SUDO_USER' | tee /etc/doas.d/root.conf
2026-05-15T21:19:15.7051287Z   336 |  fi
2026-05-15T21:19:15.7051549Z   337 | SHELL
2026-05-15T21:19:15.7052039Z ␛[1;31m> 338 | abin/"$INPUT_SHELL_NAME" --root /.setup.sh␛[0m
2026-05-15T21:19:15.7052506Z   339 |
2026-05-15T21:19:15.7052796Z   340 | rm .setup.sh
2026-05-15T21:19:15.7053172Z   341 | endgroup
2026-05-15T21:19:15.7096322Z ##[error]Error occurred at line 338: abin/"$INPUT_SHELL_NAME" --root /.setup.sh (see the job log for more information)
2026-05-15T21:19:15.7101400Z ##[error]Process completed with exit code 1.
```
Let's not install the package. It seems no command provided by the
package is used.

12 days agofuzz-dhcp-client: externally set socket fd, rather than override functions 42135/head
Yu Watanabe [Wed, 15 Apr 2026 19:43:12 +0000 (04:43 +0900)] 
fuzz-dhcp-client: externally set socket fd, rather than override functions

12 days agotest-dhcp-client: add test cases for discover attempt counter
Yu Watanabe [Wed, 15 Apr 2026 23:39:56 +0000 (08:39 +0900)] 
test-dhcp-client: add test cases for discover attempt counter

12 days agotest-dhcp-client: add test cases for IPv6-only mode
Yu Watanabe [Tue, 14 Apr 2026 18:57:10 +0000 (03:57 +0900)] 
test-dhcp-client: add test cases for IPv6-only mode

12 days agotest-dhcp-client: add test case for BOOTP client mode
Yu Watanabe [Mon, 27 Apr 2026 05:39:26 +0000 (14:39 +0900)] 
test-dhcp-client: add test case for BOOTP client mode

12 days agotest-dhcp-client: add test case for INIT-REBOOT sequence
Yu Watanabe [Mon, 27 Apr 2026 05:39:06 +0000 (14:39 +0900)] 
test-dhcp-client: add test case for INIT-REBOOT sequence

12 days agotest-dhcp-client: add test case for rapid commit mode
Yu Watanabe [Mon, 27 Apr 2026 05:38:24 +0000 (14:38 +0900)] 
test-dhcp-client: add test case for rapid commit mode

12 days agotest-dhcp-client: add test case for anonymized mode
Yu Watanabe [Mon, 27 Apr 2026 05:37:29 +0000 (14:37 +0900)] 
test-dhcp-client: add test case for anonymized mode

12 days agoupdate TODO
Lennart Poettering [Thu, 14 May 2026 06:43:59 +0000 (08:43 +0200)] 
update TODO

13 days agosd-dhcp-client: two tiny cleanups (#42129)
Yu Watanabe [Sat, 16 May 2026 19:16:32 +0000 (04:16 +0900)] 
sd-dhcp-client: two tiny cleanups (#42129)

13 days agotest-dhcp-client: rewrite the test by using sd_dhcp_message
Yu Watanabe [Fri, 10 Apr 2026 18:17:43 +0000 (03:17 +0900)] 
test-dhcp-client: rewrite the test by using sd_dhcp_message

More test cases will be added later.

13 days agosd-dhcp-client: allow to set socket fd externally
Yu Watanabe [Mon, 27 Apr 2026 05:31:10 +0000 (14:31 +0900)] 
sd-dhcp-client: allow to set socket fd externally

It will be used by the unit test and fuzzer for the DHCP client.
Preparation for later changes.

13 days agosd-dhcp-lease: coding style cleanups
Yu Watanabe [Fri, 10 Apr 2026 18:17:28 +0000 (03:17 +0900)] 
sd-dhcp-lease: coding style cleanups

Rename function arguments for storing results, and accept NULL for
them. Also, adjust the position of asterisk.

13 days agoFinal batch of conversions to option and verb macros (#42127)
Yu Watanabe [Sat, 16 May 2026 18:50:48 +0000 (03:50 +0900)] 
Final batch of conversions to option and verb macros (#42127)

13 days agosd-dhcp-client: drop unused legacy code (#42128)
Yu Watanabe [Sat, 16 May 2026 18:42:29 +0000 (03:42 +0900)] 
sd-dhcp-client: drop unused legacy code (#42128)

13 days agotreewide: get rid of remaing getopt/getopt_long stuff 42127/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 18:32:29 +0000 (20:32 +0200)] 
treewide: get rid of remaing getopt/getopt_long stuff

13 days agotree-wide: get rid of old dispatch_verb
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 19:37:04 +0000 (21:37 +0200)] 
tree-wide: get rid of old dispatch_verb

Also rename dispatch_verb_with_args to dispatch_verb.

13 days agotest-verbs: dispatch via _dispatch_verb_with_args() directly
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 19:29:37 +0000 (21:29 +0200)] 
test-verbs: dispatch via _dispatch_verb_with_args() directly

Drops the global-optind dependency from the test helper. Verb fixtures
stay inline as static const Verb[] — the section-based VERB() macro
would force unique verb names across the three test cases, which they
deliberately share to exercise overlap.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 days agoveritysetup: convert verbs to VERB macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 19:24:34 +0000 (21:24 +0200)] 
veritysetup: convert verbs to VERB macros

Place VERB() declarations above each dispatch function and use
verbs_get_help_table() in help(). run() switches to
dispatch_verb_with_args(); the argv_looks_like_help() shortcut is
preserved since this is an internal tool with no proper option parsing.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 days agoupdate-utmp: convert verbs to VERB macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 19:19:28 +0000 (21:19 +0200)] 
update-utmp: convert verbs to VERB macros

There is no --help implemented, so both verbs don't get help strings.
We should probably add --help + --version, and a proper description
of the program, but I'm leaving that for later.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 days agointegritysetup: convert verbs to VERB macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 19:11:40 +0000 (21:11 +0200)] 
integritysetup: convert verbs to VERB macros

Place VERB() declarations above each dispatch function and use
verbs_get_help_table() in help() so the command listing stays in sync.
run() switches to dispatch_verb_with_args(); the argv_looks_like_help()
shortcut is preserved since this is an internal tool with no proper
option parsing.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 days agobacklight: convert verbs to VERB macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 19:00:51 +0000 (21:00 +0200)] 
backlight: convert verbs to VERB macros

Place VERB() declarations directly above each dispatch function and use
verbs_get_help_table() in help() so the command listing stays in sync.
run() switches to dispatch_verb_with_args(); the argv_looks_like_help()
shortcut is preserved since this is an internal tool with no proper
option parsing.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 days agodissect: convert the other parser to option macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 18:39:23 +0000 (20:39 +0200)] 
dissect: convert the other parser to option macros

13 days agostoragectl: convert run_as_mount_helper to OPTION macros
Zbigniew Jędrzejewski-Szmek [Thu, 14 May 2026 07:28:56 +0000 (09:28 +0200)] 
storagectl: convert run_as_mount_helper to OPTION macros

This is the util-linux mount-helper interface (mount.storage), so all
options stay hidden via help=NULL — they are not user-facing. The
namespace "mount.storage" is distinct from the storagectl namespace
used for the user-facing CLI.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
13 days agoudev: drop leftover includes of getopt.h
Zbigniew Jędrzejewski-Szmek [Wed, 13 May 2026 22:51:33 +0000 (00:51 +0200)] 
udev: drop leftover includes of getopt.h

Not sure why those were left and why clang-tidy didn't complain.

13 days agosd-dhcp-client: set TOS and socket priority by default 42129/head
Yu Watanabe [Sat, 2 May 2026 17:50:37 +0000 (02:50 +0900)] 
sd-dhcp-client: set TOS and socket priority by default

Also this renames sd_dhcp_client_set_service_type() to _set_ip_service_type().

13 days agosd-dhcp-client: split out setting anonymize parameter
Yu Watanabe [Thu, 9 Apr 2026 23:22:27 +0000 (08:22 +0900)] 
sd-dhcp-client: split out setting anonymize parameter

No effective functional change. Just refactoring.

13 days agotree-wide: get rid of most uses of ALIGN_PTR
Zbigniew Jędrzejewski-Szmek [Sat, 16 May 2026 16:32:14 +0000 (18:32 +0200)] 
tree-wide: get rid of most uses of ALIGN_PTR

This bothered me for a while, but I didn't think too much about it and just
copied the existing usage pattern. But it really doesn't make sense. We expect
the compiler to align the section properly. But if it didn't align it, applying
alignment after the fact would just cause our pointer to point to the middle
of the structure. That'd be even worse than a misaligned pointer.

Similarly, when doing pointer arithmetic, p++ should really result in a value
with the appropriate alignment. This is the basic principle of C pointer
addition. So we really shouldn't try to adjust the pointer ourselves. At most,
we can assert that it is indeed aligned in tests.

13 days agodhcp-packet: drop unused dhcp_packet_verify_headers() 42128/head
Yu Watanabe [Wed, 1 Apr 2026 19:20:59 +0000 (04:20 +0900)] 
dhcp-packet: drop unused dhcp_packet_verify_headers()

13 days agosd-dhcp-lease: drop several more unused functions and conditions
Yu Watanabe [Wed, 1 Apr 2026 14:44:39 +0000 (23:44 +0900)] 
sd-dhcp-lease: drop several more unused functions and conditions

13 days agosd-dhcp-lease: drop unused dhcp_lease_save() and dhcp_lease_load()
Yu Watanabe [Wed, 1 Apr 2026 14:40:16 +0000 (23:40 +0900)] 
sd-dhcp-lease: drop unused dhcp_lease_save() and dhcp_lease_load()

They are not used anymore. Let's kill them.

13 days agonetwork: drop serialization of DHCP lease
Yu Watanabe [Wed, 1 Apr 2026 14:36:30 +0000 (23:36 +0900)] 
network: drop serialization of DHCP lease

No one use it now anymore. Let's drop it.

13 days agonetworkctl: always use DHCP message serialized in JSON desciption
Yu Watanabe [Wed, 1 Apr 2026 14:34:19 +0000 (23:34 +0900)] 
networkctl: always use DHCP message serialized in JSON desciption

Now the interface description by networkd always contains DHCP message
(of course when there is a bound DHCP lease). Let's use it.

13 days agonetwork: drop unmet conditions
Yu Watanabe [Wed, 1 Apr 2026 14:32:41 +0000 (23:32 +0900)] 
network: drop unmet conditions

Now sd_dhcp_lease object always wraps sd_dhcp_message object, hence we
can unconditionally use it.

13 days agosd-dhcp-client: use new message parser (#42123)
Yu Watanabe [Sat, 16 May 2026 15:33:43 +0000 (00:33 +0900)] 
sd-dhcp-client: use new message parser (#42123)

In 26b7c5ff3b944aa3a16d4e859e9c84ce7e968a5a, we introduced a new parser
for received DHCP message, but it was not used at that time. This PR
replaces the legacy parser with the new one, and makes the fuzzer also
use the new parser.

13 days agoConvert machinectl to option and verb macros (#42117)
Zbigniew Jędrzejewski-Szmek [Sat, 16 May 2026 15:18:10 +0000 (17:18 +0200)] 
Convert machinectl to option and verb macros (#42117)

13 days agomachinectl: convert to OPTION and VERB macros 42117/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 17:19:15 +0000 (19:19 +0200)] 
machinectl: convert to OPTION and VERB macros

For the shell verb we want switches specified after the program name to
be passed to the program to execute, not processed by us. Mirror the
approach in 'userdbctl ssh-authorized-keys': start with
OPTION_PARSER_RETURN_POSITIONAL_ARGS, then lates switch to
STOP_AT_FIRST_NONOPTION for "shell" or NORMAL otherwise.

VERB declarations are placed directly above each function; functions
that dispatch multiple verb names get stacked VERB() declarations.
chainload_importctl() now takes the args strv instead of relying on the
global optind.

--help output is mostly the same.
--no-pager/--no-legend/--no-ask-password/-q/--quiet are now at the end.
bind-volume/unbind-volume are documented.

Fixes c9f461a8067996c6b0c3ac3bf6f9097aedbf4734.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
13 days agoshared/verbs: add VERB_DEFAULT_NOARG
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 17:29:36 +0000 (19:29 +0200)] 
shared/verbs: add VERB_DEFAULT_NOARG

13 days agosd-dhcp-client: do not trigger assertion when running on interface with small MTU 42123/head
Yu Watanabe [Mon, 13 Apr 2026 23:57:47 +0000 (08:57 +0900)] 
sd-dhcp-client: do not trigger assertion when running on interface with small MTU

This also drops spurious default value. If mtu is unset, now the correct
default value is set in client_new_message() in dhcp-client-send.c.

13 days agosd-dhcp-client: drop unnecessary T1/T2 adjustment logic
Yu Watanabe [Wed, 1 Apr 2026 14:26:34 +0000 (23:26 +0900)] 
sd-dhcp-client: drop unnecessary T1/T2 adjustment logic

It is already done in client_parse_ack() -> dhcp_lease_new_from_message().

13 days agosd-dhcp-lease: drop unused dhcp_lease_unref_and_replace()
Yu Watanabe [Mon, 11 May 2026 12:17:51 +0000 (21:17 +0900)] 
sd-dhcp-lease: drop unused dhcp_lease_unref_and_replace()

13 days agosd-dhcp-client: use dhcp_client_parse_message()
Yu Watanabe [Wed, 1 Apr 2026 13:45:04 +0000 (22:45 +0900)] 
sd-dhcp-client: use dhcp_client_parse_message()

This also unify two IO event source handlers.

13 days agofuzz-dhcp-client: fuzz dhcp_client_parse_message()
Yu Watanabe [Wed, 1 Apr 2026 13:52:12 +0000 (22:52 +0900)] 
fuzz-dhcp-client: fuzz dhcp_client_parse_message()

Also, if the fuzzing engine provides a valid message, then try to build
json variant and UDP payload from the parsed message. We will drop
dhcp_lease_save() and dhcp_lease_load(), hence the tests for them are
dropped.

13 days agosocket-util: extend the buffer in sockaddr_union to make it consistent with hw_addr_data
Yu Watanabe [Fri, 15 May 2026 22:18:37 +0000 (07:18 +0900)] 
socket-util: extend the buffer in sockaddr_union to make it consistent with hw_addr_data

Concerned by Claude:
https://github.com/systemd/systemd/pull/42119#discussion_r3251133516

13 days agodhcp-message: introduce dhcp_message_send_{udp,raw}()
Yu Watanabe [Mon, 4 May 2026 05:45:42 +0000 (14:45 +0900)] 
dhcp-message: introduce dhcp_message_send_{udp,raw}()

13 days agonetwork: preparation for using serialized DHCP message in Describe() method (#42122)
Daan De Meyer [Sat, 16 May 2026 12:17:58 +0000 (14:17 +0200)] 
network: preparation for using serialized DHCP message in Describe() method (#42122)

13 days agopo: Translated using Weblate (Spanish)
Fco. Javier F. Serrador [Sat, 16 May 2026 11:59:10 +0000 (11:59 +0000)] 
po: Translated using Weblate (Spanish)

Currently translated at 100.0% (266 of 266 strings)

Co-authored-by: Fco. Javier F. Serrador <fserrador@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/es/
Translation: systemd/main

13 days agoRevert "shared/pager: add support for more(1) pager in secure mode"
Luca Boccassi [Fri, 15 May 2026 21:52:13 +0000 (22:52 +0100)] 
Revert "shared/pager: add support for more(1) pager in secure mode"

13 days agoudev,sd-device: drop old database support (#40801)
Yu Watanabe [Fri, 15 May 2026 23:26:16 +0000 (08:26 +0900)] 
udev,sd-device: drop old database support (#40801)

Closes #40776.

13 days agonetworkctl: load information about DHCP client from varlink 42122/head
Yu Watanabe [Tue, 31 Mar 2026 22:56:09 +0000 (07:56 +0900)] 
networkctl: load information about DHCP client from varlink

By the previous commit, networkd now exposes the received DHCP message
in the Descibe() DBus/Varlink method. Let's make networkctl deserialize
the DHCP message and use it where necessary.

13 days agonetwork: append DHCP message in json output
Yu Watanabe [Tue, 31 Mar 2026 21:51:50 +0000 (06:51 +0900)] 
network: append DHCP message in json output

Also, get private options from sd_dhcp_message object if sd_dhcp_lease
has it.

With this change, networkctl will be able to use the serialized DHCP
message object. Preparation for later changes.

13 days agosd-dhcp-lease: introduce dhcp_client_parse_message()
Yu Watanabe [Tue, 31 Mar 2026 16:45:16 +0000 (01:45 +0900)] 
sd-dhcp-lease: introduce dhcp_client_parse_message()

It parses a received DHCP message and create corresponding sd_dhcp_lease
object for the message. Internally, it uses sd_dhcp_message object.

Note, the new parser is not used yet. The currently used one will be
replaced in later commit.

13 days agodhcp-client-send: introduce dhcp_client_send_message()
Yu Watanabe [Wed, 18 Mar 2026 16:01:50 +0000 (01:01 +0900)] 
dhcp-client-send: introduce dhcp_client_send_message()

This internally uses sd_dhcp_message object, and replaces functions
for creating and sending DHCP messages.

By using sd_dhcp_message internally, now we can correctly send long
(> 255 bytes) option data that cannot be fit in a single DHCP option TLV.

This also fixes the value in DHCP option 57 (Maximum Message Size).
Previously the IP and UDP header size is subtracted from the interface
MTU, but it should not.

Except for the above, this should not change any effective behaviors.

2 weeks agovarlink: MethodNotImplemented: drop extraneous dot; vl_error_MethodNotFound: an...
Yu Watanabe [Fri, 15 May 2026 20:10:38 +0000 (05:10 +0900)] 
varlink: MethodNotImplemented: drop extraneous dot;  vl_error_MethodNotFound: an method  (#42112)

2 weeks agotest-network: retry networkctl status in wait_operstate()
Luca Boccassi [Fri, 15 May 2026 17:19:41 +0000 (18:19 +0100)] 
test-network: retry networkctl status in wait_operstate()

networkctl status may transiently fail right after start_networkd() because networkd has not yet picked up the freshly-created link from the kernel. The retry loop in wait_operstate() did not catch the resulting subprocess.CalledProcessError, so the test aborted on the first attempt instead of retrying for the configured timeout.

Observed in TEST-85-NETWORK-NetworkdBridgeTests, subtest test_bridge_configure_without_carrier[no-slave]:

  [   19.600156] systemd-networkd-tests.py[526]: Failed to issue io.systemd.Network.Link.Describe() varlink call: Invalid argument
  [   53.124982] systemd[1]: systemd-networkd.service: Changed start -> running
  [   53.336167] systemd-networkd-tests.py[526]: ERROR: test_bridge_configure_without_carrier (__main__.NetworkdBridgeTests.test_bridge_configure_without_carrier) (test='no-slave')
  [   53.336167] systemd-networkd-tests.py[526]:     self.wait_operstate('bridge99', operstate=r'(no-carrier|routable)', setup_state=None, setup_timeout=30)
  [   53.336167] systemd-networkd-tests.py[526]: subprocess.CalledProcessError: Command '['/usr/bin/networkctl', '-n', '0', 'status', 'bridge99']' returned non-zero exit status 1.

Co-developed-by: Claude Opus 4.7 <noreply@anthropic.com>
2 weeks agomeson: Drop two unnecessary dependencies
Daan De Meyer [Fri, 15 May 2026 13:10:25 +0000 (13:10 +0000)] 
meson: Drop two unnecessary dependencies

2 weeks agomeson: drop vestigial libgpg-error dependency
Daan De Meyer [Fri, 15 May 2026 18:51:30 +0000 (18:51 +0000)] 
meson: drop vestigial libgpg-error dependency

libgpg-error was added in 2017 (commit 76c8741060, Michael Biebl) to
gate HAVE_GCRYPT on its presence because src/resolve referenced
libgpg-error directly at the time. That usage is long gone — no source
file references any gpg-error API today — so the dependency only served
to fail HAVE_GCRYPT detection when gpg-error-dev wasn't installed.

libgcrypt's pkg-config Requires already pulls in the gpg-error headers
(via the transitive #include <gpg-error.h> in <gcrypt.h>), so dropping
the dep doesn't break compilation.

2 weeks agomachinectl: reorder cases in parse_argv() to match order in --help
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 16:34:03 +0000 (18:34 +0200)] 
machinectl: reorder cases in parse_argv() to match order in --help

--no-pager, --no-legend, --no-ask-password, --quiet are shifted to
the end.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 weeks agomachinectl: reorder verb functions to match --help
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 16:29:29 +0000 (18:29 +0200)] 
machinectl: reorder verb functions to match --help

The net diff is negative because some spurious whitespace and forward
declarations were dropped. One new forward declaration was added. (For
verb_poweroff_machine. The func could be moved, but I think it's better
to keep it adjacent to verb_reboot_machine which is very similar.)

2 weeks agonsresourced: detect and clean up registry entries for dead user namespaces (#42070)
Daan De Meyer [Fri, 15 May 2026 19:19:15 +0000 (21:19 +0200)] 
nsresourced: detect and clean up registry entries for dead user namespaces (#42070)

The BPF kprobe that fires on user namespace destruction is the only
thing
that triggers registry cleanup, so any time it doesn't run — ring buffer
overflow, kprobe missing, fdstore entry dropped outside our cleanup path
— a registry entry is left behind forever.

Stamp each registry entry with the kernel's unique namespace identifier
(NS_GET_ID, kernel ≥ 6.13) at allocation time. At manager startup, after
the existing fdstore→registry sweep, walk the registry and ask the
kernel
to look each namespace up by id via open_by_handle_at() on nsfs; if the
lookup returns -ESTALE the namespace is gone and we release the entry.
Old entries written before this change carry no identifier and are left
alone.

Add a namespace_open_by_id() helper for the lookup. The kernel restricts
open_by_handle_at() on nsfs to processes in the initial user namespace,
collapsing both permission denials and dead namespaces onto -ESTALE; the
helper refuses early with -EPERM outside the initial user namespace
so callers can tell the two apart.

2 weeks agoConvert homectl to option and verb macros (#42113)
Daan De Meyer [Fri, 15 May 2026 18:15:06 +0000 (20:15 +0200)] 
Convert homectl to option and verb macros (#42113)

2 weeks agoshell-completion: add --when to systemctl
Luca Boccassi [Fri, 15 May 2026 16:40:28 +0000 (17:40 +0100)] 
shell-completion: add --when to systemctl

Fixes https://github.com/systemd/systemd/issues/41672

2 weeks agonsresourced: detect and clean up registry entries for dead user namespaces 42070/head
Daan De Meyer [Wed, 13 May 2026 10:54:02 +0000 (12:54 +0200)] 
nsresourced: detect and clean up registry entries for dead user namespaces

The BPF kprobe that fires on user namespace destruction is the only thing
that triggers registry cleanup, so any time it doesn't run — ring buffer
overflow, kprobe missing, fdstore entry dropped outside our cleanup path
— a registry entry is left behind forever.

Stamp each registry entry with the kernel's unique namespace identifier
(NS_GET_ID, kernel ≥ 6.13) at allocation time. At manager startup, after
the existing fdstore→registry sweep, walk the registry and ask the kernel
to look each namespace up by id via open_by_handle_at() on nsfs; if the
lookup returns -ESTALE the namespace is gone and we release the entry.
Old entries written before this change carry no identifier and are left
alone.

Add a namespace_open_by_id() helper for the lookup. The kernel restricts
open_by_handle_at() on nsfs to processes in the initial user namespace,
collapsing both permission denials and dead namespaces onto -ESTALE; the
helper refuses early with -EHOSTDOWN outside the initial user namespace
so callers can tell the two apart.

2 weeks agohomectl: fix unlocking of multiple homes 42113/head
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 16:45:01 +0000 (18:45 +0200)] 
homectl: fix unlocking of multiple homes

Fixes 4aa0a8ac3e548219d380a0c566242338eab185da.

2 weeks agohomectl: convert verbs to VERB macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 15:23:45 +0000 (17:23 +0200)] 
homectl: convert verbs to VERB macros

--help looks pretty much the same. "[list]" is shown in parentheses
because it's the default.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 weeks agohomectl: convert parse_argv to OPTION macros
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 13:01:09 +0000 (15:01 +0200)] 
homectl: convert parse_argv to OPTION macros

Rewrite help() with help-util.h primitives + option_parser_get_help_table_group
for each User Record Properties section. The verbs[] table stays
unchanged for now; run() switches from dispatch_verb() (which depended
on the global optind) to _dispatch_verb_with_args() fed by
option_parser_get_args().

Explanations are improved for --birth-date[=DATE] (correct placement of
'['), --skel=, --shell= (short options listed). Some minor rewordings
for other options. The explanation for -E and -EE is split.
(OPTION_HELP_ENTRY_VERBATIM is used for -EE.)

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 weeks agoshared/options: fix display of OPTION_HELP_ENTRY_VERBATIM
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 15:51:41 +0000 (17:51 +0200)] 
shared/options: fix display of OPTION_HELP_ENTRY_VERBATIM

So far it was used only once, in bootctl. It should not be indented:
  -R --print-root-device
  -RR
  ^

2 weeks agohomectl: reorder cases in parse_argv() to match order in --help
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 11:59:30 +0000 (13:59 +0200)] 
homectl: reorder cases in parse_argv() to match order in --help

Display options --no-pager, --no-legend, --no-ask-password are placed at
the end, after --mute-console=yes, rather than near the top.

Co-developed-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2 weeks agohomectl: reorder verb functions to match order in --help
Zbigniew Jędrzejewski-Szmek [Fri, 15 May 2026 11:33:58 +0000 (13:33 +0200)] 
homectl: reorder verb functions to match order in --help

Just a hand-crafted moving of blocks of code up and down, no other
changes. The net diff is -2 because add_signing_keys_from_credentials
forward declaration was dropped.

2 weeks agovarlink: vl_error_MethodNotFound: an method 42112/head
наб [Fri, 15 May 2026 15:55:20 +0000 (17:55 +0200)] 
varlink: vl_error_MethodNotFound: an method

2 weeks agovarlink: MethodNotImplemented: drop extraneous dot
наб [Fri, 15 May 2026 15:54:42 +0000 (17:54 +0200)] 
varlink: MethodNotImplemented: drop extraneous dot