]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
13 months agobasic/stat-util: use xopenat() where appropriate
Mike Yuan [Fri, 11 Oct 2024 16:04:17 +0000 (18:04 +0200)] 
basic/stat-util: use xopenat() where appropriate

13 months agosd-radv: drop sd_radv_prefix and friends, and use sd_ndisc_option to manage NDisc...
Yu Watanabe [Tue, 23 Apr 2024 04:15:49 +0000 (13:15 +0900)] 
sd-radv: drop sd_radv_prefix and friends, and use sd_ndisc_option to manage NDisc options

No effective functional change, just refactoring.

13 months agoMerge pull request #34738 from behrmann/ukifyoption
Yu Watanabe [Mon, 14 Oct 2024 20:58:49 +0000 (05:58 +0900)] 
Merge pull request #34738 from behrmann/ukifyoption

ukify: Add a config object

13 months agoTEST-13-NSPAWN: add test for 'machinectl terminate'
Yu Watanabe [Sat, 12 Oct 2024 20:15:18 +0000 (05:15 +0900)] 
TEST-13-NSPAWN: add test for 'machinectl terminate'

This also fixes the test for io.systemd.Machine.Terminate.

When systemd-nspawn@.service receives stop signal, then systemd-nspawn
sends SIGRTMIN+3 to the container, which was previously ignored by the
custom init script used by the container.
Let's introduce another trap for the signal, and correctly handle it.

Follow-up for 164af66f9abdfd8935098d9f10c746ff29dea7df.

13 months agoMerge pull request #34743 from yuwata/bus-message-dump-fd
Yu Watanabe [Mon, 14 Oct 2024 20:58:03 +0000 (05:58 +0900)] 
Merge pull request #34743 from yuwata/bus-message-dump-fd

bus-message-util: introduce bus_message_dump_fd() and _string()

13 months agoMerge pull request #34745 from yuwata/local-outbounds-prefsrc
Yu Watanabe [Mon, 14 Oct 2024 20:57:34 +0000 (05:57 +0900)] 
Merge pull request #34745 from yuwata/local-outbounds-prefsrc

local-addresses: honor RTA_PREFSRC field of gateway

13 months agodocs: add a missing : character
Gaël PORTAY [Mon, 14 Oct 2024 17:16:07 +0000 (19:16 +0200)] 
docs: add a missing : character

This adds the missing colon character to the section systemd-sysusers.

13 months agoFix some typos in socket-util.h
Michiel [Mon, 14 Oct 2024 13:50:36 +0000 (15:50 +0200)] 
Fix some typos in socket-util.h

13 months agoman: document preference for secure_getenv() in coding style
Lennart Poettering [Mon, 14 Oct 2024 09:55:59 +0000 (11:55 +0200)] 
man: document preference for secure_getenv() in coding style

13 months agoMerge pull request #34749 from yuwata/network-address-parse-broadcast
Luca Boccassi [Mon, 14 Oct 2024 11:31:03 +0000 (12:31 +0100)] 
Merge pull request #34749 from yuwata/network-address-parse-broadcast

network/address: fix parser for Broadcast=

13 months agoupdatectl: remove unimplemented option
Antonio Alvarez Feijoo [Mon, 14 Oct 2024 10:02:04 +0000 (12:02 +0200)] 
updatectl: remove unimplemented option

13 months agoMerge pull request #34623 from ikruglov/ikruglov/io-systemd-Machine-Image
Lennart Poettering [Mon, 14 Oct 2024 11:27:46 +0000 (13:27 +0200)] 
Merge pull request #34623 from ikruglov/ikruglov/io-systemd-Machine-Image

machine: implement varlink interfaces io.systemd.MachineImage.{List, Update}

13 months agoMerge pull request #34716 from dvdhrm/pr/derand
Lennart Poettering [Mon, 14 Oct 2024 09:51:43 +0000 (11:51 +0200)] 
Merge pull request #34716 from dvdhrm/pr/derand

Clarify nameing-scheme in DESKTOP_ENVIRONMENT documentation

13 months agomachine: tests for varlink interfaces 34623/head
Ivan Kruglov [Tue, 8 Oct 2024 15:00:27 +0000 (17:00 +0200)] 
machine: tests for varlink interfaces

