]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
2 years agodissect-image: fix build
Lennart Poettering [Wed, 28 Feb 2024 21:49:29 +0000 (22:49 +0100)] 
dissect-image: fix build

PRs #31531 and #31524 were merged in quick succession. They are fine
both on their own. But in combination they break the build. Fix it.

2 years agovmspawn: only add to cmdline if tpm was started
Sam Leonard [Wed, 28 Feb 2024 17:39:05 +0000 (17:39 +0000)] 
vmspawn: only add to cmdline if tpm was started

2 years agoMerge pull request #31531 from poettering/verity-userspace-optional
Lennart Poettering [Wed, 28 Feb 2024 21:04:58 +0000 (22:04 +0100)] 
Merge pull request #31531 from poettering/verity-userspace-optional

dissect: make use of userspace verity keyring optional

2 years agoMerge pull request #31524 from poettering/secure-getenv-naming-fix
Luca Boccassi [Wed, 28 Feb 2024 18:01:52 +0000 (18:01 +0000)] 
Merge pull request #31524 from poettering/secure-getenv-naming-fix

change naming order getenv_xyz_secure() → secure_getenv_xyz() to match glibc

2 years agoMerge pull request #31526 from poettering/proc-cmdline-underscorify
Luca Boccassi [Wed, 28 Feb 2024 17:59:46 +0000 (17:59 +0000)] 
Merge pull request #31526 from poettering/proc-cmdline-underscorify

make sure we use underscores for kernel cmdline option names, not dashes

2 years agoMerge pull request #31514 from CodethinkLabs/ptyfwd_issues
Lennart Poettering [Wed, 28 Feb 2024 17:36:50 +0000 (18:36 +0100)] 
Merge pull request #31514 from CodethinkLabs/ptyfwd_issues

ptyfwd/terminal-util: improve edge case handling

2 years agodissect: condition usespace verity keyring via kernel cmdline option + env var 31531/head
Lennart Poettering [Wed, 28 Feb 2024 15:16:30 +0000 (16:16 +0100)] 
dissect: condition usespace verity keyring via kernel cmdline option + env var

2 years agodissect-image: add flag for explicitly enabling userspace verity signature checking
Lennart Poettering [Wed, 28 Feb 2024 12:17:03 +0000 (13:17 +0100)] 
dissect-image: add flag for explicitly enabling userspace verity signature checking

let's make userspace verity signature checking optional. This adds a
dissection flag to enable the logic and patches through all our users to
enable it by default, thus effectively not changing anything from the
status quo ante. However, know we have a knob to turn this off in
certain scenarios.

2 years agoenv-util: also rename getenv_uint64_secure() → secure_getenv_uint64() 31524/head
Lennart Poettering [Wed, 28 Feb 2024 13:59:31 +0000 (14:59 +0100)] 
env-util: also rename getenv_uint64_secure() → secure_getenv_uint64()

As in the previous commit, let's not change the order of the words
compared to the underlying glibc API.

2 years agoenv-util: rename getenv_bool_secure() → secure_getenv_bool()
Lennart Poettering [Wed, 28 Feb 2024 13:57:35 +0000 (14:57 +0100)] 
env-util: rename getenv_bool_secure() → secure_getenv_bool()

The glibc API is behind the wrapper is called "secure_getenv()", hence
our wrapper really should keep the order too, otherwise things are just
too confusing.

2 years agoman: add a few missing entries to kernel-command-line man page 31526/head
Lennart Poettering [Wed, 28 Feb 2024 14:33:16 +0000 (15:33 +0100)] 
man: add a few missing entries to kernel-command-line man page

2 years agotree-wide: use "_" rather than "-" as separator in kernel cmdline options
Lennart Poettering [Wed, 28 Feb 2024 14:31:27 +0000 (15:31 +0100)] 
tree-wide: use "_" rather than "-" as separator in kernel cmdline options

Most of our kernel cmdline options use underscores as word separators in
kernel cmdline options, but there were some exceptions. Let's fix those,
and also use underscores.

Since our /proc/cmdline parsers don't distinguish between the two
characters anyway this should not break anything, but makes sure our own
codebase (and in particular docs and log messages) are internally
consistent.

2 years agoMerge pull request #31444 from bluca/semaphore
Frantisek Sumsal [Wed, 28 Feb 2024 14:03:11 +0000 (15:03 +0100)] 
Merge pull request #31444 from bluca/semaphore

