Yu Watanabe [Tue, 2 Jan 2024 19:34:47 +0000 (04:34 +0900)]
udev: introduce ID_PROCESSING=1 boolean property
This indicates that the device is being processed by udevd.
Yu Watanabe [Sun, 11 Feb 2024 16:07:11 +0000 (01:07 +0900)]
Merge pull request #30260 from yuwata/sd-journal-cleanups
sd-journal: further cleanups
Frantisek Sumsal [Sun, 11 Feb 2024 14:55:14 +0000 (15:55 +0100)]
Revert "packit: temporarily build systemd without BPF stuff"
The latest Rawhide compose (
20240210.n.1) finished successfully and made
it to the mirrors, so let's drop the bpftool workaround.
This reverts commit
8a0ec8852ccc5674420ae72483dc4f5b2a4fb752.
Daan De Meyer [Mon, 25 Dec 2023 22:11:22 +0000 (23:11 +0100)]
repart: Add --generate-fstab= and --generate-crypttab= options
These can be used along with two new settings MountPoint= and
EncryptedVolume= to write fstab and crypttab entries to the given
paths respectively in the root directory that repart is operating on.
This is useful to cover scenarios that aren't covered by the
Discoverable Partitions Spec. For example when one wants to mount
/home as a separate btrfs subvolume. Because multiple btrfs subvolumes
can be mounted from the same partition, we allow specifying MountPoint=
multiple times to add multiple entries for the same partition.
Luca Boccassi [Sat, 10 Feb 2024 11:37:53 +0000 (11:37 +0000)]
Merge pull request #31273 from mrc0mmand/test-55-arch-gcc
test: make the MemoryHigh= limit a bit more generous with sanitizers
Luca Boccassi [Fri, 9 Feb 2024 21:28:59 +0000 (21:28 +0000)]
Merge pull request #31261 from bluca/repart_engine
repart: support engines and providers
Frantisek Sumsal [Fri, 9 Feb 2024 17:53:19 +0000 (18:53 +0100)]
test: clean up the code a bit
Frantisek Sumsal [Fri, 9 Feb 2024 17:44:58 +0000 (18:44 +0100)]
test: make the MemoryHigh= limit a bit more generous with sanitizers
When we're running with sanitizers, sd-executor might pull in a
significant chunk of shared libraries on startup, that can cause a lot
of memory pressure and put us in the front when sd-oomd decides to go on
a killing spree. This is exacerbated further on Arch Linux when built
with gcc, as Arch ships unstripped gcc-libs so sd-executor pulls in over
30M of additional shared libs on startup:
~# lddtree build-san/systemd-executor
build-san/systemd-executor (interpreter => /lib64/ld-linux-x86-64.so.2)
libasan.so.8 => /usr/lib/libasan.so.8
libstdc++.so.6 => /usr/lib/libstdc++.so.6
libm.so.6 => /usr/lib/libm.so.6
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1
libsystemd-core-255.so => /root/systemd/build-san/src/core/libsystemd-core-255.so
libaudit.so.1 => /usr/lib/libaudit.so.1
libcap-ng.so.0 => /usr/lib/libcap-ng.so.0
...
libseccomp.so.2 => /usr/lib/libseccomp.so.2
libubsan.so.1 => /usr/lib/libubsan.so.1
libc.so.6 => /usr/lib/libc.so.6
~# ls -Llh /usr/lib/libasan.so.8 /usr/lib/libstdc++.so.6 /usr/lib/libubsan.so.1
-rwxr-xr-x 1 root root 9.7M Feb 2 10:36 /usr/lib/libasan.so.8
-rwxr-xr-x 1 root root 21M Feb 2 10:36 /usr/lib/libstdc++.so.6
-rwxr-xr-x 1 root root 3.2M Feb 2 10:36 /usr/lib/libubsan.so.1
Sanitized libsystemd-core.so is also quite big:
~# ls -Llh /root/systemd/build-san/src/core/libsystemd-core-255.so /usr/lib/systemd/libsystemd-core-255.so
-rwxr-xr-x 1 root root 26M Feb 8 19:04 /root/systemd/build-san/src/core/libsystemd-core-255.so
-rwxr-xr-x 1 root root 5.9M Feb 7 12:03 /usr/lib/systemd/libsystemd-core-255.so
Daan De Meyer [Fri, 9 Feb 2024 17:39:54 +0000 (18:39 +0100)]
Merge pull request #29960 from CodethinkLabs/vmspawn/mkosi-features
vmspawn: add features required by mkosi
Lennart Poettering [Fri, 9 Feb 2024 17:04:09 +0000 (18:04 +0100)]
Merge pull request #31269 from poettering/vconsole-enodev
vconsole/pid1: handle ENODEV on /dev/console somewhat graceful
Luca Boccassi [Fri, 9 Feb 2024 16:34:52 +0000 (16:34 +0000)]
Merge pull request #31268 from poettering/bpf-device-fixes
bpf-devices: various smaller fixes
Yu Watanabe [Fri, 9 Feb 2024 15:34:02 +0000 (00:34 +0900)]
Yu Watanabe [Tue, 2 Jan 2024 19:30:32 +0000 (04:30 +0900)]
test: add tests for journal_file_next_entry()
Yu Watanabe [Tue, 2 Jan 2024 19:30:29 +0000 (04:30 +0900)]
sd-journal: do not read unnecessary object
In journal_file_next_entry(), if the passed offset matches an entry object,
then generic_array_bisect() returns the object, but the object we
requested is the next (or previous) object. Hence, we should not validate
the object returned by generic_array_bisect(), otherwise it may fail
when the journal is corrupted.
Note the validity of the entry object that should be returned by
journal_file_next_entry() will be checked in the following generic_array_get().
So, when journal_file_next_entry() succeeds, the returned object is
always validated.
dependabot[bot] [Fri, 9 Feb 2024 11:46:22 +0000 (11:46 +0000)]
build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from
dbce89aabda438ba58080366631b2c242e365f21 to
070528fec478fc93af7ec057a5d2fd0045123c99.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/
dbce89aabda438ba58080366631b2c242e365f21...
070528fec478fc93af7ec057a5d2fd0045123c99)
---
updated-dependencies:
- dependency-name: systemd/mkosi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Yu Watanabe [Tue, 2 Jan 2024 19:30:24 +0000 (04:30 +0900)]
sd-journal: always put verified object into the chain cache
Let's consider the case that
- the first array contains valid entries,
- all entries in the second array are corrupted.
Then, when we are going to upwards, and a call of generic_array_bisect()
matches the last entry of the first array, then the second array was
cached with last_index == UINT64_MAX, instead of the first array with
its last entry.
Hence, when generic_array_bisect() is called next time, the function call
of test() always fail. So, the cache entry is mostly meaningless.
Let's always store valid cache entry.
Yu Watanabe [Tue, 2 Jan 2024 19:30:18 +0000 (04:30 +0900)]
sd-journal: drop duplicated tests in generic_array_bisect()
When left == right (== 0), generic_array_bisec_step() does not update
left and right. So the following test is exactly the same.
Luca Boccassi [Wed, 11 Oct 2023 18:23:40 +0000 (19:23 +0100)]
repart: support OpenSSL engines/providers for signing
The provider API which is new requires providers, which are not
widely available and don't work very well yet, so also use a
fallback with the legacy engine API.
Luca Boccassi [Thu, 12 Oct 2023 09:22:20 +0000 (10:22 +0100)]
openssl: add helper to load key from provider/engine
It's not the literal private key, but EVP_PKEY becomes a reference
to the engine/provider that OpenSSL knows how to use later
Lennart Poettering [Fri, 9 Feb 2024 11:28:10 +0000 (12:28 +0100)]
bpf-devices: if a device node is referenced which doesn't exist, downgrade log message
Currently in many of our test cases you'll see a warning about a tun
device not being around. Let's make that quiet, since if there's no such
device there's no point in adding it to a policy anyway, and it makes
useless noise go away.
We keep the warning as a warning if a device node is missing for other
errors than ENOENT.
Lennart Poettering [Fri, 9 Feb 2024 11:26:50 +0000 (12:26 +0100)]
bpf-devices: normalize the return handling of functions that put together policy
under some conditions we suppress generating BPF programs. Let's
systematically return 0 when we do this, and 1 if we did actually
soething, instead of second guessing this in the caller.
This is not only more correct, but allows us to suppress BPF programs in
more cases in later commits.
Lennart Poettering [Fri, 9 Feb 2024 11:21:26 +0000 (12:21 +0100)]
bpf-devices: normalize how we pass around major/minor values
There's some unclarity whether major/minor of device nodes are supposed
to be "unsigned" or "dev_t". Various codebases assume the latter, but
glibc's major()/minor() types actually return a value typed to
"unsigned". On glibc dev_t is actually 64bit even if the kernel only
exposes 32bit. Hence this distinction kinda matters.
Let's clean things up a bit with handling: let's followe glibc's type
system here, and use unsigned (and not int).
Also let's pass invalid major/minor values around as UINT_MAX rather
than via pointers, to match how we usually do this, and to shorten our
code a bit. This is safe, since given the linux dev_t space being 32bit
only we can't possibly have a valid major or minor this hight, given
they must be smaller in size. While other archs disagree on the types of
major/minor, they also tend to have similar limits. In fact on FreeBSD
for example major()/minor() returns a signed int. Which would hence also
mean that UINT_MAX cannot be a valid major or minor.
Luca Boccassi [Fri, 9 Feb 2024 14:29:50 +0000 (14:29 +0000)]
Merge pull request #31243 from YHNdnzj/systemctl-disable-now-template
systemctl: support disable/mask --now with unit template
Luca Boccassi [Fri, 9 Feb 2024 13:48:13 +0000 (13:48 +0000)]
Merge pull request #31224 from mrc0mmand/packit-bpftool-workaround
packit: temporarily build systemd without BPF stuff
Luca Boccassi [Fri, 9 Feb 2024 13:46:28 +0000 (13:46 +0000)]
Merge pull request #31264 from poettering/sysext-help
sysext: tweaks to the systemd-sysext/systemd-confext --help text
Lennart Poettering [Fri, 9 Feb 2024 11:55:27 +0000 (12:55 +0100)]
pid1,vconsole-setup: gracefully handle if /dev/vconsole is not accessible due to ENODEV
I think this is generally the right thing to do and is just an extension
of the existing ENOENT check.
Prompted by: #31257
Lennart Poettering [Fri, 9 Feb 2024 11:54:03 +0000 (12:54 +0100)]
dev-setup: normalize logging around lock_dev_console()
Previously this function would log loudly in some cases but not in
others. Clean this up, and dont log at all, matching our coding style
which says we should either log in all error cases or in none.
Both callers of this function do logging already, hence no need to
duplicate it here.
Sam Leonard [Thu, 18 Jan 2024 12:32:10 +0000 (12:32 +0000)]
vmspawn: accept kvm/vhost-vsock device fds through sd_listen
Sam Leonard [Fri, 10 Nov 2023 17:32:25 +0000 (17:32 +0000)]
vmspawn: add nic configuration
Sam Leonard [Fri, 8 Dec 2023 13:32:34 +0000 (13:32 +0000)]
vmspawn: add initrd configuration option
Daan De Meyer [Fri, 9 Feb 2024 11:43:43 +0000 (12:43 +0100)]
Install pacman in Arch Linux image
We install apt and dnf in the other images as well, so lets be
consistent and install pacman in the Arch image as well.
Frantisek Sumsal [Fri, 9 Feb 2024 11:40:29 +0000 (12:40 +0100)]
test: adjust test-path to fail gracefully with the new pidfd_spawn stuff
Since
2e106312e2 the test unit fails with 'resources' result instead of
'exit-code', which the test didn't account for when running unprivileged.
Before
2e106312e2:
$ /root/systemd/build/test-path
Failed to start transient scope unit: Interactive authentication required.
Couldn't allocate a scope unit for this test, proceeding without.
...
-.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied
app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied
-.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied
app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied
...
line 151: path-exists.path: state = running; result = success (left:
29986250)
line 151: path-exists.service: state = start; result = success
path-exists.service: Main process exited, code=exited, status=219/CGROUP
path-exists.service: Failed with result 'exit-code'.
line 151: path-exists.path: state = running; result = success (left:
29985948)
line 151: path-exists.service: state = failed; result = exit-code
Failed to start service path-exists.service, aborting test: failed/exit-code
After
2e106312e2:
$ /root/systemd/build/test-path
Failed to start transient scope unit: Interactive authentication required.
Couldn't allocate a scope unit for this test, proceeding without.
...
-.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied
app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied
-.slice: Failed to enable/disable controllers on cgroup /user.slice/user-1000.slice/session-1.scope, ignoring: Permission denied
app.slice: Failed to create cgroup /user.slice/user-1000.slice/session-1.scope/app.slice: Permission denied
path-exists.service: Failed to spawn executor: No such file or directory
path-exists.service: Failed to spawn 'start' task: No such file or directory
path-exists.service: Failed with result 'resources'.
Frantisek Sumsal [Tue, 6 Feb 2024 16:48:34 +0000 (17:48 +0100)]
packit: temporarily build systemd without BPF stuff
The kernel-tools meta-package was retired in Rawhide, but its
replacement has not landed, yet. Until that happens, let's build without
the bpf-framework stuff.
Sam Leonard [Wed, 20 Dec 2023 09:03:01 +0000 (09:03 +0000)]
vmspawn: synthesise root= argument for direct kernel boot
Sam Leonard [Fri, 10 Nov 2023 11:56:49 +0000 (11:56 +0000)]
vmspawn: add kernel configuration options
Sam Leonard [Tue, 7 Nov 2023 14:04:11 +0000 (14:04 +0000)]
vmspawn: add swtpm feature
Sam Leonard [Tue, 23 Jan 2024 13:39:32 +0000 (13:39 +0000)]
path-lookup: add runtime_directory for resolving $RUNTIME_DIRECTORY
Daan De Meyer [Thu, 8 Feb 2024 09:54:54 +0000 (10:54 +0100)]
Add systemd.default_debug_tty=
Let's allow configuring the debug tty independently of enabling/disabling
the debug shell. This allows mkosi to configure the correct tty while
leaving enabling/disabling the debug tty to the user.
Frantisek Sumsal [Fri, 9 Feb 2024 09:30:08 +0000 (10:30 +0100)]
semaphore: temporarily pin autopkgtest to v5.32
The latest commit (ATTOW) [0] calls adduser with --logmsglevel, which is
not a valid flag for adduser on Ubuntu Focal/Jammy.
[0] https://salsa.debian.org/ci-team/autopkgtest/-/commit/
9c033b3db453acaa103bae03a4a5dcebe3858089
Yu Watanabe [Fri, 9 Feb 2024 10:03:19 +0000 (19:03 +0900)]
man: add missing "=" after setting name
Follow-up for
b93bf1bf9fb8f091c52588c5fc9edef6225f4ed3.
Frantisek Sumsal [Fri, 9 Feb 2024 09:39:23 +0000 (10:39 +0100)]
Merge pull request #31230 from mrc0mmand/test-seccomp
process-util: use only the least significant byte from personality()
Yu Watanabe [Fri, 9 Feb 2024 09:08:58 +0000 (18:08 +0900)]
README: update link to CentOS CI
Yu Watanabe [Fri, 9 Feb 2024 08:49:44 +0000 (17:49 +0900)]
Lennart Poettering [Fri, 9 Feb 2024 08:40:11 +0000 (09:40 +0100)]
sysext: output an appropriate blurb for the mode we are executed in
Lennart Poettering [Fri, 9 Feb 2024 08:37:23 +0000 (09:37 +0100)]
sysext: point to the right man page for the mode we are invoked in
Lennart Poettering [Fri, 9 Feb 2024 08:32:53 +0000 (09:32 +0100)]
sysext: rename "directory_name" field to "full_identifier"
So the field contains simply the full name of the command being invoked,
hence rename the field to match the contents, and to mirror the
"short_identifier" field.
Interestingly, the field is apparently not actually used by anything
though! But we are not going to remove it, since a follow-up commit will
start making use of it.
Lennart Poettering [Fri, 9 Feb 2024 08:32:00 +0000 (09:32 +0100)]
sysext: fix --help indenting/line breaking
Let's make sure there's an empty line after the explanatory text like we
usually do it, and do not indent the 2nd line more than the 1st
Yu Watanabe [Fri, 9 Feb 2024 08:32:29 +0000 (17:32 +0900)]
Merge pull request #31172 from yuwata/network-bond-port
network: do not bring down bonding port on reconfigure
Yu Watanabe [Fri, 9 Feb 2024 08:32:07 +0000 (17:32 +0900)]
Merge pull request #31247 from yuwata/network-make-reload-bus-method-synchronous
network: make Reload bus method synchronous
Mike Yuan [Wed, 7 Feb 2024 22:42:10 +0000 (06:42 +0800)]
systemctl: allow --now only if not install_client_side()
Mike Yuan [Wed, 7 Feb 2024 14:15:05 +0000 (22:15 +0800)]
systemctl: support disable/mask --now with unit template
Closes #15620
Replaces #28240
Mike Yuan [Thu, 8 Feb 2024 10:31:37 +0000 (18:31 +0800)]
basic/unit-name: introduce unit_name_replace_instance_full
that optionally accepts a globbed instance
Mike Yuan [Wed, 7 Feb 2024 15:33:07 +0000 (23:33 +0800)]
systemctl-util: some modernizations
Mike Yuan [Wed, 7 Feb 2024 13:55:19 +0000 (21:55 +0800)]
basic/unit-name: include param name in function prototype
Yu Watanabe [Thu, 8 Feb 2024 03:55:07 +0000 (12:55 +0900)]
test: drop unnecessary sleep
Now, 'Reload' dbus method is synchronous. It is not necessary to wait
for link enter configuring state.
Yu Watanabe [Thu, 8 Feb 2024 03:47:39 +0000 (12:47 +0900)]
network: make Reload bus method synchronous
Prompted by https://github.com/systemd/systemd/pull/30085#discussion_r1401534107.
Note, like Reconfigure bus method, even reconfiguration for an interface is
triggered by Reload method, the method only wait for the link enters
configuring state (or unmanaged state if no matching .network file exists).
Users still need to invoke systemd-networkd-wait-online if it is
necessary to wait for the interface enters configured state after Reload
medhod.
Yu Watanabe [Fri, 2 Feb 2024 02:20:25 +0000 (11:20 +0900)]
test-network: add test case for issue #31165
Yu Watanabe [Fri, 2 Feb 2024 02:10:45 +0000 (11:10 +0900)]
network: do not bring down a bonding port interface when it is already joined
Follow-up for
9f913d37a01f71e559d099bff280827f8817d8c5.
Fixes #31165.
Yu Watanabe [Fri, 9 Feb 2024 05:12:09 +0000 (14:12 +0900)]
Yu Watanabe [Fri, 9 Feb 2024 05:03:32 +0000 (14:03 +0900)]
Merge pull request #31177 from yuwata/network-ndisc-on-link-zero
network/ndisc: drop onlink prefix route when on-link flag is zero
mille-feuille [Thu, 8 Feb 2024 14:47:24 +0000 (23:47 +0900)]
detect-virt: fix Google Compute Engine support
Follow-up for
9b0688f491674b53ef7a52bdf561a430c53673d6
Zbigniew Jędrzejewski-Szmek [Wed, 7 Feb 2024 11:43:53 +0000 (12:43 +0100)]
preset: enable homed sidecar services
As described in https://github.com/systemd/systemd/issues/31235, the preset
state for systemd-homed-activate.service was unclear. On the one hand, we have
a preset with 'enable systemd-homed.service', and systemd-homed.service has
'Also=systemd-homed-activate.service systemd-homed-firstboot.service', so
'preset systemd-homed.service' would also enable those two services, but
'preset systemd-homed-activate.service' would disable it, because the presets
don't say it is enabled. It seems that this configuration is internally
inconsistent. As described in the issue, maybe systemctl should be smarter
here, or warn about such configs. Either way, let's make our config consistent.
Follow-up for
d1f6e01e4743ae94740314eeb46a162112ef4599 and
3ccadbce3358ba1db7ce5fa3f8dd17c627ffd93b.
Luca Boccassi [Wed, 7 Feb 2024 00:36:39 +0000 (00:36 +0000)]
portable: add --copy=mixed to copy images and link profiles
This new mode copies resources provided by the client, so that they
remain available for inspect/detach even if the original images are
deleted, but symlinks the profile as that is owned by the OS, so that
updates are automatically applied.
Zbigniew Jędrzejewski-Szmek [Wed, 7 Feb 2024 12:47:38 +0000 (13:47 +0100)]
man: mention that preset-all is performed during early boot
The intro of systemd-firstboot is rewritten to make it clearer how it fits into
the big picture. Systemd does some machine-id and presets and
systemd-firstboot.service is used to interactively fill in the blanks.
Closes #22225.
Antonio Alvarez Feijoo [Thu, 8 Feb 2024 16:22:40 +0000 (17:22 +0100)]
creds: fix typo
Lennart Poettering [Thu, 8 Feb 2024 16:41:03 +0000 (17:41 +0100)]
Merge pull request #30766 from polarina/cryptenroll-tpm2-unlock
cryptenroll: Add support for unlocking through TPM2 enrollments
Sam Leonard [Tue, 30 Jan 2024 13:05:38 +0000 (13:05 +0000)]
nspawn: add missing OOM check on gethostname_malloc()
Sam Leonard [Thu, 25 Jan 2024 15:03:48 +0000 (15:03 +0000)]
vmspawn: remove extraneous log_info
Sam Leonard [Thu, 25 Jan 2024 14:50:24 +0000 (14:50 +0000)]
vmspawn: fix incorrect handling of -M in getopt_long
Sam Leonard [Thu, 25 Jan 2024 14:55:23 +0000 (14:55 +0000)]
vmspawn: fix incorrect mention of container
Yu Watanabe [Thu, 8 Feb 2024 06:59:48 +0000 (15:59 +0900)]
copy: do not ignore chattr_flags and friends passed to copy_file_atomic_full()
Fixes a bug introduced by
427d9c34e61a8f5bfe369f1d5a0426143fe5741e.
Yu Watanabe [Thu, 8 Feb 2024 13:05:55 +0000 (22:05 +0900)]
Merge pull request #31245 from yuwata/network-ndisc-adjust-log-messages
network/ndisc: slightly update log messages
Yu Watanabe [Fri, 2 Feb 2024 17:34:07 +0000 (02:34 +0900)]
wait-online: split out get_state_range()
Follow-up for
2d708781620239c9d1f9828a39f8761acf6350b2.
After the conversion from FOREACH_POINTER() to FOREACH_ARGUMENT(),
the iterator is never set to POINTER_MAX.
Sludge [Thu, 8 Feb 2024 01:18:35 +0000 (02:18 +0100)]
hwdb: add resolution setting for GAOMON S620
Yu Watanabe [Thu, 8 Feb 2024 02:37:17 +0000 (11:37 +0900)]
Yu Watanabe [Thu, 8 Feb 2024 02:36:05 +0000 (11:36 +0900)]
Yu Watanabe [Thu, 8 Feb 2024 02:33:59 +0000 (11:33 +0900)]
Yu Watanabe [Fri, 2 Feb 2024 07:08:23 +0000 (16:08 +0900)]
network/ndisc: drop onlink prefix route when on-link flag is zero
Fixes #28435.
Yu Watanabe [Wed, 7 Feb 2024 20:47:03 +0000 (05:47 +0900)]
network/ndisc: fix use-of-uninitialized-value on failure path
Fixes a bug in
f44eebd1bab9327c5dd3a281196bd07192134d3b.
Also slightly adjust log message.
Yu Watanabe [Thu, 8 Feb 2024 00:10:38 +0000 (09:10 +0900)]
Merge pull request #31171 from yuwata/sd-ndisc-invalid-dnssl
sd-ndisc: handle invalid DNSSL option gracefully
Yu Watanabe [Sun, 4 Feb 2024 07:37:33 +0000 (16:37 +0900)]
network/dhcp4: disable IPv6OnlyMode= by default
As explained in #30891, IPv6OnlyMode= should be enabled with 464XLAT
support, but we do not support it yet. Let's disable by default.
Fixes #30891.
Yu Watanabe [Fri, 2 Feb 2024 01:59:36 +0000 (10:59 +0900)]
test: add test case for invalid DNSSL option
Yu Watanabe [Wed, 7 Feb 2024 21:11:23 +0000 (06:11 +0900)]
network/ndisc: sd_ndisc_router_get_{icmp6_ratelimit,retransmission_time}() should never fail
This also fixes use of '%m' specifier without passign error code.
Yu Watanabe [Wed, 7 Feb 2024 21:04:09 +0000 (06:04 +0900)]
network/ndisc: slightly adjust log messages
Yu Watanabe [Fri, 2 Feb 2024 01:59:17 +0000 (10:59 +0900)]
test: add short comment for RA message
Yu Watanabe [Fri, 2 Feb 2024 01:23:56 +0000 (10:23 +0900)]
sd-ndisc: make sd_ndisc_router_dnssl_get_domains() return -EBADMSG when received invalid domain name
Fixes #31168.
Yu Watanabe [Wed, 7 Feb 2024 20:26:12 +0000 (05:26 +0900)]
Merge pull request #31176 from yuwata/network-required-for-online
network: adjust default value of RequiredForOnline=
Fernando Fernandez Mancera [Wed, 7 Feb 2024 10:07:38 +0000 (11:07 +0100)]
sd-dhcp6-client: allow setting send-release when client is running
The send-release option only affects to the client when STOPPING. There
is no reason to do not allow this option to be set while the client is
running.
An user might want to delay the decision of sending a RELEASE message to
a later stage where the client is already running.
Keian [Wed, 7 Feb 2024 20:14:09 +0000 (20:14 +0000)]
60-evdev.hwdb: Add support for Huion Inspiroy 2 L (#31241)
Also fixed a spelling mistake on the HUION Inspiroy H420X
Frantisek Sumsal [Wed, 7 Feb 2024 18:12:22 +0000 (19:12 +0100)]
process-util: unify the hex value format a bit
And fix the man page reference as well.
Frantisek Sumsal [Wed, 7 Feb 2024 18:07:07 +0000 (19:07 +0100)]
process-util: use only the least significant byte from personality()
The personality() syscall returns a 32-bit value where the top three
bytes are reserved for flags that emulate historical or architectural
quirks, and only the least significant byte reflects the actual
personality we're interested in (in opinionated_personality()).
Use the newly defined mask in the corresponding test as well, otherwise
the test fails on some more "exotic" architectures that set some of the
"quirk" flags:
~# uname -m
armv7l
~# build/test-seccomp
...
/* test_lock_personality */
current personality=0x0
safe_personality(PERSONALITY_INVALID)=0x800000
Assertion '(unsigned long) safe_personality(current) == current' failed at src/test/test-seccomp.c:970, function test_lock_personality(). Aborting.
lockpersonalityseccomp terminated by signal ABRT.
Assertion 'wait_for_terminate_and_check("lockpersonalityseccomp", pid, WAIT_LOG) == EXIT_SUCCESS' failed at src/test/test-seccomp.c:996, function test_lock_personality(). Aborting.
Aborted (core dumped)
See: personality(2) and comments in sys/personality.h
Yu Watanabe [Fri, 2 Feb 2024 04:08:35 +0000 (13:08 +0900)]
network: set 'removing' flag to remembered object
Previously, if address_remove() or friends called with a temporary
object, the removing flag is assigned to the temporary object, and is
not set to the remembered object. Hence, e.g.
route_is_ready_to_configure() wrongly judge a required address for a
route is (still) ready, hence networkd fails to configure the route.
Fixes #28009.
Yu Watanabe [Fri, 2 Feb 2024 04:17:18 +0000 (13:17 +0900)]
network/address: do not configure with IFA_F_TENTATIVE
Follow-up for
0a0c2672dbd22dc85d660e5baa7e1bef701beb88.
After the commit, remembered Address objects by Link are always given by
kernel. Hence, it is not necessary to set the flag, as it is always
ignored by the kernel, and the kernel set the flag on notification if it
is necessary.
Luca Boccassi [Wed, 7 Feb 2024 10:17:07 +0000 (10:17 +0000)]
Merge pull request #31202 from YHNdnzj/creds-reuse
core: reuse credential dir across start and start-post if populated
Franck Bui [Tue, 6 Feb 2024 13:46:53 +0000 (14:46 +0100)]
test: systemd-update-utmp is optional
It can be disabled with '-Dutmp=false'
Maanya Goenka [Tue, 6 Feb 2024 20:19:59 +0000 (12:19 -0800)]
preset: enable confext and sysext by default (#31211)
Zbigniew Jędrzejewski-Szmek [Thu, 25 Jan 2024 11:09:59 +0000 (12:09 +0100)]
NEWS: announce plan to drop support for nscd
This is in preparation for https://github.com/systemd/systemd/pull/30360 to be
merged in a future release. As described there:
nscd is known to be racy [1] and it was already deprecated and later dropped
in Fedora a while back [1,2]. We don't need to support obsolete stuff in
systemd, and the cache in systemd-resolved provides a better solution anyway.
[1] https://fedoraproject.org/wiki/Changes/DeprecateNSCD
[2] https://fedoraproject.org/wiki/Changes/RemoveNSCD
Note that our "support" is only the signal to flush the cache that we send at
various points. Nscd itself may still exist, dropping it is a decision to be
made in glibc.
Mike Yuan [Sun, 4 Feb 2024 15:22:46 +0000 (23:22 +0800)]
core: reuse credential dir across start and start-post if populated,
fresh otherwise
Currently, exec_setup_credential() always rewrite all credentials
upon exec_invoke(), i.e. invocation of each ExecCommand, and within
a single tmpfs instance. This is problematic though:
* When writing each tmp cred file, we essentially double the size
of the credential. Therefore, if one cred is bigger than half
of CREDENTIALS_TOTAL_SIZE_MAX, confusing ENOSPC occurs (see also
https://github.com/systemd/systemd/pull/24734#issuecomment-
1925440546)
* Credential is a unit-wide thing and thus should not change
during the whole lifetime of main process. However, if e.g.
a on-disk credential or SetCredential= in unit file
changes between ExecStart= and ExecStartPost=,
the credentials are overwritten when the latter gets to run,
and the already-running main process is suddenly seeing
completely different creds.
So, let's try to reuse final cred dir if the main process has started
and the tmpfs has been populated, so that the creds used is stable
across all ExecStart= and ExecStartPost=-s. We still want to retain
the ability of updating creds through ExecStartPre= though, therefore
we forcibly use a fresh cred dir for those. 'Fresh' means to actually
unmount the old tmpfs first, so the first problem goes away, too.
Mike Yuan [Tue, 6 Feb 2024 13:53:35 +0000 (21:53 +0800)]
core: introduce exec_params_need_credentials
Also rename EXEC_WRITE_CREDENTIALS to EXEC_SETUP_CREDENTIALS.
Mike Yuan [Tue, 6 Feb 2024 09:10:49 +0000 (17:10 +0800)]
TEST-54-CREDS: add test for ExecStartPost= (#31194)