- io.systemd.MachineImage.List
- io.systemd.MachineImage.Update

13 months agomachine: listen on io.systemd.MachineImage socket
Ivan Kruglov [Fri, 11 Oct 2024 12:38:58 +0000 (14:38 +0200)] 
machine: listen on io.systemd.MachineImage socket

13 months agomachine: introduce io.systemd.MachineImage.Update varlink method
Ivan Kruglov [Tue, 8 Oct 2024 15:00:11 +0000 (17:00 +0200)] 
machine: introduce io.systemd.MachineImage.Update varlink method

io.systemd.MachineImage.Update implements the following dbus org.freedesktop.machine1.Manager interfaces:

- RenameImage
- MarkImageReadOnly
- SetImageLimit

13 months agomachine: introduce io.systemd.MachineImage.List varlink method
Ivan Kruglov [Tue, 8 Oct 2024 14:58:22 +0000 (16:58 +0200)] 
machine: introduce io.systemd.MachineImage.List varlink method

io.systemd.MachineImage.List implements the following dbus org.freedesktop.machine1.Manager interfaces:

- GetImage
- ListImages
- GetImageHostname
- GetImageMachineID
- GetImageMachineInfo
- GetImageOSRelease

13 months agomachine: generalize rename_image_and_update_cache() logic
Ivan Kruglov [Tue, 8 Oct 2024 09:30:10 +0000 (11:30 +0200)] 
machine: generalize rename_image_and_update_cache() logic

This is a prep step to reuse the function in varlink interface

13 months agomachine: move manager_acquire_image to src/machine/machined-core.c
Ivan Kruglov [Wed, 2 Oct 2024 11:21:46 +0000 (13:21 +0200)] 
machine: move manager_acquire_image to src/machine/machined-core.c

This is a prep step to reuse the function in varlink interface.

13 months agomachine: fix misnamed params in src/shared/discover-image.h
Ivan Kruglov [Tue, 1 Oct 2024 08:04:08 +0000 (10:04 +0200)] 
machine: fix misnamed params in src/shared/discover-image.h

13 months agobash-completion/busctl: support wait command
Yu Watanabe [Mon, 14 Oct 2024 01:42:25 +0000 (10:42 +0900)] 
bash-completion/busctl: support wait command

Follow-up for 30465af656a10c124e7fa9fb33f7ad8454e9af2e.

13 months agoukify: Add more mypy options 34738/head
Jörg Behrmann [Sun, 13 Oct 2024 13:20:44 +0000 (15:20 +0200)] 
ukify: Add more mypy options

This achieves parity with the mypy config used in mkosi.

The import of builtins is needed because otherwise type is attempted to be
resolved to the variable in the scope.

13 months agoukify: Add UkifyConfig
Jörg Behrmann [Mon, 14 Oct 2024 07:58:05 +0000 (09:58 +0200)] 
ukify: Add UkifyConfig

Using a dataclass instead of an argparse namespace to pass around the parsed
options allows to track the types properly.

13 months agoukify: Add a unified interface for signing tools
Jörg Behrmann [Thu, 10 Oct 2024 09:57:12 +0000 (11:57 +0200)] 
ukify: Add a unified interface for signing tools

13 months agoukify: Fix type of UKI.executable
Jörg Behrmann [Sat, 12 Oct 2024 13:50:57 +0000 (15:50 +0200)] 
ukify: Fix type of UKI.executable

13 months agoMerge pull request #34730 from yuwata/boot-efi-follow-ups
Lennart Poettering [Mon, 14 Oct 2024 07:56:47 +0000 (09:56 +0200)] 
Merge pull request #34730 from yuwata/boot-efi-follow-ups

boot/efi: several follow-ups for recent change

13 months agonetwork/address: use config_parse_in_addr_non_null() at one more place 34749/head
Yu Watanabe [Sun, 13 Oct 2024 06:17:07 +0000 (15:17 +0900)] 
network/address: use config_parse_in_addr_non_null() at one more place

No functional change, just refactoring.