semaphore: set upstream build profile and set default branch to debian/master

2 years agoMerge pull request #31293 from ragazenta/netdev_rps
Luca Boccassi [Wed, 28 Feb 2024 13:37:28 +0000 (13:37 +0000)] 
Merge pull request #31293 from ragazenta/netdev_rps

udevd: Add ReceivePacketSteeringCPUMask for systemd.link

2 years agoresolved: exit function if varlink_dispatch() returns > 0
Lennart Poettering [Wed, 28 Feb 2024 10:29:04 +0000 (11:29 +0100)] 
resolved: exit function if varlink_dispatch() returns > 0

varlink_dispatch() returns > 0 if it already replied to the method call,
hence this is reason to return from the handler function, and not
proceed.

2 years agouserbdb: pass log level from main daemon to worker
Lennart Poettering [Wed, 28 Feb 2024 08:43:02 +0000 (09:43 +0100)] 
userbdb: pass log level from main daemon to worker

2 years agoshared/ptyfwd: detect String Terminator or BEL when parsing an OSC sequence 31514/head
Sam Leonard [Tue, 27 Feb 2024 16:08:09 +0000 (16:08 +0000)] 
shared/ptyfwd: detect String Terminator or BEL when parsing an OSC sequence

2 years agoshared/ptyfwd: allow window title but not background color as a valid state
Sam Leonard [Tue, 27 Feb 2024 15:08:37 +0000 (15:08 +0000)] 
shared/ptyfwd: allow window title but not background color as a valid state

Previously if a PTYForward instance had the window title set but no
background color set then it would crash in an assertion as
pty_forward_ansi_process didn't require both to be present.

systemd-vmspawn could get into this state if it failed to get the
terminal tint color.

Now any method that would have called background_color_sequence now
becomes just a NOP if the background color is not set.

This allows keeping the functionality to set window titles even if the
terminal doesn't support the background coloring.

2 years agobasic/terminal-util: accept ST or BEL to end escape sequence queries
Sam Leonard [Tue, 27 Feb 2024 14:35:14 +0000 (14:35 +0000)] 
basic/terminal-util: accept ST or BEL to end escape sequence queries

