1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00
Commit Graph

69636 Commits

Author SHA1 Message Date
Lennart Poettering
f5fcf851b5
Merge pull request #30515 from poettering/dnslabelmax
extend most DNS label buffers by one
2023-12-18 15:12:27 +01:00
networkException
4e0db87e4c core: allow interface altnames in RestrictNetworkInterfaces=
This patch enables IFNAME_VALID_ALTERNATIVE for checks guarding the
parsing of RestrictNetworkInterfaces=.

The underlying implementation for this option already supports
altnames.
2023-12-18 15:12:10 +01:00
Lennart Poettering
a19e7f3101
Merge pull request #30321 from yuwata/find-esp
find-esp: gracefully handle btrfs RAID
2023-12-18 15:11:54 +01:00
Lennart Poettering
dadc06bc6c
Merge pull request #30150 from poettering/homectl-interactive
add "homectl firstboot" verb, that runs at first boot and can create a user, interactively or from creds
2023-12-18 15:11:23 +01:00
Lennart Poettering
360b9db31d 64bit mount id 2023-12-18 14:56:45 +01:00
Daan De Meyer
c88753db45 shutdown: Send EXIT_STATUS before final sync
There's a race condition where the EXIT_STATUS= message we send
just before shutting down the VM doesn't arrive on the host,
presumably because the VM is shut down before the kernel has had a
chance to forward the message to the host.

Since there's no obvious way to wait until the message has been
flushed to the host, let's send the message before we execute the
final sync() instead of after executing the final sync(). In my
testing, this seems to either guarantee the message is sent or
introduces sufficient delay that the kernel always has time to flush
its socket buffers to the host.
2023-12-18 13:21:17 +01:00
Lennart Poettering
604cfd1e4a update TODO 2023-12-18 11:11:17 +01:00
Lennart Poettering
641489e257 mkosi: use systemd.firstboot=no to turn of interactivity at boot
Now that creds are processed even if systemd.firstboot=no is set, we can
use it to disable the root pw prompt *and* the new homectl prompt at the
same time, without breaking the creds stuff.
2023-12-18 11:11:11 +01:00
Lennart Poettering
3ccadbce33 homectl: add "firstboot" command
This extends what systemd-firstboot does and runs on first boots only
and either processes user records passed in via credentials to create,
or asks the user interactively to create one (only if no regular user
exists yet).
2023-12-18 11:10:53 +01:00
Lennart Poettering
0a9c4a1082 firstboot: adjust what systemd.firstboot=no on the kernel cmdline does
So far by setting systemd.firstboot=no simply short-cut the whole tool
and made it exit early. This is against what the docs say though: they
just claim the user isn't asked for questions anymore. Let's change
behaviour so that the code actually matches the docs, or more
specifically: if credentials are passed into firstboot, then honour
them, regardless of the kernel cmdline option.

After all, if we get explicit data passed in we should operate on it,
and then leave systemd.firstboot=no just affect the interactivity.

I think this was actually mostly a bug introduced because the credential
stuff was added after the kernel cmdline option, hence this just catches
up with the new addition.
2023-12-18 11:10:47 +01:00
Lennart Poettering
6f9dd36990 homectl: when taking a JSON user record as input, strip secttions we don't want rather than complain about them
This makes it easier to take a user record from one host and create an
identical user on another.
2023-12-18 11:10:40 +01:00
Lennart Poettering
58982cf0cb creds-util: add helper for opening the credentials directory 2023-12-18 11:10:14 +01:00
Lennart Poettering
68f74b0af2
Merge pull request #30479 from keszybz/man-pages-synopsis-layout
Man pages synopsis layout
2023-12-18 10:44:58 +01:00
Lennart Poettering
d393666403 specifier: use mempcpy() where we can 2023-12-18 10:28:03 +01:00
Lennart Poettering
fd7e988700 resolved: increase most label buffers to fit a trailing NUL byte
This is just paranoia. In all these cases we don't really care about the
trailing NUL byte. But if there's space for it dns_label_unescape() is
going to insert it, and that's a good safety strategy.