13 months agonetwork/address: do not set family in config_parse_broadcast()
Yu Watanabe [Sun, 13 Oct 2024 06:08:04 +0000 (15:08 +0900)] 
network/address: do not set family in config_parse_broadcast()

The family will be checked later in
address_section_verify() -> address_section_adjust_broadcast(),
hence it is not necessary to set here.

Follow-up for 5d15c7b19cae6d3332d4e213c380e0fcc1317a2c.

Fixes oss-fuzz#372994449.
Fixes #34748.

13 months agoMerge pull request #34555 from rpigott/busctl-wait
Yu Watanabe [Sun, 13 Oct 2024 09:50:48 +0000 (18:50 +0900)] 
Merge pull request #34555 from rpigott/busctl-wait

busctl: add wait verb to wait for signals

13 months agobusctl: add a test for busctl wait 34555/head
Ronan Pigott [Wed, 2 Oct 2024 18:57:24 +0000 (11:57 -0700)] 
busctl: add a test for busctl wait

13 months agoMerge pull request #34520 from vcaputo/mmap-cache-unused-min
Yu Watanabe [Sun, 13 Oct 2024 05:48:35 +0000 (14:48 +0900)] 
Merge pull request #34520 from vcaputo/mmap-cache-unused-min

mmap-cache: enforce an unused windows minimum

13 months agobusctl: add wait verb to wait for signals
Ronan Pigott [Thu, 26 Sep 2024 01:42:59 +0000 (18:42 -0700)] 
busctl: add wait verb to wait for signals

It's like busctl call, but it waits for a signal rather than a reply to
a method call.

13 months agopo: Translated using Weblate (Chinese (Simplified) (zh_CN))
lumingzh [Sun, 13 Oct 2024 00:38:42 +0000 (02:38 +0200)] 
po: Translated using Weblate (Chinese (Simplified) (zh_CN))

Currently translated at 100.0% (253 of 253 strings)

Co-authored-by: lumingzh <lumingzh@qq.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/zh_CN/
Translation: systemd/main

13 months agotest: add test for local outbounds with preferred source address 34745/head
Yu Watanabe [Sat, 12 Oct 2024 22:24:08 +0000 (07:24 +0900)] 
test: add test for local outbounds with preferred source address

13 months agolocal-addresses: honor RTA_PREFSRC field of gateway
Yu Watanabe [Sat, 12 Oct 2024 21:56:38 +0000 (06:56 +0900)] 
local-addresses: honor RTA_PREFSRC field of gateway

Fixes #34739.

13 months agolocal-addresses: use FOREACH_ARRAY() macro
Yu Watanabe [Sat, 12 Oct 2024 21:30:58 +0000 (06:30 +0900)] 
local-addresses: use FOREACH_ARRAY() macro

13 months agosha256: use memory-util-fundamental.h 34730/head
Yu Watanabe [Sat, 12 Oct 2024 20:56:25 +0000 (05:56 +0900)] 
sha256: use memory-util-fundamental.h

Prompted by https://github.com/systemd/systemd/pull/34722#discussion_r1797352922.

13 months agoboot/efi/log: always include filename, line, and function in log message
Yu Watanabe [Fri, 11 Oct 2024 19:01:28 +0000 (04:01 +0900)] 
boot/efi/log: always include filename, line, and function in log message

Then, drop unused log_trace().

13 months agoboot/efi/smbios: initialize output parameters if entries not found
Yu Watanabe [Fri, 11 Oct 2024 18:53:37 +0000 (03:53 +0900)] 
boot/efi/smbios: initialize output parameters if entries not found

13 months agoboot/efi: trivial coding style cleanups
Yu Watanabe [Fri, 11 Oct 2024 18:52:10 +0000 (03:52 +0900)] 
boot/efi: trivial coding style cleanups

Follow-ups for #34717 and #34718.

13 months agobus-message-util: introduce bus_message_dump_fd() and _string() 34743/head
Yu Watanabe [Sat, 12 Oct 2024 00:49:23 +0000 (09:49 +0900)] 
bus-message-util: introduce bus_message_dump_fd() and _string()

Then, use them in analyze and oomctl.