Currently scan_background_color_response only accepts BEL (\x07) to end
a response, however some terminals (namely kitty in my case) will reply
with the string terminator (ST - https://en.wikipedia.org/wiki/ANSI_escape_code).

This commit changes the behaviour to now accept either ending.

2 years agobasic/terminal-util: add check for poll timeout in get_default_background_color
Sam Leonard [Tue, 27 Feb 2024 11:12:39 +0000 (11:12 +0000)] 
basic/terminal-util: add check for poll timeout in get_default_background_color

Currently the return value 0 is not checked for, this indicates a
timeout and should be handled to prevent doing a blocking read on a file
descriptor with no data ready.

2 years agonetwork/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()
Yu Watanabe [Tue, 27 Feb 2024 10:31:26 +0000 (19:31 +0900)] 
network/ndisc: drop redundant sd_ndisc_router_get_icmp6_ratelimit()

This effectively reverts 9175002864d8876f375e0df089d142d239282528.

The retrans time field in RA message is for neighbor solicitation,
and the commit d4c8de21a07d015f2f2c787e0735be5e4d02fb3c makes the value
assigned to the correct sysctl property.

Let's deprecate the option, and drop the redundant functions.

2 years agonspawn: minor coding style tweaks to nspawn-register.c
Lennart Poettering [Wed, 28 Feb 2024 10:07:39 +0000 (11:07 +0100)] 
nspawn: minor coding style tweaks to nspawn-register.c

2 years agoMerge pull request #31511 from jamacku/prepare-for-diff-shellcheck
Zbigniew Jędrzejewski-Szmek [Wed, 28 Feb 2024 09:28:56 +0000 (10:28 +0100)] 
Merge pull request #31511 from jamacku/prepare-for-diff-shellcheck

Prepare for new version of Differential ShellCheck & scanning of shell completion scripts

2 years agocgroup-setup: clarify '<=' is evaluated earlier
Yu Watanabe [Wed, 28 Feb 2024 02:51:04 +0000 (11:51 +0900)] 
cgroup-setup: clarify '<=' is evaluated earlier

Follow-up for 31323f21bb0ae7c712f43500c42997c91a6d20bf.

The code is correct, but let's silence Coverity.

Closes CID#1534787.

2 years agotest-network: Add test for rps_cpu_mask option 31293/head
Renjaya Raga Zenta [Fri, 16 Feb 2024 07:01:47 +0000 (14:01 +0700)] 
test-network: Add test for rps_cpu_mask option

2 years agoudevd: Add ReceivePacketSteeringCPUMask for systemd.link
Renjaya Raga Zenta [Tue, 13 Feb 2024 14:15:24 +0000 (21:15 +0700)] 
udevd: Add ReceivePacketSteeringCPUMask for systemd.link

Takes a list of CPU indices or ranges separated by either whitespace or commas. Alternatively,
takes the special value "all" in which will include all available CPUs in the mask.
CPU ranges are specified by the lower and upper CPU indices separated by a dash (e.g. "2-6").
This option may be specified more than once, in which case the specified CPU affinity masks are merged.
If an empty string is assigned, the mask is reset, all assignments prior to this will have no effect.
Defaults to unset and RPS CPU list is unchanged. To disable RPS when it was previously enabled, use the
special value "disable".

Currently, this will set CPU mask to all `rx` queue of matched device (if it has multiple queues).

The `/sys/class/net/<dev>/queues/rx-<n>/rps_cpus` only accept cpu bitmap mask in hexadecimal.

Fix: #30323

2 years agoTODO: fix typo
Yu Watanabe [Wed, 28 Feb 2024 02:46:07 +0000 (11:46 +0900)] 
TODO: fix typo

Follow-up for 666a348d1c98873c55115924751e6f2d3bdb7435.

2 years agotest-network: fix typo
Yu Watanabe [Wed, 28 Feb 2024 02:44:17 +0000 (11:44 +0900)] 
test-network: fix typo

Follow-up for a663ddc04e43a9234e00e47aed98bf2bbeb1573a.

2 years agosemaphore: set upstream build profile and set default branch to debian/master 31444/head
Luca Boccassi [Thu, 22 Feb 2024 10:07:24 +0000 (10:07 +0000)] 
semaphore: set upstream build profile and set default branch to debian/master

Leave TEST_UPSTREAM=1 for now in case we switch branches via the hook

2 years agosemaphore: enable backports to get new dependencies
Luca Boccassi [Thu, 22 Feb 2024 10:18:32 +0000 (10:18 +0000)] 
semaphore: enable backports to get new dependencies

Required due to building with debian/master branch

2 years agotest/README: document how to add a new empty release to the PPA to migrate the CI...
Luca Boccassi [Thu, 22 Feb 2024 14:19:08 +0000 (14:19 +0000)] 
test/README: document how to add a new empty release to the PPA to migrate the CI to a new version

2 years agotest/README: update ubuntu IRC channel for CI help
Luca Boccassi [Thu, 22 Feb 2024 14:15:30 +0000 (14:15 +0000)] 
test/README: update ubuntu IRC channel for CI help

2 years agoinstall: fix compiler warning about empty directive argument
Luca Boccassi [Sat, 24 Feb 2024 12:05:44 +0000 (12:05 +0000)] 
install: fix compiler warning about empty directive argument

On ppc64el with gcc 13.2 on Ubuntu 24.04:

3s In file included from ../src/basic/macro.h:386,
483s                  from ../src/basic/alloc-util.h:10,
483s                  from ../src/shared/install.c:12:
483s ../src/shared/install.c: In function ‘install_changes_dump’:
483s ../src/shared/install.c:432:64: error: ‘%s’ directive argument is null [-Werror=format-overflow=]
483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",
483s       |                                                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
483s ../src/shared/install.c:432:75: note: format string is defined here
483s   432 |                         err = log_error_errno(changes[i].type, "Failed to %s unit, unit %s does not exist.",

2 years agoMerge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch
Luca Boccassi [Tue, 27 Feb 2024 20:07:18 +0000 (20:07 +0000)] 
Merge pull request #31515 from keszybz/small-cleanups-after-review-of-stable-batch

Small cleanups after review of stable batch

2 years agoMerge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation
Luca Boccassi [Tue, 27 Feb 2024 19:21:35 +0000 (19:21 +0000)] 
Merge pull request #31442 from YHNdnzj/towards-cgroup-v1-deprecation

core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE

2 years agotmpfiles.d: avoid deprecated, undocumented syntax (s/F/f+/)
Štěpán Němec [Tue, 27 Feb 2024 13:21:33 +0000 (14:21 +0100)] 
tmpfiles.d: avoid deprecated, undocumented syntax (s/F/f+/)

Fixes: eccebf4b0dcb ("systemd-tmpfiles: deprecate F for f+")
2 years agocore: remove duplicate serialization of `cpu_sched_reset_on_fork`
Antonio Alvarez Feijoo [Tue, 27 Feb 2024 13:28:10 +0000 (14:28 +0100)] 
core: remove duplicate serialization of `cpu_sched_reset_on_fork`

`c->cpu_sched_reset_on_fork` is serialized using
`exec-context-cpu-sched-reset-on-fork` and
`exec-context-cpu-scheduling-reset-on-fork`. Let's keep only the second one, to
serialize the value only if `cpu_sched_set` is true.

2 years agotest: drop route from test-functions
Jan Engelhardt [Tue, 27 Feb 2024 15:05:14 +0000 (16:05 +0100)] 
test: drop route from test-functions

I do not see `route` being exercised anywhere else, everything seems
to be on `ip route` already.

2 years agoshared/pam-util: fix awkward tense in log message 31515/head
Zbigniew Jędrzejewski-Szmek [Tue, 27 Feb 2024 17:32:51 +0000 (18:32 +0100)] 
shared/pam-util: fix awkward tense in log message

2 years agovirt: wrap comment, add missing punctuation
Zbigniew Jędrzejewski-Szmek [Tue, 27 Feb 2024 17:32:21 +0000 (18:32 +0100)] 
virt: wrap comment, add missing punctuation

2 years agoman/sd_bus_service_reconnect.c: normalize whitespace
Zbigniew Jędrzejewski-Szmek [Tue, 27 Feb 2024 17:15:51 +0000 (18:15 +0100)] 
man/sd_bus_service_reconnect.c: normalize whitespace

For man pages, we generally indent with 2 spaces and wrap to ~80 columns.

2 years agoman, shell-completion: fix a few typos/language issues
Štěpán Němec [Tue, 27 Feb 2024 13:31:43 +0000 (14:31 +0100)] 
man, shell-completion: fix a few typos/language issues

2 years agobootspec: don't complain about valid loader.conf settings
Lennart Poettering [Mon, 26 Feb 2024 11:21:01 +0000 (12:21 +0100)] 
bootspec: don't complain about valid loader.conf settings

Let's not complain about various valid loader.conf settings we more
recently added. At the same time let's remove the half-assed userspace
parsers for the fields we actually do support but don't actually really
care about in userspace. There's really no point in storing strings away
that we are not using at all, hence just don#t.

Fixes: #31487
2 years agoci(labeler): add rule for `shell-completion` label
Jan Macku [Tue, 27 Feb 2024 14:54:40 +0000 (15:54 +0100)] 
ci(labeler): add rule for `shell-completion` label

2 years agotest: use socat in unidirectional mode
Frantisek Sumsal [Tue, 27 Feb 2024 10:10:53 +0000 (11:10 +0100)] 
test: use socat in unidirectional mode

By default socat open a separate r/w channel for each specified address,
and terminates the connection after .5s from receiving EOF on _either_
side. And since one side of that connection is an empty stdin, we reach
that EOF pretty quickly. Let's avoid this by using socat in
"reversed unidirectional" mode, where the first address is used only for
writing, and the second one is used only for reading.

Addresses:
  - https://github.com/systemd/systemd/issues/31500
  - https://github.com/systemd/systemd/issues/31493

Follow-up for 3456c89ac26.

2 years agoNEWS: announce cgroup v1 deprecation 31442/head
Mike Yuan [Sun, 25 Feb 2024 02:13:26 +0000 (10:13 +0800)] 
NEWS: announce cgroup v1 deprecation

2 years agomeson: drop default-hierarchy= option, always use unified
Mike Yuan [Sun, 25 Feb 2024 02:05:26 +0000 (10:05 +0800)] 
meson: drop default-hierarchy= option, always use unified

2 years agocore: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE
Mike Yuan [Sun, 25 Feb 2024 01:10:51 +0000 (09:10 +0800)] 
core: refuse cgroupv1 unless SYSTEMD_CGROUP_ENABLE_LEGACY_FORCE

Also, add a 30s sleep even if cgroup v1 is forced.

Closes #30852

2 years agoshared/cgroup-setup: introduce cg_is_legacy_force_enabled
Mike Yuan [Sun, 25 Feb 2024 01:03:16 +0000 (09:03 +0800)] 
shared/cgroup-setup: introduce cg_is_legacy_force_enabled

2 years agoshared/mount-setup: split out mount_cgroup_legacy_controllers
Mike Yuan [Sun, 25 Feb 2024 01:07:17 +0000 (09:07 +0800)] 
shared/mount-setup: split out mount_cgroup_legacy_controllers

2 years agoshared/mount-setup: minor modernization
Mike Yuan [Thu, 22 Feb 2024 05:03:09 +0000 (13:03 +0800)] 
shared/mount-setup: minor modernization

2 years agocore/cgroup: remove obsolete TODO
Mike Yuan [Sun, 25 Feb 2024 01:00:27 +0000 (09:00 +0800)] 
core/cgroup: remove obsolete TODO

2 years agocore: mark JoinControllers= as DISABLED_LEGACY rather than _CONFIGURATION
Mike Yuan [Thu, 22 Feb 2024 05:06:44 +0000 (13:06 +0800)] 
core: mark JoinControllers= as DISABLED_LEGACY rather than _CONFIGURATION

Follow-up for 143fadf369a18449464956206226761e49be1928

2 years agoci(lint): temporarily disable ShellCheck for bash-completion 31511/head
Jan Macku [Tue, 27 Feb 2024 14:33:36 +0000 (15:33 +0100)] 
ci(lint): temporarily disable ShellCheck for bash-completion

This commit should be reverted once bash completion is in better shape when it comes to ShellCheck.

2 years agofix(SC2148): add ShellCheck directive to bash completion scripts
Jan Macku [Tue, 27 Feb 2024 13:54:49 +0000 (14:54 +0100)] 
fix(SC2148): add ShellCheck directive to bash completion scripts

2 years agoci(lint): exclude zsh completion from ShellCheck
Jan Macku [Tue, 27 Feb 2024 13:26:52 +0000 (14:26 +0100)] 
ci(lint): exclude zsh completion from ShellCheck

zsh is not supported by ShellCheck

2 years agozsh/_journalctl: complete -g, --case-sensitive, 'help' (pseudo-)facility
Štěpán Němec [Tue, 27 Feb 2024 13:36:57 +0000 (14:36 +0100)] 
zsh/_journalctl: complete -g, --case-sensitive, 'help' (pseudo-)facility

2 years agoupdate TODO
Lennart Poettering [Tue, 27 Feb 2024 13:40:31 +0000 (14:40 +0100)] 
update TODO

2 years agosysext: fix typo
Yu Watanabe [Tue, 27 Feb 2024 04:28:02 +0000 (13:28 +0900)] 
sysext: fix typo

2 years agoMerge pull request #31000 from flatcar-hub/krnowak/mutable-overlays
Luca Boccassi [Mon, 26 Feb 2024 16:17:11 +0000 (16:17 +0000)] 
Merge pull request #31000 from flatcar-hub/krnowak/mutable-overlays

systemd-sysext: Implement optional mutability for extensions

2 years agoMerge pull request #31458 from poettering/vmspawn-ptyfwd
Luca Boccassi [Mon, 26 Feb 2024 15:44:50 +0000 (15:44 +0000)] 
Merge pull request #31458 from poettering/vmspawn-ptyfwd

vmspawn: implement TTY logic via ptyfwd

2 years agoMerge pull request #31480 from rpigott/dnssec-maxwork
Luca Boccassi [Mon, 26 Feb 2024 12:26:36 +0000 (12:26 +0000)] 
Merge pull request #31480 from rpigott/dnssec-maxwork

resolved: limit the number of signature validations in a transaction

2 years agonetwork: fix use-after-free in {address,route}_remove_and_cancel()
Yu Watanabe [Mon, 26 Feb 2024 03:09:52 +0000 (12:09 +0900)] 
network: fix use-after-free in {address,route}_remove_and_cancel()

Fixes #31485.

2 years agonspawn: hide ^] hint unless we are interactive mode 31458/head
Lennart Poettering [Fri, 23 Feb 2024 11:30:19 +0000 (12:30 +0100)] 
nspawn: hide ^] hint unless we are interactive mode

