Yu Watanabe [Tue, 16 Apr 2024 04:29:23 +0000 (13:29 +0900)]
networkctl: allow to call 'networkctl cat' without arguments
Then, show networkd.conf and its drop-ins.
Yu Watanabe [Tue, 16 Apr 2024 02:50:38 +0000 (11:50 +0900)]
man: add missing drop-in directory
Yu Watanabe [Tue, 16 Apr 2024 03:21:36 +0000 (12:21 +0900)]
NEWS: fix typo
Yu Watanabe [Tue, 16 Apr 2024 02:45:22 +0000 (11:45 +0900)]
Merge pull request #32103 from yuwata/udev-load-credentials
udev: load udev rules from credentials
Yu Watanabe [Tue, 16 Apr 2024 02:18:07 +0000 (11:18 +0900)]
Merge pull request #32267 from yuwata/sd-ndisc-router-solicit
sd-radv: introduce sd_ndisc_router_solicit and use it
Yu Watanabe [Thu, 4 Apr 2024 19:14:19 +0000 (04:14 +0900)]
test: add test for systemd-udev-load-credentials.service
Yu Watanabe [Fri, 23 Feb 2024 06:41:06 +0000 (15:41 +0900)]
sd-radv: use ICMP6Packet and sd_ndisc_router_solicit
Then, sd-radv can reject invalid Router Solicit messages, e.g. that have
invalid options.
No effective functional change, just refactoring.
Yu Watanabe [Fri, 23 Feb 2024 06:19:58 +0000 (15:19 +0900)]
sd-radv: introduce sd_ndisc_router_solicit
It is not used in this stage, but will be used later in sd-radv.
Yu Watanabe [Thu, 4 Apr 2024 19:04:31 +0000 (04:04 +0900)]
units: introduce systemd-udev-load-credentials.service
Yu Watanabe [Thu, 4 Apr 2024 18:55:25 +0000 (03:55 +0900)]
udevadm-control: add --load-credentials option
When specified, credentials udev.conf.* and udev.rules.* are copied to
the corresponding directories.
Yu Watanabe [Thu, 4 Apr 2024 20:09:19 +0000 (05:09 +0900)]
udevadm-control: split out send_control_commands()
No functional change, just refactoring and preparation for later
commits.
Yu Watanabe [Thu, 4 Apr 2024 17:51:34 +0000 (02:51 +0900)]
udevadm-control: check if control command really specified
Previously, 'udevadm control' only checked the number of the arguments.
So, if only `--timeout` is specified, it spuriously did nothing and succeeded.
This makes the command request at least one control command.
Yu Watanabe [Fri, 5 Apr 2024 03:21:30 +0000 (12:21 +0900)]
creds-util: move pick_up_credentials() from network-generator
The function is quite general, and can be used at other places.
Let's move to our shared library.
Yu Watanabe [Fri, 5 Apr 2024 11:05:06 +0000 (20:05 +0900)]
network-generator: rename NETWORKD_UNIT_... -> NETWORK_UNIT_...
As .link files are used by systemd-udevd, rather than systemd-networkd.
Also, this makes it ends with '/', to follow our recent coding style.
Luca Boccassi [Mon, 15 Apr 2024 21:23:45 +0000 (22:23 +0100)]
test: initialize _cleanup_ variables
Otherwise static analysis will complain
Luca Boccassi [Mon, 15 Apr 2024 20:36:12 +0000 (22:36 +0200)]
Merge pull request #32286 from YHNdnzj/vpick-null-result
shared/vpick: add missing condition on ret_result
Luca Boccassi [Mon, 15 Apr 2024 20:34:39 +0000 (22:34 +0200)]
Merge pull request #32258 from yuwata/network-tc-fix-stack-overflow
network/tc: fix stack overflow
Lennart Poettering [Mon, 15 Apr 2024 15:41:37 +0000 (17:41 +0200)]
units: order repart after systemd-tpm2-setup-early.service
This mimics what we do for systemd-cryptsetup@.service (see
src/shared/generator.c), and makes sense since repart might lock up the
root volume against a TPM, which ideally has its SRK already set up by
then.
More importantly though, this ensures that we ordered correctly after
tpm2.target (which systemd-tpm2-setup-early.service has a dependency
on), for systems where the TPM drivers are not compiled into the kernel.
See: https://lists.freedesktop.org/archives/systemd-devel/2024-April/050201.html
Mike Yuan [Mon, 15 Apr 2024 17:29:27 +0000 (01:29 +0800)]
shared/vpick: add missing condition on ret_result
Fixes #32285
Mike Yuan [Mon, 15 Apr 2024 17:37:34 +0000 (01:37 +0800)]
shared/vpick: drop unneeded strempty()
prefix_roota() handles NULL root param gracefully.
Mike Yuan [Mon, 15 Apr 2024 17:28:20 +0000 (01:28 +0800)]
shared/vpick: align function args correctly, add missing assertion
Yu Watanabe [Fri, 5 Apr 2024 04:45:52 +0000 (13:45 +0900)]
dissect: refuse to use diskseq if ID_IGNORE_DISKSEQ=1 is specified
Follow-up for
1a81ddef00a0a25f6bcdd1e6633430e8b240b87f.
Lennart Poettering [Mon, 15 Apr 2024 10:05:59 +0000 (12:05 +0200)]
creds: update --help text regarding tpm2-absent → null rename
This was forgotten when "tpm2-absent" was renamed to "null".
Follow-up-for:
6d78dc282721b3b40e8474222ff8c6e0aebb6d10
Jörg Behrmann [Mon, 15 Apr 2024 12:04:48 +0000 (14:04 +0200)]
NEWS: typo fixes
Mike Yuan [Mon, 15 Apr 2024 11:33:09 +0000 (19:33 +0800)]
NEWS: fix typo, rephrase para for systemd-hibernate-clear.service a bit
dependabot[bot] [Mon, 15 Apr 2024 10:08:51 +0000 (10:08 +0000)]
build(deps): bump pkg/fedora from `
3f8c38e` to `
a379236`
Bumps pkg/fedora from `
3f8c38e` to `
a379236`.
---
updated-dependencies:
- dependency-name: pkg/fedora
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Lennart Poettering [Thu, 11 Apr 2024 17:03:28 +0000 (19:03 +0200)]
update NEWS
Lennart Poettering [Mon, 15 Apr 2024 10:05:41 +0000 (12:05 +0200)]
update TODO
Eisuke Kawashima [Mon, 15 Apr 2024 08:58:48 +0000 (17:58 +0900)]
improve zsh completion (#32098)
* fix error
* remove options that are no longer supported
* add missing options
* stop completion if an option `--help` or `--version` is supplied
[[[
zjs: a note for the reader:
zshcompsys(1) in the section about optspecs in _arguments says:
> Each of the forms above may be preceded by a list in parentheses of option names and argument num‐
> bers. If the given option is on the command line, the options and arguments indicated in parentheses
> will not be offered. For example, ‘(-two -three 1)-one:...' completes the option ‘-one'; if this ap‐
> pears on the command line, the options -two and -three and the first ordinary argument will not be
> completed after it. ‘(-foo):...' specifies an ordinary argument completion; -foo will not be com‐
> pleted if that argument is already present.
>
> Other items may appear in the list of excluded options to indicate various other items that should
> not be applied when the current specification is matched: a single star (\*) for the rest arguments
> (i.e. a specification of the form ‘\*:...'); a colon (:) for all normal (non-option-) arguments; and a
> hyphen (-) for all options. For example, if ‘(\*)' appears before an option and the option appears on
> the command line, the list of remaining arguments (those shown in the above table beginning with
> ‘\*:') will not be completed.
The intended effect of the change is to remove irrelevant completion matches from the completion.
tl;dr: (- : ) prevents further completion
]]]
Frantisek Sumsal [Wed, 10 Apr 2024 15:21:42 +0000 (17:21 +0200)]
docs: don't suffix page permalink with a slash
As it breaks relative links to other pages. For example, the
BOOT_LOADER_INTERFACE page has a relative link to
AUTOMATIC_BOOT_ASSESSMENT. With a slash in the page's permalink, that
link leads to:
http://127.0.0.1:4000/BOOT_LOADER_INTERFACE/AUTOMATIC_BOOT_ASSESSMENT
which is incorrect. Dropping the trailing slash makes the link link to
the correct place:
http://127.0.0.1:4000/AUTOMATIC_BOOT_ASSESSMENT
Resolves: #32088
Sam Leonard [Fri, 12 Apr 2024 09:12:15 +0000 (10:12 +0100)]
man: fix incorrect XML in man page
Daan De Meyer [Sun, 14 Apr 2024 17:53:09 +0000 (19:53 +0200)]
mkosi: Update to latest
Ivan Kruglov [Wed, 10 Apr 2024 11:19:39 +0000 (13:19 +0200)]
ASSERT_STREQ for simple cases
Yu Watanabe [Mon, 15 Apr 2024 05:43:12 +0000 (14:43 +0900)]
Merge pull request #32266 from yuwata/libsystemd-network-trivial-cleanups
libsystemd-network: trivial cleanups
Yu Watanabe [Sun, 14 Apr 2024 06:14:46 +0000 (15:14 +0900)]
ndisc-option: add missing case
Follow-up for
9f3587ae44ec9b437bd124eb9abbd593af45a796.
Yu Watanabe [Mon, 15 Apr 2024 05:39:28 +0000 (14:39 +0900)]
Merge pull request #32263 from YHNdnzj/cg-read-pid
core/execute: also check cg_is_threaded for clone3()
Kristian Klausen [Sun, 14 Apr 2024 13:17:32 +0000 (15:17 +0200)]
github: add systemd-vmspawn to the issue templates
Yu Watanabe [Mon, 15 Apr 2024 05:35:04 +0000 (14:35 +0900)]
Merge pull request #32271 from YHNdnzj/arch-man
Fixes for links to man projects
Kristian Klausen [Sun, 14 Apr 2024 14:41:08 +0000 (16:41 +0200)]
vmspawn: Fix incorrect/broken links in the man page
Yu Watanabe [Sun, 14 Apr 2024 05:46:48 +0000 (14:46 +0900)]
sd-ndisc: make ndisc_send() and icmp6_send() take struct in6_addr
No functional change, just refactoring.
Yu Watanabe [Sun, 14 Apr 2024 05:42:58 +0000 (14:42 +0900)]
libsystemd-network: make constant addresses type-safe
No functional change, just refactoring.
Yu Watanabe [Sun, 14 Apr 2024 05:41:42 +0000 (14:41 +0900)]
dhcp6-network: constify arguments
No functional change, just refactoring.
Yu Watanabe [Sun, 14 Apr 2024 19:34:56 +0000 (04:34 +0900)]
Merge pull request #32272 from DaanDeMeyer/volatile
mkosi: various improvements
Daan De Meyer [Thu, 11 Apr 2024 17:44:10 +0000 (19:44 +0200)]
mkosi: Remove outdated comment
Daan De Meyer [Thu, 11 Apr 2024 17:40:16 +0000 (19:40 +0200)]
mkosi: Don't log debug logs to console
We have various tools that log directly to the console, as well as
pid1 which logs directly to the console when running in a container.
Let's make sure that we don't log debug messages to the console by
default, but keep the behavior when running in CI.
Daan De Meyer [Sun, 14 Apr 2024 17:15:43 +0000 (19:15 +0200)]
mkosi: Use new volatile package settings
mkosi just learned to do natively what we currently do with environment
variables and a postinst script, so let's update to the latest version
and start using the new settings instead.
Daan De Meyer [Sun, 14 Apr 2024 17:53:09 +0000 (19:53 +0200)]
mkosi: Update to latest
Mike Yuan [Sun, 14 Apr 2024 15:46:31 +0000 (23:46 +0800)]
man/sd-journal: correct project name for man7
Follow-up for
5aa818039230a08e0af1c6351de4794de8ebb778
Mike Yuan [Sun, 14 Apr 2024 15:41:34 +0000 (23:41 +0800)]
man: switch wireguard man project to man7
Mike Yuan [Sun, 14 Apr 2024 15:38:38 +0000 (23:38 +0800)]
man/custom-html: update link to Arch manual
Mike Yuan [Sat, 13 Apr 2024 14:42:22 +0000 (22:42 +0800)]
core/execute: also check cg_is_threaded for clone3()
Prompted by #32259
We already have this check in exec_invoke(), i.e. child.
But if CLONE_INTO_CGROUP is used, the failure would
occur on parent's side, so do the check there too.
Mike Yuan [Sat, 13 Apr 2024 12:30:16 +0000 (20:30 +0800)]
core/dbus-manager: rephrase the comment for method_get_unit_processes a bit
Mike Yuan [Sun, 14 Apr 2024 15:21:13 +0000 (23:21 +0800)]
core/dbus-manager: add missing assertion
Mike Yuan [Sat, 13 Apr 2024 11:56:06 +0000 (19:56 +0800)]
cgroup-setup: modernize cg_migrate
Mike Yuan [Sun, 14 Apr 2024 15:20:31 +0000 (23:20 +0800)]
core/unit: use IN_SET at one more place
Yu Watanabe [Sun, 14 Apr 2024 04:40:06 +0000 (13:40 +0900)]
Merge pull request #32194 from henryli001/lihl/add-defaultUseDomains-config
network: add mechanism to configure default UseDomains= setting
Henry Li [Wed, 10 Apr 2024 00:40:42 +0000 (17:40 -0700)]
network: add mechanism to configure default UseDomains= setting, update man page and add test
Ole Peder Brandtzæg [Sat, 13 Apr 2024 12:33:28 +0000 (14:33 +0200)]
man: remove PrivateMounts= from list of other settings in its own description
The diff looks bigger, but that's only because it seemed fitting to
reformat the paragraph now that the list is shorter.
Yu Watanabe [Sat, 13 Apr 2024 00:02:01 +0000 (09:02 +0900)]
test-network: add test for stack overflow in qdisc_drop() and tclass_drop()
Yu Watanabe [Fri, 12 Apr 2024 23:46:44 +0000 (08:46 +0900)]
network/tc: fix stack overflow when dropping tclass or qdisc
Fixes a bug introduced by
be8e93390003e45acbb318c6e1e48fbc3c772f78 (v255).
Fixes #32247.
Fixes #32254.
Yu Watanabe [Fri, 12 Apr 2024 23:02:18 +0000 (08:02 +0900)]
Merge pull request #32257 from yuwata/tree-wide-trivial-style-fixes
tree-wide: trivial style and typo fixes
Sam Leonard [Thu, 11 Apr 2024 11:26:10 +0000 (12:26 +0100)]
vmspawn: check firmware target architecture
Fixes issue #32026 by only finding firmwares which explicitly support
the native architecture.
Yu Watanabe [Fri, 12 Apr 2024 20:44:04 +0000 (05:44 +0900)]
tree-wide: insert missing space after comma
Yu Watanabe [Fri, 12 Apr 2024 20:43:37 +0000 (05:43 +0900)]
journal: drop thousands separator in comment
Yu Watanabe [Fri, 12 Apr 2024 20:42:21 +0000 (05:42 +0900)]
home: wrap long line
Yu Watanabe [Fri, 12 Apr 2024 20:41:46 +0000 (05:41 +0900)]
homectl: realign table
Yu Watanabe [Fri, 12 Apr 2024 20:21:38 +0000 (05:21 +0900)]
Yu Watanabe [Fri, 12 Apr 2024 20:20:02 +0000 (05:20 +0900)]
Evgeny Vereshchagin [Fri, 12 Apr 2024 08:59:26 +0000 (08:59 +0000)]
fuzz: check that resource records are serialized successfully
It shouldn't fail at that point.
It's prompted by the "Structure needs cleaning" thing that keeps popping
up in various places like
https://github.com/systemd/systemd/pull/30952#discussion_r1553181309 and
https://github.com/systemd/systemd/issues/31708.
Yu Watanabe [Fri, 12 Apr 2024 20:10:20 +0000 (05:10 +0900)]
Merge pull request #32255 from YHNdnzj/strextendf
shared/killall: minor modernization
Yu Watanabe [Fri, 12 Apr 2024 20:09:36 +0000 (05:09 +0900)]
Merge pull request #32256 from YHNdnzj/network-close-and-replace
sd-dhcp-server: use close_and_replace (avoid fd leak)
Mike Yuan [Fri, 12 Apr 2024 18:40:22 +0000 (02:40 +0800)]
sd-dhcp-server: use close_and_replace (avoid fd leak)
Follow-up for
11b88419ae0004547a0724aa459ddcb5d243f25c
Fixes #32252
Mike Yuan [Fri, 12 Apr 2024 18:47:42 +0000 (02:47 +0800)]
sd-dhcp-server: check dir_fd with assert_return
Mike Yuan [Thu, 11 Apr 2024 13:50:20 +0000 (21:50 +0800)]
shared/killall: minor modernization
Mike Yuan [Fri, 12 Apr 2024 18:33:50 +0000 (02:33 +0800)]
string-util: correct comment in strextendf_with_separator
Sam Leonard [Thu, 11 Apr 2024 11:48:00 +0000 (12:48 +0100)]
vmspawn: add --discard-disk= to control handling of disk discard requests
Fixes issue #32024, using --discard-disk=yes will enable handling of disk
discarding requests, saving space for long running VMs as desired.
Frantisek Sumsal [Fri, 12 Apr 2024 12:37:25 +0000 (14:37 +0200)]
test: add instructions on how to run Coverity locally
This requires a Coverity license, so the usefulness of the instructions
is somewhat limited, but at least I won't have to re-discover everything
from scratch when I need to debug something Coverity-related again in the
future.
Sam Leonard [Fri, 12 Apr 2024 07:36:55 +0000 (08:36 +0100)]
vmspawn: update parse_boolean to parse_boolean_argument
Antonio Alvarez Feijoo [Fri, 12 Apr 2024 08:53:40 +0000 (10:53 +0200)]
bus-polkit: fix return value for `varlink_allow_interactive_authentication()`
Follow-up for
d04c1a1c8e7c95daa483d8d52d5fc4c25fbc67f2
Zbigniew Jędrzejewski-Szmek [Sun, 7 Apr 2024 08:39:20 +0000 (10:39 +0200)]
meson: do not fail build with newer kernel headers
systemd-255 is failing a build with the latest kernel headers… Let's downgrade
this warning, because it's fine if there's a file system we don't know about
and it makes thing less brittle if we don't treat this as a hard error.
(I initially conditionalized this on BUILD_MODE, but I don't think we need a
hard error there either. A warning will be noticed and fixed.)
Yu Watanabe [Thu, 11 Apr 2024 18:30:01 +0000 (03:30 +0900)]
ndisc-option: also ignore Prefix Information option with multicast address
Fixes https://github.com/systemd/systemd/pull/32215#issuecomment-
2049624693
Daan De Meyer [Fri, 12 Apr 2024 06:46:34 +0000 (08:46 +0200)]
Merge pull request #32240 from yuwata/network-ndisc-fix-on-link-prefix
network/ndisc: fixlets for on-link prefix
Yu Watanabe [Thu, 11 Apr 2024 19:38:42 +0000 (04:38 +0900)]
network/ndisc: drop onlink prefix when valid lifetime is zero
Replaces
155d7a2c049cf866a0bfde8de371f09dfb3b6f29.
Yu Watanabe [Thu, 11 Apr 2024 19:24:57 +0000 (04:24 +0900)]
network/ndisc: do nothing for existing routes if on-link flag is zero
This effectively reverts commit
155d7a2c049cf866a0bfde8de371f09dfb3b6f29.
From RFC 4861 section 6.3.4:
> Note, however, that a Prefix Information option with the on-link flag
> set to zero conveys no information concerning on-link determination and
> MUST NOT be interpreted to mean that addresses covered by the prefix
> are off-link.
So, we should not drop previously configured routes when receieved a RA
with Prefix Information option without on-link flag.
Closes #28435.
Ronan Pigott [Thu, 11 Apr 2024 18:52:57 +0000 (11:52 -0700)]
resolved: use NULL to represent an empty answer
Sam Leonard [Thu, 11 Apr 2024 11:54:42 +0000 (12:54 +0100)]
vmspawn: enabled free page reporting in qemu by default
Fixes issue #32025, I saw no reason not to enable this by default so I
added it to the initial qemu cmdline.
Yu Watanabe [Thu, 11 Apr 2024 21:09:44 +0000 (06:09 +0900)]
Merge pull request #32213 from yuwata/network-ndisc-redirect-fix-sender-address-verification
network/ndisc: fix sender address verification of Redirect message
Ludwig Nussel [Mon, 8 Apr 2024 09:07:10 +0000 (11:07 +0200)]
nsresourced: don't redefine of bpf_rdonly_cast
bpf_rdonly_cast() was introduced in libbpf commit
688879f together with
the definition of a bpf_core_cast macro. So use that one to avoid
defining a prototype for bpf_rdonly_cast;
Yu Watanabe [Wed, 10 Apr 2024 06:36:59 +0000 (15:36 +0900)]
sd-ndisc-redirect: fix verification of target address
See RFC 4861 section 8.1.
Yu Watanabe [Wed, 10 Apr 2024 06:07:30 +0000 (15:07 +0900)]
network/ndisc: fix verification of sender of Redirect message
The sender must be the first-hop router of the destination. Previously,
we only accepted Redirect messages whose sender is the current default
router with the highest priority.
See RFC 4861 section 8.1 for more details.
Fixes #31981.
Yu Watanabe [Wed, 10 Apr 2024 05:52:57 +0000 (14:52 +0900)]
network/ndisc: split out ndisc_redirect_verify_sender()
No functional change, preparation for later commits.
Yu Watanabe [Wed, 10 Apr 2024 06:04:11 +0000 (15:04 +0900)]
network/ndisc: drop ndisc_request_redirect_route()
It is now called by only ndisc_redirect_handler(), and the check in
ndisc_request_redirect_route() is redundant and already done by
ndisc_redirect_verify_sender().
No functional change, just refactoring.
Yu Watanabe [Wed, 10 Apr 2024 05:58:31 +0000 (14:58 +0900)]
network/ndisc: redirect routes do not have lifetime
Hence, ndisc_router_update_redirect() does nothing. Let's remove it.
Also, ndisc_request_route() does not set lifetime for the route, it is
not necessary to set the third argument.
Yu Watanabe [Thu, 11 Apr 2024 01:16:39 +0000 (10:16 +0900)]
network/ndisc: introduce ndisc_request_router_route()
Then, make ndisc_request_route() generic and usable for configuring
routes based on both Router Advertisement and Redirect messages.
Note, ndisc_request_router() never set lifetime, so the dropped comment
in ndisc_request_redirect_route() is wrong.
No functional change, just refactoring.
Yu Watanabe [Thu, 11 Apr 2024 03:05:07 +0000 (12:05 +0900)]
network/ndisc: do not set per-route MTU and hop limit
Setting MTU announced in RA message to routes is problematic, as the
value may be larger than the device MTU (IFLA_MTU), and in such case the
route cannot be used.
These two properties are now set per-interface, and gracefully handled
such invalid cases. Hence not necessary to set them to each route.
Follow-up for #32195.
Antonio Alvarez Feijoo [Thu, 11 Apr 2024 15:20:02 +0000 (17:20 +0200)]
journal-remote: fix two minor memory leaks
Frantisek Sumsal [Thu, 11 Apr 2024 18:35:27 +0000 (20:35 +0200)]
Merge pull request #32228 from mrc0mmand/more-test-tweaks
A couple of follow-ups for #32189
Frantisek Sumsal [Thu, 11 Apr 2024 12:24:42 +0000 (14:24 +0200)]
test: make sd-journal-gatewayd tests even more debug-able
Unfortunately
bfd30e8af6 is not enough and the test fails, that still
occasionally occur, don't provide enough information to see what's
wrong. Let's rework the test a little to improve this, namely:
- redirect curl's output into a temporary file instead of piping it
directly into the "check" expression; that way we can simply dump
the temporary file when the test fails, providing potentially
crucial information. We don't want to always dump everything to
stdout, as some of the tests request an entire system journal (note
that shell redirection instead of `curl -o file` is used
intentionally, so the output file is always nuked first)
- by dropping the pipes in curl commands we can re-enable pipefail
- also, split some very long commands to multiple lines to (slightly)
improve readability
Follow-up for
bfd30e8af64a0d39ad110258dca69be919f6df34.
Luca Boccassi [Thu, 11 Apr 2024 11:16:31 +0000 (12:16 +0100)]
Merge pull request #32215 from yuwata/network-ndisc-address-lifetime
network/ndisc: fix assignment of valid lifetime
Ludwig Nussel [Thu, 4 Apr 2024 15:05:18 +0000 (17:05 +0200)]
creds: allow null when decrypting
pcrlock writes a credential file using null key. Make sure systemd-creds
can show the file