13 months agoanalyze: fall back to simple method from dump_patterns() and friends
Yu Watanabe [Sat, 12 Oct 2024 00:46:50 +0000 (09:46 +0900)] 
analyze: fall back to simple method from dump_patterns() and friends

No functional change, just refactoring.

13 months agoAdd integration test for ExtraFileDescriptors after daemon-reexec
Ryan Wilson [Fri, 11 Oct 2024 20:38:58 +0000 (13:38 -0700)] 
Add integration test for ExtraFileDescriptors after daemon-reexec

This commit adds a corresponding integration test for ExtraFileDescriptors
after systemctl daemon-reexec. This ensures systemd keeps the file
descriptors while the service manager is restarting and we don't lose
ability to restart the service correctly.

13 months agoukify: Require both key and cert be set in generate_keys
Jörg Behrmann [Fri, 11 Oct 2024 12:34:15 +0000 (14:34 +0200)] 
ukify: Require both key and cert be set in generate_keys

If either is None the write in this branch of the code will fail.

13 months agoukify: Add missing typing for iterator
Jörg Behrmann [Thu, 10 Oct 2024 16:23:35 +0000 (18:23 +0200)] 
ukify: Add missing typing for iterator

13 months agoMerge pull request #34591 from teknoraver/timer
Yu Watanabe [Fri, 11 Oct 2024 23:12:38 +0000 (08:12 +0900)] 
Merge pull request #34591 from teknoraver/timer

timer: introduce DeferReactivation setting

13 months agoMerge pull request #34698 from yuwata/udev-node-lock-file
Yu Watanabe [Fri, 11 Oct 2024 23:12:10 +0000 (08:12 +0900)] 
Merge pull request #34698 from yuwata/udev-node-lock-file

udev-node: remove stack directories and their lock files by workers, rather than manager

13 months agoMerge pull request #34722 from anonymix007/fundamental-sha1
Yu Watanabe [Fri, 11 Oct 2024 23:11:35 +0000 (08:11 +0900)] 
Merge pull request #34722 from anonymix007/fundamental-sha1

fundamental: Add SHA1

13 months agotimer: add unit tests for DeferReactivation 34591/head
Matteo Croce [Fri, 4 Oct 2024 23:39:37 +0000 (01:39 +0200)] 
timer: add unit tests for DeferReactivation

Create a unit test for systemd timer DeferReactivation config option.
The test works by creating a timer which fires every 5 seconds and
starts an unit which runs for 5 seconds.
With DeferReactivation=true, the timer must fire every 5+5 seconds,
instead of the 5 it fires normally.

As we need at least two timer runs to check if the delta is correct,
the test duration on success will be at least 20 seconds.
To be safe, the test script waits 35 seconds: this is enough to get
at least three runs but low enough to avoid clogging the CI.

13 months agotimer: introduce DeferReactivation setting
Arthur Shau [Thu, 14 Mar 2024 19:43:13 +0000 (12:43 -0700)] 
timer: introduce DeferReactivation setting

By default, in instances where timers are running on a realtime schedule,
if a service takes longer to run than the interval of a timer, the
service will immediately start again when the previous invocation finishes.
This is caused by the fact that the next elapse is calculated based on
the last trigger time, which, combined with the fact that the interval
is shorter than the runtime of the service, causes that elapse to be in
the past, which in turn means the timer will trigger as soon as the
service finishes running.

This behavior can be changed by enabling the new DeferReactivation setting,
which will cause the next calendar elapse to be calculated based on when
the trigger unit enters inactivity, rather than the last trigger time.

Thus, if a timer is on an realtime interval, the trigger will always
adhere to that specified interval.
E.g. if you have a timer that runs on a minutely interval, the setting
guarantees that triggers will happen at *:*:00 times, whereas by default
this may skew depending on how long the service runs.

Co-authored-by: Matteo Croce <teknoraver@meta.com>
13 months agoTEST-17-UDEV: also check if /run/udev/links.lock/ is empty on settle 34698/head
Yu Watanabe [Thu, 10 Oct 2024 18:37:01 +0000 (03:37 +0900)] 
TEST-17-UDEV: also check if /run/udev/links.lock/ is empty on settle