The hotkey only works in interactive mode hence don't mislead users
about it.

2 years agovmspawn: use our own ptyfwd code for the console of a VM
Lennart Poettering [Fri, 23 Feb 2024 11:20:55 +0000 (12:20 +0100)] 
vmspawn: use our own ptyfwd code for the console of a VM

Let's make systemd-nspawn use our own ptyfwd logic to handle the TTY by
default.

This adds a new setting --console=, inspired by nspawn's setting of the
same name. If --console=interactive= is used, then we'll do the TTY
dance on our own via ptyfwd, and thus get tinting, our usual hotkey
handling and similar.

Since qemu's own console is useful too, let's keep it around via
--console=native.

FInally, replace the --qemu-gui switch by --console=gui.

2 years agopretty-print: make tinting a bit less aggressive
Lennart Poettering [Fri, 23 Feb 2024 11:20:04 +0000 (12:20 +0100)] 
pretty-print: make tinting a bit less aggressive

2 years agorun: use sd_event_set_signal_exit() at one more place
Lennart Poettering [Fri, 23 Feb 2024 11:19:43 +0000 (12:19 +0100)] 
run: use sd_event_set_signal_exit() at one more place

2 years agonetwork/ndisc: rename Network.ipv6_accept_ra -> Network.ndisc
Yu Watanabe [Fri, 23 Feb 2024 03:41:24 +0000 (12:41 +0900)] 
network/ndisc: rename Network.ipv6_accept_ra -> Network.ndisc