This is a follow-up to c29c3adefa which
fixed an actual bug, unlike this commit, which is just paranoia.
2023-12-18 10:27:27 +01:00
Mike Yuan
ccf695a4cf
Merge pull request #30482 from YHNdnzj/ferror-handling
A few fixes for ferror() handling
2023-12-18 14:42:22 +08:00
Yu Watanabe
7d11a20ee4
Merge pull request #30494 from keszybz/trivial-cleanups
Trivial cleanups
2023-12-18 08:25:02 +09:00
Topi Miettinen
f432aa9083
Revert "test: temporarily skip checking NFT sets in test_address_static"
This reverts commit e4a80de119.
2023-12-17 18:01:42 +02:00
Topi Miettinen
1ce2ffac6c
test-network: fix racy test for address_static
NFT sets must be installed before starting networkd, otherwise some sets may be
installed too late.

Closes #30427
2023-12-17 17:59:53 +02:00
QuonXF
6902da549b Add Bosto BT-12HD series to hwdb 2023-12-17 16:57:42 +09:00
Ronan Pigott
f5de77fa08 resolved-util: NUL-terminate host label
In case the host has a 63-byte hostname, we must have enough space for a
NUL terminator as well.
2023-12-17 16:56:43 +09:00
Diego Viola
e6267e832b meson: make lines more consistent 2023-12-16 13:43:44 +01:00
Mike Yuan
e18427642e
machine: also clean up gid_map fscanf error handling 2023-12-16 18:49:20 +08:00
Frantisek Sumsal
23eca16aad Revert "test: disable TEST-08-INITRD on ubuntu CI"
No longer necessary, as the test checks if systemd ran in the initrd.

This reverts commit 0d290cbcd6.
2023-12-15 16:51:25 +01:00
Frantisek Sumsal
57d61ff319 test: skip TEST-08-INITRD if systemd didn't run in the initrd
This test requires systemd in the initrd, which is not the case in
mkinitrd-based initrds (Ubuntu/Debian).

Resolves: #30481
2023-12-15 16:51:25 +01:00
Zbigniew Jędrzejewski-Szmek
88cc9cc7bc test-systemctl-enable: fix typo
Follow-up for fe6e0cfa19.
2023-12-15 16:22:24 +01:00
Zbigniew Jędrzejewski-Szmek
28fd1ba375 NEWS: fix version 2023-12-15 16:22:24 +01:00
Zbigniew Jędrzejewski-Szmek
ace3e93fee man: use <simplelist> for two more lists 2023-12-15 14:32:50 +01:00
Zbigniew Jędrzejewski-Szmek
73e97bb064 man: use <simplelist> for file lists in synopsis
With <para><filename>…</filename></para>, we get a separate "paragraph" for
each line, i.e. entries separated by empty lines. This uses up a lot of space
and was only done because docbook makes it hard to insert a newline. In some
other places, <literallayout> was used, but then we cannot indent the source
text (because the whitespace would end up in the final page). We can get the
desired result with <simplelist>.

With <simplelist> the items are indented in roff output, but not in html
output. In some places this looks better then no indentation, and in others it
would probably be better to have no indent. But this is a minor issue and we
cannot control that.

(I didn't convert all spots. There's a bunch of other man pages which have two
lines, e.g. an executable and service file, and it doesn't matter there so
much.)
2023-12-15 14:27:28 +01:00
Mike Yuan
7312c422f0
basic/uid-range: add uid_map_read_one helper 2023-12-15 21:22:51 +08:00
Mike Yuan
121b705426
cgroup-util: check ferror() first
Also, there's no need to set use errno_or_else(), since fscanf() is
documented to set errno on error.
2023-12-15 21:21:17 +08:00
Mike Yuan
674becc987
fsck: use correct errno 2023-12-15 21:21:15 +08:00
Luca Boccassi
1905d621db
Merge pull request #30484 from mrc0mmand/test-tweaks
A couple of test-related tweaks
2023-12-15 12:20:35 +01:00
Andrew Sayers
ff47602f5e Fix a typo in the org.freedesktop.systemd1 man page 2023-12-15 07:39:05 +09:00
Frantisek Sumsal
438c7cb20e test: tell delv to load anchors from /etc/bind.keys explicitly
Since [0] delv no longer does that automagically, so we have to that
explicitly with each delv invocation.