13 months agoudev-node: drop unnecessary manager side cleaning up logic for stack directory
Yu Watanabe [Thu, 10 Oct 2024 01:42:24 +0000 (10:42 +0900)] 
udev-node: drop unnecessary manager side cleaning up logic for stack directory

Unnecessary stack directories and their lock files are removed by
workers. Hence, the logic is not necessary anymore.

13 months agoudev-node: drop workaround for by-diskseq symlinks
Yu Watanabe [Thu, 10 Oct 2024 01:36:46 +0000 (10:36 +0900)] 
udev-node: drop workaround for by-diskseq symlinks

This effectively reverts 09373c1a50297079e6b0447ea97af4e9a60f77fa,
as stack directories and lock files are removed by udev workers on
unlocking.

13 months agoudev-node: remove lockfile and stack directory when not necessary if possible
Yu Watanabe [Thu, 10 Oct 2024 01:33:22 +0000 (10:33 +0900)] 
udev-node: remove lockfile and stack directory when not necessary if possible

Replaces 09373c1a50297079e6b0447ea97af4e9a60f77fa.

Let's remove stack directories and their lock files by workers if
possible.

Now, lock files must be created before creating stack directories, hence
lock files are moved to /run/udev/links.lock/ , e.g.,
Before:
  /run/udev/links/disk\x2fby-diskseq\x2f1/.lock
After:
  /run/udev/links.lock/disk\x2fby-diskseq\x2f1

Fixes ##34637.

13 months agoMerge pull request #34700 from yuwata/network-conf-parser
Yu Watanabe [Fri, 11 Oct 2024 20:22:11 +0000 (05:22 +0900)] 
Merge pull request #34700 from yuwata/network-conf-parser

network: several cleanups for conf parsers

13 months agotest: Add tests for SHA1 34722/head
anonymix007 [Fri, 11 Oct 2024 13:30:43 +0000 (16:30 +0300)] 
test: Add tests for SHA1

13 months agofundamental: Import SHA1 implementation from libxcrypt
anonymix007 [Tue, 10 Sep 2024 13:58:20 +0000 (16:58 +0300)] 
fundamental: Import SHA1 implementation from libxcrypt

13 months agomacro: Add DISABLE_WARNING_STRINGOP_OVERREAD
anonymix007 [Fri, 11 Oct 2024 13:44:54 +0000 (16:44 +0300)] 
macro: Add DISABLE_WARNING_STRINGOP_OVERREAD

While at it, also add -Wunknown-warning-option to basic_disabled_warnings to fix compilation with clang

13 months agoreport bpf_current_task_under_cgroup() errors to userspace
Matteo Croce [Fri, 11 Oct 2024 16:26:58 +0000 (18:26 +0200)] 
report bpf_current_task_under_cgroup() errors to userspace

bpf_current_task_under_cgroup() returns 1 if the task is under the
specified cgroup, 0 if not, negative if an error happens.

Differentiate the 1 and -1 cases, and report to userspace when we got
and error.
An error like this is mostly unlikely, the only common one is that the
userspace doesn't populate the map, and the call returns -EAGAIN.

Tested by mocking the return value of bpf_current_task_under_cgroup():
    Enumeration completed
    enp1s0f0np0: Configuring with /etc/systemd/network/20-test.network.
    Sysctl monitor BPF returned error: Link number out of range
    Sysctl monitor BPF returned error: No CSI structure available
    Sysctl monitor BPF returned error: Invalid exchange
    Sysctl monitor BPF returned error: Exchange full
    Sysctl monitor BPF returned error: Invalid request code
    Sysctl monitor BPF returned error: Unknown error 58
    Sysctl monitor BPF returned error: Device not a stream
    Sysctl monitor BPF returned error: Timer expired
    Sysctl monitor BPF returned error: Machine is not on the network
    Sysctl monitor BPF returned error: Object is remote
    Sysctl monitor BPF returned error: Advertise error

13 months agoMerge pull request #34720 from YHNdnzj/extra-fds-followup
Yu Watanabe [Fri, 11 Oct 2024 19:46:51 +0000 (04:46 +0900)] 
Merge pull request #34720 from YHNdnzj/extra-fds-followup

core: several follow-ups for ExtraFileDescriptors