These settings are leated to sd-ndisc and Neighbor Discovery protocol.
Let's use more suitable name.

2 years agoFix: Chuwi UBook X (CWI535) screen rotation matrix
Alexander Zavyalov [Mon, 26 Feb 2024 06:15:02 +0000 (14:15 +0800)] 
Fix: Chuwi UBook X (CWI535) screen rotation matrix

2 years agoukify: Use VERSION_TAG instead of GIT_VERSION
Daan De Meyer [Fri, 23 Feb 2024 15:39:18 +0000 (16:39 +0100)] 
ukify: Use VERSION_TAG instead of GIT_VERSION

GIT_VERSION isn't actually available so use VERSION_TAG instead which
is available.

2 years agoresolved: reduce the maximum nsec3 iterations to 100 31480/head
Ronan Pigott [Sun, 25 Feb 2024 07:23:32 +0000 (00:23 -0700)] 
resolved: reduce the maximum nsec3 iterations to 100

According to RFC9267, the 2500 value is not helpful, and in fact it can
be harmful to permit a large number of iterations. Combined with limits
on the number of signature validations, I expect this will mitigate the
impact of maliciously crafted domains designed to cause excessive
cryptographic work.

2 years agoresolved: limit the number of signature validations in a transaction
Ronan Pigott [Sun, 25 Feb 2024 01:21:24 +0000 (18:21 -0700)] 
resolved: limit the number of signature validations in a transaction