Resolves: #30477

[0] c144fd2871
2023-12-14 23:11:12 +01:00
Frantisek Sumsal
58bcbad86c test: don't check for -Dinstall-tests=true with NO_BUILD=1 2023-12-14 23:11:12 +01:00
Frantisek Sumsal
fdd380dde2 test: install empty directories with NO_BUILD=1
Resolves: #30478
2023-12-14 23:11:12 +01:00
Frantisek Sumsal
c15e51bde2 test: update comment style & drop one extraneous newline
Follow-up to 9fb2a61830.
2023-12-14 23:08:44 +01:00
Frantisek Sumsal
8f7c876bdc test: forward journal messages to console during sd-bsod tests
Since we nuke the journal multiple times during that, which makes
potential fails undebugable.
2023-12-14 23:08:44 +01:00
Richard Maw
566f1000d1 mkosi: make sysvinit path inference consistent
The integration tests use /etc/rc.d/init.d if it exists
or falls back to /etc/init.d,
while the mkosi.build.chroot script dereferenced /etc/init.d.

This produces inconsistent results, as sometimes an image can be made
that has systemd built to expect /etc/init.d but /etc/rc.d/init.d
also exists.
2023-12-14 16:26:23 +00:00
Richard Maw
e07bbb8290 mkosi: Install locales in fedora
locale files are not generated on-demand in Fedora like they are in
Debian-like systems and are typically installed from package instead.

This is necessary for the locale tests,
which expect en_US.UTF-8 to be available.
2023-12-14 16:26:23 +00:00
Yu Watanabe
ae3fb96d1f
Merge pull request #30440 from yuwata/network-nexthop-cleanups-2
network/nexthop: several cleanups
2023-12-14 21:44:02 +09:00
Zbigniew Jędrzejewski-Szmek
f36c796e0f man/tmpfiles: update summary
It hasn't been just about "volatile" and "files" for a long time.
2023-12-14 12:52:28 +01:00
Yu Watanabe
5f6ab79571 sd-netlink: the kernel ignores NLM_F_APPEND in RTM_NEWNEXTHOP message but uses NLM_F_REPLACE
See insert_nexthop() in net/ipv4/nexthop.c of the kernel.
2023-12-14 18:58:26 +09:00
Yu Watanabe
68149118cb network/nexthop: check existing nexthop can be replaced with requested one 2023-12-14 18:58:26 +09:00
Yu Watanabe
cdf3bee6a2 network/nexthop: do not add NextHop object to Link on requesting
Then, all nexthops managed by networkd really exist (unless the kernel
silently removes a nexthop).

This is the same for nexthop already done by
3c283289ae and
0a0c2672db (for address), and
5d098f5d36 (for neighbor).
2023-12-14 18:58:26 +09:00
Yu Watanabe
352eba2e49 network/nexthop: manage all nexthops by manager
The kernel manages nexthops by their IDs. Previously networkd manages
nexthops in three ways:
- by the corresponding link, if a nexthop has ifindex,
- by the manager, if a nexthop does not have ifindex,
- by the manager with their IDs.

This unifies the three managements of nexthops into one, and use the
same way as the kernel uses.

This is the one for nexthop already done by
aa9626ee3b for neighbor.
2023-12-14 18:58:26 +09:00
Yu Watanabe
ac21790335 network/nexthop: rename manager_get_nexthop_by_id() -> nexthop_get_by_id() 2023-12-14 18:58:26 +09:00
Yu Watanabe
84faee4141 network/nexthop: rename nexthop_owned_by_link() -> nexthop_bound_to_link()
No functional change.
2023-12-14 18:58:19 +09:00
Yu Watanabe
a533473a48 network/nexthop: NextHop.id is always positive when nexthop_configure() is called
If a nexthop is requested without a valid ID, then nexthop_acquire_id()
assigns an unused ID. So, at the time nexthop_configure() is called, the
ID is always valid.
2023-12-14 18:57:43 +09:00