13 months agosystemd-update-helper: Show executed commands if debug logging is enabled
Daan De Meyer [Fri, 11 Oct 2024 14:51:04 +0000 (16:51 +0200)] 
systemd-update-helper: Show executed commands if debug logging is enabled

13 months agonetwork/route: use log_section_warning() more 34700/head
Yu Watanabe [Sun, 22 Sep 2024 21:34:02 +0000 (06:34 +0900)] 
network/route: use log_section_warning() more

13 months agonetwork/route: use generic [Route] section parser more
Yu Watanabe [Sun, 22 Sep 2024 21:20:05 +0000 (06:20 +0900)] 
network/route: use generic [Route] section parser more

13 months agonetwork/route: use log_syntax_parse_error() more
Yu Watanabe [Sun, 22 Sep 2024 20:51:37 +0000 (05:51 +0900)] 
network/route: use log_syntax_parse_error() more

13 months agonetwork/route-nexthop: use generic [Route] section parser more
Yu Watanabe [Sun, 22 Sep 2024 20:43:22 +0000 (05:43 +0900)] 
network/route-nexthop: use generic [Route] section parser more

13 months agonetwork/route-nexthop: use log_syntax_parse_error()
Yu Watanabe [Sun, 22 Sep 2024 20:40:55 +0000 (05:40 +0900)] 
network/route-nexthop: use log_syntax_parse_error()

13 months agonetwork/route-metric: merge conf parsers for route metric
Yu Watanabe [Sun, 22 Sep 2024 19:09:33 +0000 (04:09 +0900)] 
network/route-metric: merge conf parsers for route metric

This introduces a generic [Route] section parser, then embed conf
parsers for route metric into it.

13 months agonetwork/route-metric: use log_syntax_parse_error()
Yu Watanabe [Sun, 22 Sep 2024 19:13:51 +0000 (04:13 +0900)] 
network/route-metric: use log_syntax_parse_error()

13 months agonetwork/address: several cleanups for config_parse_address()
Yu Watanabe [Sun, 22 Sep 2024 18:36:15 +0000 (03:36 +0900)] 
network/address: several cleanups for config_parse_address()

- make it accept an empty string,
- use config_parse_in_addr_prefix(),
- move null address checker to address_section_verify().

No functional change, just refactoring.

13 months agonetwork/address: warn but ignore Broadcast= setting for an IPv6 address
Yu Watanabe [Sun, 22 Sep 2024 18:30:32 +0000 (03:30 +0900)] 
network/address: warn but ignore Broadcast= setting for an IPv6 address

Previously, the below was refused and the IPv6 address would not assigned.
===
[Address]
Address=2001:db8:0:f101::15/64
Broadcast=192.168.0.255
===
However, in the following case, networkd warned about the broadcast
address would be ignored, and the IPv6 address would be configured.
===
[Address]
Broadcast=192.168.0.255
Address=2001:db8:0:f101::15/64
===

13 months agonetwork/address: use log_section_warning() more
Yu Watanabe [Sun, 22 Sep 2024 18:28:19 +0000 (03:28 +0900)] 
network/address: use log_section_warning() more

13 months agonetwork/routing-policy-rule: use in_addr_prefix for From= and To=
Yu Watanabe [Sun, 22 Sep 2024 16:51:43 +0000 (01:51 +0900)] 
network/routing-policy-rule: use in_addr_prefix for From= and To=

Also, this makes the settings parsed independently, and the
inconsistency will be checked in the section verifier.

No functional change, just refactoring.

13 months agoconf-parser: introduce config_parse_in_addr_prefix()
Yu Watanabe [Sun, 22 Sep 2024 16:50:44 +0000 (01:50 +0900)] 
conf-parser: introduce config_parse_in_addr_prefix()

It is not used currently, but will be used later.

13 months agoin-addr-util: rename in_addr_prefix_from_string_auto_internal() -> _full()
Yu Watanabe [Fri, 11 Oct 2024 18:23:04 +0000 (03:23 +0900)] 
in-addr-util: rename in_addr_prefix_from_string_auto_internal() -> _full()

The function is also used in other source files. Hence, not internal.
No functional change, just refactoring.