It has been demonstrated that tolerating an unbounded number of dnssec
signature validations is a bad idea. It is easy for a maliciously
crafted DNS reply to contain as many keytag collisions as desired,
causing us to iterate every dnskey and signature combination in vain.

The solution is to impose a maximum number of validations we will
tolerate. While collisions are not hard to craft, I still expect they
are unlikely in the wild so it should be safe to pick fairly small
values.

Here two limits are imposed: one on the maximum number of invalid
signatures encountered per rrset, and another on the total number of
validations performed per transaction.

2 years agoMerge pull request #31490 from yuwata/network-varlink-cleanups
Yu Watanabe [Mon, 26 Feb 2024 06:12:12 +0000 (15:12 +0900)] 
Merge pull request #31490 from yuwata/network-varlink-cleanups

network/varlink: several trivial cleanups

2 years agovarlink/network: reindent methods 31490/head
Yu Watanabe [Mon, 26 Feb 2024 04:42:01 +0000 (13:42 +0900)] 
varlink/network: reindent methods

2 years agonetwork/varlink: downgrade log level about failure in getting netns ID
Yu Watanabe [Mon, 26 Feb 2024 02:30:34 +0000 (11:30 +0900)] 
network/varlink: downgrade log level about failure in getting netns ID

2 years agoformat-table: replace "(size_t) -1" with SIZE_MAX
Yu Watanabe [Mon, 26 Feb 2024 01:37:32 +0000 (10:37 +0900)] 
format-table: replace "(size_t) -1" with SIZE_MAX