13 months agohwdb: fix key toggle touchpad and programmable buttom for Positivo V142N (#34725)
Lucas Adriano Salles [Fri, 11 Oct 2024 16:58:14 +0000 (12:58 -0400)] 
hwdb: fix key toggle touchpad and programmable buttom for Positivo V142N (#34725)

13 months agocore/service: add missing serialization for extra fds 34720/head
Mike Yuan [Tue, 8 Oct 2024 13:48:49 +0000 (15:48 +0200)] 
core/service: add missing serialization for extra fds

13 months agocore/service: use array rather than list for extra fds, limit max number
Mike Yuan [Tue, 8 Oct 2024 12:53:14 +0000 (14:53 +0200)] 
core/service: use array rather than list for extra fds, limit max number

Follow-up for 3543456f84ec2e83e07b6c9bf2b3a1c5d30241d8

I don't think list is particularly useful here. The passed fds are
constant for the lifetime of service, and with this commit we track
the number of extra fds in a dedicated var anyway.

13 months agocore/service: use LIST_HEAD where appropriate
Mike Yuan [Tue, 8 Oct 2024 13:05:03 +0000 (15:05 +0200)] 
core/service: use LIST_HEAD where appropriate

13 months agotime-util: use saturate_add for usec_add()
Mike Yuan [Sun, 15 Sep 2024 13:04:04 +0000 (15:04 +0200)] 
time-util: use saturate_add for usec_add()

13 months agoMerge pull request #34717 from anonymix007/fundamental-boot-changes
Lennart Poettering [Fri, 11 Oct 2024 15:55:06 +0000 (17:55 +0200)] 
Merge pull request #34717 from anonymix007/fundamental-boot-changes

Fundamental and boot changes for multi-dt UKIs

13 months agoshared/bus-util: re-break comment, insert missing newline before case
Mike Yuan [Fri, 11 Oct 2024 13:29:00 +0000 (15:29 +0200)] 
shared/bus-util: re-break comment, insert missing newline before case

Follow-up for a178ffdfcd9d25886a6e563a0fbd9929852e85c4

13 months agoMerge pull request #34686 from DaanDeMeyer/bus-fallback
Daan De Meyer [Fri, 11 Oct 2024 13:16:54 +0000 (15:16 +0200)] 
Merge pull request #34686 from DaanDeMeyer/bus-fallback

Make sure bus_connect_transport_systemd() actually connects to the private manager bus

13 months agofundamental: Add EFI_GUID userspace definition 34717/head
anonymix007 [Thu, 10 Oct 2024 15:35:30 +0000 (18:35 +0300)] 
fundamental: Add EFI_GUID userspace definition

13 months agoboot: Add log_info and log_debug
anonymix007 [Wed, 11 Sep 2024 21:26:34 +0000 (00:26 +0300)] 
boot: Add log_info and log_debug

13 months agoboot: Add smbios_populate_raw_info
anonymix007 [Sat, 31 Aug 2024 18:38:21 +0000 (21:38 +0300)] 
boot: Add smbios_populate_raw_info

This function will be used to gather information for DeviceTree matching

13 months agoboot: Move smbios-related functions to a separate file
anonymix007 [Wed, 11 Sep 2024 12:18:05 +0000 (15:18 +0300)] 
boot: Move smbios-related functions to a separate file

13 months agoboot: Add xcalloc and xcalloc_multiply
anonymix007 [Sat, 31 Aug 2024 18:34:56 +0000 (21:34 +0300)] 
boot: Add xcalloc and xcalloc_multiply

13 months agoboot: Add EFI_STATUS_IS_ERROR macro
anonymix007 [Sat, 31 Aug 2024 18:31:49 +0000 (21:31 +0300)] 
boot: Add EFI_STATUS_IS_ERROR macro

13 months agoboot: Add bswap_{16,32}
anonymix007 [Thu, 10 Oct 2024 15:23:42 +0000 (18:23 +0300)] 
boot: Add bswap_{16,32}

13 months agoboot: Add be32toh
anonymix007 [Thu, 10 Oct 2024 14:54:13 +0000 (17:54 +0300)] 
boot: Add be32toh

13 months agoMerge pull request #34718 from poettering/efi-smbios-tweak
Lennart Poettering [Fri, 11 Oct 2024 11:34:13 +0000 (13:34 +0200)] 
Merge pull request #34718 from poettering/efi-smbios-tweak

efi: minor tweaks to smbios parsing

13 months agoMerge pull request #34703 from poettering/pidref-varlink
Lennart Poettering [Fri, 11 Oct 2024 11:33:44 +0000 (13:33 +0200)] 
Merge pull request #34703 from poettering/pidref-varlink

Serialize "PidRef" in a reasonable way in Varlink interfaces

13 months agoMerge pull request #34681 from ikruglov/ikruglov/io-systemd-Machine-post-merge-review
Lennart Poettering [Fri, 11 Oct 2024 10:15:56 +0000 (12:15 +0200)] 
Merge pull request #34681 from ikruglov/ikruglov/io-systemd-Machine-post-merge-review

machine: address post-merge review #34623

13 months agoseccomp: allowlist uretprobe() syscall
Lennart Poettering [Fri, 11 Oct 2024 07:46:14 +0000 (09:46 +0200)] 
seccomp: allowlist uretprobe() syscall

This is a new syscall provided by the kernel used to implement faster
uprobes. It's not supposed to be called by userspace, but only by kernel
generated uprobe code.

It should be fine to allow this, as the kernel authenticates the
invocation itself, and we shouldn't break compat with things.

Note that this allowlisting is not sufficient to make ureprobe() work.
libseccomp must be tought the syscall too, but this can happen
independently.

Fixes: #34615
13 months agosmbios: make code more readable by introducing a "limit" pointer 34718/head
Lennart Poettering [Fri, 11 Oct 2024 09:13:27 +0000 (11:13 +0200)] 
smbios: make code more readable by introducing a "limit" pointer

13 months agosmbios: move validation of SMBIOS table sizes fully into get_smbios_table()
Lennart Poettering [Fri, 11 Oct 2024 09:11:50 +0000 (11:11 +0200)] 
smbios: move validation of SMBIOS table sizes fully into get_smbios_table()

We do half a validation currently ourselves (i.e. check the header fits
into the rest of the data), and leave the other half to the
caller (i.e. check the table fits into the rest of the data).

get_smbios_table() is changed to accept the minimum object size and
validates it before returning a table.

Based on a discussion with @anonymix007.

13 months agostdio-bridge: Use customized log message for forwarding bus 34686/head
Daan De Meyer [Thu, 10 Oct 2024 13:54:57 +0000 (15:54 +0200)] 
stdio-bridge: Use customized log message for forwarding bus

Let's more clearly indicate that we failed to set up the server
which forwards messages from the remote client to the local bus
instead of logging a generic bus client message.

13 months agostdio-bridge: Use bus_log_connect_error()
Daan De Meyer [Thu, 10 Oct 2024 13:54:37 +0000 (15:54 +0200)] 
stdio-bridge: Use bus_log_connect_error()

13 months agobus-util: Move geteuid() check out of bus_connect_system_systemd()
Daan De Meyer [Wed, 9 Oct 2024 10:10:44 +0000 (12:10 +0200)] 
bus-util: Move geteuid() check out of bus_connect_system_systemd()

Let's move this check to bus_connect_transport_systemd() so that
bus_connect_system_systemd() will only ever connect to the manager
private manager bus instance and fail otherwise.

13 months agobus-util: Drop fallback to system/user bus if manager bus doesn't work
Daan De Meyer [Wed, 9 Oct 2024 09:44:34 +0000 (11:44 +0200)] 
bus-util: Drop fallback to system/user bus if manager bus doesn't work

We have various callsites that explicitly need the manager bus and
won't work with the system bus, like daemon-reexec and friends which
can't properly wait until the operation has finished unless using the
manager bus.

If we silently fall back to the system bus for these operations, we
can end up with rather hard to debug issues so let's remove the fallback
as it was added back in 2013 in a6aa89122d2fa5e811a72200773068c13bfffea2
without a clear explanation of why it was needed (I expect as a fallback
if kdbus wasn't available but that's not a thing anymore these days).