2 years agoMerge pull request #31440 from yuwata/sd-ndisc-sd-radv-cleanups
Luca Boccassi [Sun, 25 Feb 2024 13:07:53 +0000 (13:07 +0000)] 
Merge pull request #31440 from yuwata/sd-ndisc-sd-radv-cleanups

sd-ndisc,sd-radv: several trivial cleanups

2 years agoin-addr-util: introduce in{4,6}_addr_is_multicast()
Yu Watanabe [Fri, 23 Feb 2024 04:12:57 +0000 (13:12 +0900)] 
in-addr-util: introduce in{4,6}_addr_is_multicast()

2 years agoicmp6-util: make icmp6_receive() refuse packets without IPv6 sender address
Yu Watanabe [Thu, 22 Feb 2024 05:28:52 +0000 (14:28 +0900)] 
icmp6-util: make icmp6_receive() refuse packets without IPv6 sender address

Previously, the function supports packets without IPv6 sender address
for unit tests. However, now unit tests use their own version of
icmp6_receive(). Hence, let's make the check more strict.

2 years agosd-ndisc: make callback takes arbitrary type of message
Yu Watanabe [Wed, 14 Feb 2024 11:38:12 +0000 (20:38 +0900)] 
sd-ndisc: make callback takes arbitrary type of message

No functional change. Preparation for supporting Neighbor Advertisement
message.

2 years agonetwork/ndisc: drop all configurations without lifetime on stop
Yu Watanabe [Fri, 23 Feb 2024 03:02:46 +0000 (12:02 +0900)] 
network/ndisc: drop all configurations without lifetime on stop

As we call ndisc_drop_outdated() with USEC_INFINITY on stop.

2 years agodocs: update link for Arch Linux bugtracker
Mike Yuan [Sun, 25 Feb 2024 04:48:49 +0000 (12:48 +0800)] 
docs: update link for Arch Linux bugtracker

2 years agoMerge pull request #31472 from YHNdnzj/systemctl-pidref
Mike Yuan [Sat, 24 Feb 2024 22:54:14 +0000 (06:54 +0800)] 
Merge pull request #31472 from YHNdnzj/systemctl-pidref

systemctl: generalize GetUnitByPIDFD handling

2 years agonetwork: use FOREACH_STRING()
Yu Watanabe [Sat, 24 Feb 2024 05:25:54 +0000 (14:25 +0900)] 
network: use FOREACH_STRING()

2 years agodocs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK)
Mike Yuan [Sat, 24 Feb 2024 05:26:19 +0000 (13:26 +0800)] 
docs/CODING_STYLE: fix typo (CLONE_VORK -> VFORK)

2 years agosystemctl-show: use lookup_unit_by_pidref too 31472/head
Mike Yuan [Sat, 24 Feb 2024 01:39:32 +0000 (09:39 +0800)] 
systemctl-show: use lookup_unit_by_pidref too

Follow-up for e0e7bc8223c3f28fcb48db9f0f003d9f03ca46d7

This allows us to pin the process locally when GetUnitByPIDFD
is not available, just like what we have been doing for
'systemctl whoami'. Also, fix looking up remote pid.
We can't use pidfd for those.

2 years agosystemctl: generalize GetUnitByPIDFD handling
Mike Yuan [Sat, 24 Feb 2024 01:01:22 +0000 (09:01 +0800)] 
systemctl: generalize GetUnitByPIDFD handling

2 years agosystemctl-util: use strv_free_and_replace at one more place
Mike Yuan [Sat, 24 Feb 2024 00:55:33 +0000 (08:55 +0800)] 
systemctl-util: use strv_free_and_replace at one more place

2 years agoFallback from pidfd_open on permission errors too
Luca Boccassi [Fri, 23 Feb 2024 21:09:11 +0000 (21:09 +0000)] 
Fallback from pidfd_open on permission errors too

Skip using pidfds if we get a permission denied error.
This can happen with an old policy and a new kernel that uses the
new pidfs filesystem to back pidfds, instead of anonymous inodes,
as the existing policy denies access.

This is already the case for most uses of pidfd_open, like pidref,
but not on these two. Fix them.

2 years agotest: split out {dump,verify}_ra_message() 31440/head
Yu Watanabe [Sun, 18 Feb 2024 17:21:31 +0000 (02:21 +0900)] 
test: split out {dump,verify}_ra_message()

Then, let's not modify the global object.

2 years agosd-radv: several cleanups
Yu Watanabe [Sun, 18 Feb 2024 03:45:48 +0000 (12:45 +0900)] 
sd-radv: several cleanups

- split out radv_setup_recv_event(),
- slightly update log messages,
- use DIV_ROUND_UP(),
- use structured initializer more.

No functional change, just preparation for later commits.

2 years agosd-ndisc: several trivial cleanups
Yu Watanabe [Wed, 14 Feb 2024 06:59:38 +0000 (15:59 +0900)] 
sd-ndisc: several trivial cleanups

- update several log messages,
- use event_reset_time_relative(),
- split out ndisc_setup_recv_event() and ndisc_setup_timer().

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

2 years agoicmp6-util: merge icmp6_bind_router_{solicitation,advertisement}() into icmp6_bind()
Yu Watanabe [Wed, 14 Feb 2024 07:45:55 +0000 (16:45 +0900)] 
icmp6-util: merge icmp6_bind_router_{solicitation,advertisement}() into icmp6_bind()

No functional change, just refactoring.

2 years agohwdb: Add support for Elgato Stream Deck Plus
Georges Basile Stavracas Neto [Fri, 23 Feb 2024 23:04:12 +0000 (20:04 -0300)] 
hwdb: Add support for Elgato Stream Deck Plus

Add support for the following device:

 - ID 0fd9:0084 Elgato Systems GmbH Stream Deck Plus

2 years agodocs: fix typo
Yu Watanabe [Sat, 24 Feb 2024 02:30:39 +0000 (11:30 +0900)] 
docs: fix typo

2 years agoefi: de-inline xmalloc to fix build failure with gcc 12.2 and -O2
Luca Boccassi [Thu, 22 Feb 2024 14:23:06 +0000 (14:23 +0000)] 
efi: de-inline xmalloc to fix build failure with gcc 12.2 and -O2

With meson build --werror --buildtype=plain -Dc_args=" -O2" the build fails:

../src/boot/efi/stub.c: In function ‘load_addons.constprop’:03:06
../src/boot/efi/stub.c:475:40: error: using a dangling pointer to ‘p’ [-Werror=dangling-pointer=]03:06
  475 |                         dt_bases[n_dt] = xmemdup((uint8_t*)loaded_addon->ImageBase + addrs[UNIFIED_SECTION_DTB],03:06
      |                         ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~03:06
  476 |                                                  dt_sizes[n_dt]);03:06
      |                                                  ~~~~~~~~~~~~~~~03:06
In file included from ../src/boot/efi/stub.c:20:03:06
../src/boot/efi/util.h:33:15: note: ‘p’ declared here03:06
   33 |         void *p;03:06
      |               ^

De-inline the function and initialize p to make gcc happy.

2 years agoMerge pull request #31464 from poettering/vmspawn-limit-bank
Luca Boccassi [Fri, 23 Feb 2024 22:04:44 +0000 (22:04 +0000)] 
Merge pull request #31464 from poettering/vmspawn-limit-bank

vmspawn: disable all TPM PCR banks, except for SHA256

2 years agoptyfwd: optionally prefix window title with colored dot
Lennart Poettering [Fri, 23 Feb 2024 14:54:22 +0000 (15:54 +0100)] 
ptyfwd: optionally prefix window title with colored dot

in uid0/systemd-run/nspawn we already set a window title with a colorful
unicode dot indicating the changed privileges/execution context. This typically
gets overriden by the shell inside the environment however.

Let's tweak this a bit: when we see the window title OSC ANSI sequence
passing through, let's patch in the unicode dot as a prefix to the
title.

This is super pretty, since it makes sure root sessions via 0ad are
really easily recognizable as such, because the window title carries an
🔴 red dot as prefix then.

2 years agoMerge pull request #31465 from xypron/detect-virt
Luca Boccassi [Fri, 23 Feb 2024 20:50:51 +0000 (20:50 +0000)] 
Merge pull request #31465 from xypron/detect-virt

Detect virtualization on RISC-V

2 years agoman/systemd-sysext.xml: document mutable extensions 31000/head
Thilo Fromm [Fri, 16 Feb 2024 18:29:12 +0000 (19:29 +0100)] 
man/systemd-sysext.xml: document mutable extensions

Signed-off-by: Thilo Fromm <thilofromm@microsoft.com>