Mike Yuan [Thu, 5 Oct 2023 16:49:45 +0000 (00:49 +0800)]
systemctl-show: align "Cntrl PID" correctly
Lennart Poettering [Thu, 5 Oct 2023 16:40:32 +0000 (18:40 +0200)]
Merge pull request #29455 from poettering/scope-pidref
pid1: allow creating scope units based on pidfds (as opposed to numeric pids)
Mike Yuan [Thu, 5 Oct 2023 15:21:01 +0000 (23:21 +0800)]
docs/HACKING: Arch has dropped asp in favor of pkgctl
Prompted by #29461
See also: https://wiki.archlinux.org/title/Arch_build_system#Using_the_pkgctl_tool
Lennart Poettering [Thu, 5 Oct 2023 07:56:29 +0000 (09:56 +0200)]
update TODO
Lennart Poettering [Thu, 5 Oct 2023 07:55:28 +0000 (09:55 +0200)]
tree-wide: prefer sending pifds over pids when creating scope units
Lennart Poettering [Thu, 5 Oct 2023 07:47:42 +0000 (09:47 +0200)]
pidref: add trivial helper pidref_set_self() to set pidref to our handle to our own process
Lennart Poettering [Thu, 5 Oct 2023 07:46:40 +0000 (09:46 +0200)]
pid1: allow creating scope units based in pidfds instead of plain pids
Daan De Meyer [Thu, 5 Oct 2023 13:17:01 +0000 (15:17 +0200)]
mkosi: Update to latest
We have to set the image runtime size explicitly now so that's it's
grown a bit when we boot in nspawn or qemu.
Daan De Meyer [Thu, 5 Oct 2023 10:49:07 +0000 (12:49 +0200)]
mountpoint-util: Check hardcoded list before asking kernel if option is supported
mount_option_supported() will call fsopen() which will probe the
kernel filesystem module. This means that we'll suddenly start
probing filesystem modules when running generators as those determine
which mount options to use. To prevent generators from loading kernel
filesystem modules as much as possible, let's always first check the
hardcoded list of filesystem which we know support a feature before
falling back to asking the kernel.
Lennart Poettering [Thu, 5 Oct 2023 13:44:25 +0000 (15:44 +0200)]
Merge pull request #29454 from poettering/cg-pidref-get-path
cgroup-util: add cg_pidref_get_path() helper and use it
Lennart Poettering [Thu, 5 Oct 2023 13:43:02 +0000 (15:43 +0200)]
Merge pull request #29458 from poettering/serialize-pidref
pid1: serialize pidref as pidfd if possible
Daan De Meyer [Thu, 5 Oct 2023 12:49:48 +0000 (14:49 +0200)]
Merge pull request #29439 from yuwata/mmap-cache-cleanups-part2
mmap-cache: several cleanups (part2)
Lennart Poettering [Thu, 5 Oct 2023 11:31:02 +0000 (13:31 +0200)]
Merge pull request #29453 from poettering/cgroup-no-controller
cgroup-util: drop "controller" argument from various cgroup helper calls
Lennart Poettering [Thu, 5 Oct 2023 09:49:14 +0000 (11:49 +0200)]
update TODO
Lennart Poettering [Thu, 5 Oct 2023 09:49:07 +0000 (11:49 +0200)]
cgroup-util: add cg_pidref_get_path() helper and use it
Luca Boccassi [Thu, 5 Oct 2023 11:25:42 +0000 (12:25 +0100)]
Merge pull request #29442 from yuwata/network-dhcp4-preferred-address
network: introduce [DHCPv4] PreferredAddress= setting
Lennart Poettering [Thu, 5 Oct 2023 10:46:13 +0000 (12:46 +0200)]
update TODO
Lennart Poettering [Thu, 5 Oct 2023 10:45:38 +0000 (12:45 +0200)]
pid1: serialize pidrefs as pidfds if possible
One major step towards total pidfdification of systemd.
Daan De Meyer [Thu, 5 Oct 2023 08:42:26 +0000 (10:42 +0200)]
repart: Mention that xattrs are not copied when populating XFS with protofile
Lennart Poettering [Thu, 5 Oct 2023 08:39:06 +0000 (10:39 +0200)]
cgroup-util: make sure cg_get_owner() only works for cgroups, not cgroup attribute files
Lennart Poettering [Thu, 5 Oct 2023 08:28:22 +0000 (10:28 +0200)]
cgroup-util: drop "controller" argument from various cgroup helper calls
systemd's own cgroup hierarchy is special to us, we use it to actually
manage processes. Because of that many calls tha apply to cgroups are
only ever called with the SYSTEMD_CGROUP_CONTROLLER as controller
argument. Let's hence remove the argument altogether.
This in particular touches the kill and xattr routines.
This changes no behaviour, we just drop an argument that is always set
to the same value anyway.
This is preparation to eventually getting rid of the cgroupvs1, because
on cgroupvs2 the cgroup paths do not change for different controllers,
there's only a single hierarchy there.
Emil Velikov [Wed, 4 Oct 2023 10:51:47 +0000 (11:51 +0100)]
sd-boot: introduce and use efivar_unset()
Currently some of the code base check for the variable presence before
removing it, and some do not.
More so, in all cases (being updated) we're dealing with non-volatile
variables where changing those attribute to NVRAM wear out.
From what information I could find, there is no definitive answer if the
UEFI implementation will write to the NVRAM even when the variable is
missing.
So add a simple helper that checks for the variable presence before
removing it. While also having a bit cleaner API than the current
efivar_set(..., NULL, ...);
efivar_unset() follows the design from efivar_set*() where it returns an
EFI_STATUS even though its (presently) unused.
v2:
- add inline comment, use early return
v3:
- typos? typos!
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Yu Watanabe [Wed, 4 Oct 2023 12:29:31 +0000 (21:29 +0900)]
test-network: add tests for [DHCPv4] RequestAddress= setting
Luca Boccassi [Wed, 4 Oct 2023 22:30:46 +0000 (23:30 +0100)]
Merge pull request #29450 from YHNdnzj/run-mandatory
man/systemd.exec: document that API fs are required to setup namespacing
Yu Watanabe [Wed, 4 Oct 2023 11:46:55 +0000 (20:46 +0900)]
network: introduce [DHCPv4] RequestAddress= setting
This may be useful when requesting a specific address.
Closes #29437.
Yu Watanabe [Wed, 4 Oct 2023 21:53:01 +0000 (06:53 +0900)]
network: skip to set request address when anonymized
In sd-dhcp-client.c, we do not set the option in the DHCPDISCOVER
message when anonymized, and the specified address is ignored
anyway. So, this does not change the behavior, but suppress
misleading debugging log in dhcp4_set_request_address().
Mike Yuan [Wed, 4 Oct 2023 21:04:12 +0000 (05:04 +0800)]
man/systemd.exec: document that API fs are required to setup namespacing
Closes #27997
Mike Yuan [Wed, 4 Oct 2023 21:30:46 +0000 (05:30 +0800)]
man/systemd.exec: suffix one more directory with /
Luca Boccassi [Wed, 4 Oct 2023 20:15:52 +0000 (21:15 +0100)]
Merge pull request #29391 from lf-/jade/analyze-plot-tooltips
analyze: add tooltips with dependency information to "plot"
Lucas Adriano Salles [Wed, 4 Oct 2023 20:06:34 +0000 (17:06 -0300)]
Fix Positivo N14EP6 key toggle touchpad and programmable keys (#29448)
Lennart Poettering [Mon, 2 Oct 2023 18:49:51 +0000 (20:49 +0200)]
stub: drop empty line
Lennart Poettering [Mon, 2 Oct 2023 18:49:04 +0000 (20:49 +0200)]
markdown: add document listing TPM2 PCR measurements we make comprehensively
This is useful to write TPM event log decoders.
Yu Watanabe [Fri, 29 Sep 2023 22:10:27 +0000 (07:10 +0900)]
mmap-cache: each Window is owned by MMapFileDescriptor
And MMapFileDescriptor always references MMapCache, hence it is not
necessary Window to have a reference to MMapCache.
This also renames the list fields 'by_fd' -> 'windows', to make them
consistent with the name of the head.
No functional change, just refactoring.
Yu Watanabe [Fri, 29 Sep 2023 21:51:48 +0000 (06:51 +0900)]
mmap-cache: merge mmap_cache_fd_get() with try_context() and find_mmap()
The post operations (attach the found or new window to a context, update
the keep_always flag, and calculate the address) in three steps are
equivalent, and the two searching logics are quite simple.
Let's merge them to decrease the total lines.
No functional change, just refactoring.
Yu Watanabe [Sat, 30 Sep 2023 02:32:38 +0000 (11:32 +0900)]
mmap-cache: merge window_matches() and window_matches_fd()
Let's drop meaningless optimization, and always check if the window is
owned by the expected fd.
Yu Watanabe [Thu, 28 Sep 2023 01:27:45 +0000 (10:27 +0900)]
mmap-cache: merge mmap_try_harder() with make_room()
The function make_room() is short and only used by mmap_try_harder().
Let's merge them with short comments.
No functional change, just refactoring.
Luca Boccassi [Wed, 4 Oct 2023 10:08:25 +0000 (11:08 +0100)]
docs: fix typo in UEFI_SECURITY.md
Daan De Meyer [Wed, 4 Oct 2023 06:49:24 +0000 (08:49 +0200)]
Merge pull request #29386 from yuwata/mmap-cache-cleanups-part1
mmap-cache: several cleanups (part1)
Yu Watanabe [Wed, 4 Oct 2023 02:18:47 +0000 (11:18 +0900)]
test-network: test SIP servers obtained by DHCP
For issue #29145.
Daan De Meyer [Wed, 4 Oct 2023 05:55:52 +0000 (07:55 +0200)]
Merge pull request #29403 from yuwata/journal-decouple-journald-and-journal-remote
journal: drop ManagedJournalFile and decouple journald and journal-remote
Jade Lovelace [Sun, 1 Oct 2023 21:27:38 +0000 (14:27 -0700)]
NEWS: systemd-analyze plot tooltips
Jade Lovelace [Sun, 1 Oct 2023 05:21:33 +0000 (22:21 -0700)]
analyze: add tooltips with dependency information to "plot"
This helps a lot with figuring out why units were started when they
were, rather than guessing there is a dependency relation. We could
perhaps also do fun JavaScript things in the future to highlight
dependencies on mouse-over.
Yu Watanabe [Wed, 4 Oct 2023 00:19:27 +0000 (09:19 +0900)]
sd-netlink: use secure_getenv()
Follow-up for
52afaee74b40a765b8118393bff92717f78d0a51.
Fixes CID#
1522326.
Yu Watanabe [Wed, 4 Oct 2023 00:02:48 +0000 (09:02 +0900)]
po: fix invalid printf format specifier
Yu Watanabe [Tue, 3 Oct 2023 23:58:10 +0000 (08:58 +0900)]
tree-wide: fix typo
Yu Watanabe [Thu, 28 Sep 2023 00:05:53 +0000 (09:05 +0900)]
sd-journal: drop unnecessary re-read of object
This reverts the following commits.
-
a1640191b4ca583ca62a4bd3b91edec3532bd41f
-
231741d355fbbe544f6bf62d714f56a6c857fb6f
These were done by my misunderstanding of the mmap cache behavior.
Also, this updates the comments added by
df04b9ed86a8b45c25cfff0fd800adb66407309a.
Luca Boccassi [Tue, 3 Oct 2023 21:16:57 +0000 (22:16 +0100)]
Merge pull request #29426 from ddstreet/tpm2_minor_changes
Minor commits for tpm2
Luca Boccassi [Tue, 3 Oct 2023 21:13:32 +0000 (22:13 +0100)]
Merge pull request #29428 from mrc0mmand/soft-reboot
test: spawn the to-be-killed-on-soft-reboot units with --collect
NRK [Mon, 2 Oct 2023 13:25:00 +0000 (19:25 +0600)]
macro: use __builtin_unreachable on NDEBUG
note that this slightly changes the semantic of assert when NDEBUG is
defined. if there's an extern function call (without attribute pure or
similar) then the compiler has to assume it has side effects and still
emit the function call.
whereas the old assert guaranteed that nothing will be evaluated on
NDEBUG.
Closes: https://github.com/systemd/systemd/issues/29408
Dan Streetman [Fri, 8 Sep 2023 17:14:38 +0000 (13:14 -0400)]
tpm2: cache TPM's supported ECC curves
This brings the tpm2_supports_ecc_curve() api in line with the other
tpm2_supports_*() functions, of returning a boolean.
Dan Streetman [Thu, 31 Aug 2023 13:10:40 +0000 (09:10 -0400)]
tpm2: change tpm2_unseal() to accept Tpm2Context instead of device string
This matches the change to tpm2_seal(), which now accepts a Tpm2Context instead
of a device string.
This also allows using the same TPM context for sealing and unsealing, which
will be required by (future) test code when sealing/unsealing using a transient
key.
Dan Streetman [Fri, 8 Sep 2023 18:22:11 +0000 (14:22 -0400)]
tpm2: use GREEDY_REALLOC_APPEND() in tpm2_get_capability_handles(), cap max value
Simplify the function with GREEDY_REALLOC_APPEND(). Also limit the size_t-sized
max value to UINT32_MAX since that's the maximum of the range this searches,
and the max parameter for tpm2_get_capability() is uint32_t.
Dan Streetman [Wed, 2 Aug 2023 17:35:46 +0000 (13:35 -0400)]
tpm2: update tpm2 test for supported commands
The test expects TPM2_CC_FIRST - 1 and TPM2_CC_LAST + 1 to be unsupported, but
those are not necessarily invalid commands. Instead test known-invalid
commands. Also add some more valid commands.
Dan Streetman [Fri, 30 Jun 2023 16:57:23 +0000 (12:57 -0400)]
tpm2: allow tpm2_make_encryption_session() without bind key
Allow providing no bind key, and use ESYS_TR_NONE instead.
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2023 12:06:58 +0000 (14:06 +0200)]
test-loopback: suppress warning about ignored unused result
Dan Streetman [Fri, 8 Sep 2023 16:39:49 +0000 (12:39 -0400)]
tpm2: downgrade most log functions from error to debug
Because most TPM2 functions here are 'library-like' functions, they should be
at debug level, not error level.
The only functions not reduced to logging at debug are tpm2_list_devices(),
since it is expected to print output, and the tpm2_parse_pcr_argument_*()
functions, since the system-wide parse_*_argument() functions generally log at
error level.
Frantisek Sumsal [Tue, 3 Oct 2023 14:40:49 +0000 (16:40 +0200)]
test: spawn the to-be-killed-on-soft-reboot units with --collect
Otherwise they might leave stuff behind if they don't respond fast
enough to the first SIGTERM and get SIGKILLEd, which then breaks reusing
the unit name further in the test:
[ 2993.620849] H testsuite-82.sh[43]: + systemd-run -p Type=exec -p DefaultDependencies=no -p IgnoreOnIsolate=yes --unit=testsuite-82-nosurvive.service sleep infinity
[ 2993.628686] H systemd[1]: testsuite-82-nosurvive.service: About to execute: /usr/bin/sleep infinity
[ 2993.628886] H systemd[1]: testsuite-82-nosurvive.service: Forked /usr/bin/sleep as 65
[ 2993.629328] H systemd[1]: testsuite-82-nosurvive.service: Changed dead -> start
...
[ 2993.699892] H testsuite-82.sh[43]: + systemctl --no-block --check-inhibitors=yes soft-reboot
[ 2993.704326] H systemd-logind[41]: The system will soft-reboot now!
...
[ 3001.249302] H systemd[1]: Sending SIGKILL to PID 65 (sleep).
...
[ 3001.303158] H testsuite-82.sh[136]: + systemd-notify '--status=Second Boot'
...
[ 3001.409504] H testsuite-82.sh[136]: + systemd-run -p Type=exec --unit=testsuite-82-nosurvive.service sleep infinity
[ 3001.414061] H testsuite-82.sh[165]: Failed to start transient service unit: Unit testsuite-82-nosurvive.service was already loaded or has a fragment file.
Spotted in Ubuntu CI.
Frantisek Sumsal [Tue, 3 Oct 2023 14:38:35 +0000 (16:38 +0200)]
test: use --service-type= instead of -p Type=
Luca Boccassi [Tue, 3 Oct 2023 10:39:15 +0000 (11:39 +0100)]
docs: fix spelling in UEFI_SECURITY.md
that that -> that
Zbigniew Jędrzejewski-Szmek [Tue, 3 Oct 2023 09:57:59 +0000 (11:57 +0200)]
Merge pull request #29420 from bluca/uefi_doc
Fixups for UEFI_SECURITY.md
Luca Boccassi [Tue, 3 Oct 2023 09:12:36 +0000 (10:12 +0100)]
docs: rephrase sentence about UKIs in UEFI_SECURITY.md
Luca Boccassi [Tue, 3 Oct 2023 09:08:33 +0000 (10:08 +0100)]
docs: rephrase sentence about addons measuring in UEFI_SECURITY.md
Yu Watanabe [Tue, 3 Oct 2023 04:19:50 +0000 (13:19 +0900)]
man: update the list of ignored options by Anonymize=yes
Closes #29362.
Luca Boccassi [Mon, 2 Oct 2023 21:59:07 +0000 (22:59 +0100)]
Merge pull request #29390 from yuwata/sd-netlink-make-default-timeout-configurable
sd-netlink: make the default timeout configurable
NRK [Mon, 2 Oct 2023 19:26:48 +0000 (01:26 +0600)]
udevadm: avoid side-effect in assert()
this was found when trying to use __builtin_assume() with clang:
https://github.com/systemd/systemd/pull/29409#issuecomment-
1743575402
Dan Streetman [Mon, 2 Oct 2023 20:25:10 +0000 (16:25 -0400)]
tpm2: edit tpm2_get_or_create_srk() comment
Adjust the comment to correct the return value, i.e. 1 for SRK created, 0 for
SRK already exists, <0 on error.
Luca Boccassi [Mon, 2 Oct 2023 17:51:39 +0000 (18:51 +0100)]
docs: rename src/boot/efi/SECURITY.md as UEFI_SECURITY.md
Luca Boccassi [Mon, 2 Oct 2023 16:44:50 +0000 (17:44 +0100)]
doc: add compiler hardening details to UEFI SECURITY.md
dependabot[bot] [Sun, 1 Oct 2023 18:16:06 +0000 (18:16 +0000)]
build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from
adaa41512aa30c952daae5ba0abcf2622d66b93b to
a8ecff0defa132d729dcdab38380dcae31138e7e.
- [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/
adaa41512aa30c952daae5ba0abcf2622d66b93b...
a8ecff0defa132d729dcdab38380dcae31138e7e)
---
updated-dependencies:
- dependency-name: systemd/mkosi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
Luca Boccassi [Mon, 2 Oct 2023 15:30:39 +0000 (16:30 +0100)]
Merge pull request #29407 from CM4all/test-kernel-acl-dummy
src/test: fixups for kernels without ACL and net-dummy
Luca Boccassi [Mon, 2 Oct 2023 15:04:26 +0000 (16:04 +0100)]
Merge pull request #29339 from bluca/mount_namespace_new_api
Use new mount API for bind/image mount tunnel
Benjamin Peterson [Mon, 25 Sep 2023 14:23:27 +0000 (07:23 -0700)]
resolve: tolerate merging a zero-ttl RR and a nonzero-ttl RR if not mDNS
resolved rejected RRsets containing a RR with a zero TTL and a RR with a nonzero TTL. In practice—see the linked issues—, this case triggered when an AF_UNSPEC query to a CNAMEd domain returned a zero TTL for the CNAME on one address family and a nonzero TTL for the CNAME on the other address family.
The zero-nonzero TTL check cites RFC 2181 § 5.2 in a comment. That section says DNS clients should reject any RRset containing differing TTLs, which the check only implements a very special case of. That the old behavior caused real-world false NXDOMAIN results is reason enough to completely ignore the RFC's recommendation. However, mDNS treats zero TTLs specially, so the error case needs to be kept for mDNS.
Fixes https://github.com/systemd/systemd/issues/22177
Fixes https://github.com/systemd/systemd/issues/20617
Fixes https://github.com/systemd/systemd/issues/19118
Lennart Poettering [Mon, 2 Oct 2023 14:45:40 +0000 (16:45 +0200)]
Merge pull request #29405 from poettering/boot-xmalloc0
boot: add xmalloc0() + memzero() helpers
Max Kellermann [Mon, 2 Oct 2023 12:24:56 +0000 (14:24 +0200)]
test/test-execute: skip PrivateNetwork tests if kernel has no dummy netdevice support
Max Kellermann [Mon, 2 Oct 2023 12:05:25 +0000 (14:05 +0200)]
test/test-chown-rec: skip ACL tests if kernel has no ACL support
The second half of `chown_recursive` works only if the kernel has ACL support.
Luca Boccassi [Wed, 27 Sep 2023 00:37:25 +0000 (01:37 +0100)]
mount-util: use new mount API for image mount tunnel
Luca Boccassi [Sun, 1 Oct 2023 17:55:12 +0000 (18:55 +0100)]
docs: add document about UEFI security posture in src/boot/efi/
This is not intended as a user guide, but to describe the generic security
posture of the UEFI components. Hence we do not publish it on systemd.io
but only in the repository.
Luca Boccassi [Mon, 2 Oct 2023 13:23:51 +0000 (14:23 +0100)]
Merge pull request #29400 from yuwata/network-limit-read-size
network: limit read size
Yu Watanabe [Mon, 2 Oct 2023 01:42:58 +0000 (10:42 +0900)]
fuzz: limit size for fuzz-manager-serialize
Fixes #29357 and oss-fuzz#62756
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62756).
Luca Boccassi [Wed, 27 Sep 2023 00:04:44 +0000 (01:04 +0100)]
dissect-image: support verity_dissect_and_mount() in two steps too
With the new mount API first the image is opened, and later mounted
Lennart Poettering [Tue, 14 Mar 2023 10:09:46 +0000 (11:09 +0100)]
dissect-image: optionally allow mounting via new kernel mount API in two steps
This adds support for the new fsmount() logic of the kernel: we'll first
create an unattached fsmount fd, and then in a second step attach this
to some real file system inode – as opposed to attaching file system
directly. The benefit of this is that we can pass the open fsmount fds
over some sockets if need be, to isolate the mounting code from the
attaching code.
Lennart Poettering [Tue, 14 Mar 2023 10:09:57 +0000 (11:09 +0100)]
mount-util: add make_fsmount()
Luca Boccassi [Tue, 26 Sep 2023 23:01:45 +0000 (00:01 +0100)]
mount-util: use new mount API for bind mount tunnel
If we have the new mount API we can simplify bind mounting into a namespace
a lot
Luca Boccassi [Thu, 28 Sep 2023 12:19:45 +0000 (13:19 +0100)]
mountpoint-util: add bool mount_new_api_supported() helper
Luca Boccassi [Wed, 27 Sep 2023 00:37:59 +0000 (01:37 +0100)]
test: fix check in test unit in TEST-50-DISSECT
'[[ not found'
Lennart Poettering [Mon, 2 Oct 2023 11:12:11 +0000 (13:12 +0200)]
util: add xmalloc0() helper
Lennart Poettering [Mon, 2 Oct 2023 11:06:27 +0000 (13:06 +0200)]
memory-util: move memzero() to src/fundamental/ to share with UEFI
(and while we are at it, make sure it returns the input pointer as
output)
Daan De Meyer [Mon, 2 Oct 2023 12:29:32 +0000 (14:29 +0200)]
Merge pull request #29343 from DaanDeMeyer/tmp
Use a subdirectory of /run/systemd for PrivateDevices=
Daan De Meyer [Wed, 27 Sep 2023 08:52:50 +0000 (10:52 +0200)]
core: Use a subdirectory of /run/ for PrivateDevices=
When we're starting early boot services such as systemd-userdbd.service,
/tmp might not yet be mounted, so let's use a directory in /run instead
which is guaranteed to be available.
Luca Boccassi [Mon, 2 Oct 2023 09:56:15 +0000 (10:56 +0100)]
Merge pull request #29335 from abderrahim/version-info-check
man: add checks for missing version information
Daan De Meyer [Sun, 1 Oct 2023 18:40:45 +0000 (20:40 +0200)]
mount: Log when we can't create the mount point
Debugging mount unit failures caused by systemd not being able to
create the mount point is currently rather hard. Let's log about
failures to create mount points to simplify debugging.
Yu Watanabe [Wed, 27 Sep 2023 21:04:53 +0000 (06:04 +0900)]
journalctl: find boot ID more gracefully in corrupted journal
In discover_next_boot(), first we find a new boot ID based on the value
stored in the entry object. Then, find the tail (or head when we are going
upwards) entry of the boot based on the _BOOT_ID= field data.
If boot IDs of an entry in the entry object and _BOOT_ID field data
are inconsistent, which may happen on corrupted journal, then previously
discover_next_boot() failed with -ENODATA.
This makes the function check if the two boot IDs in each entry are
consistent, and skip the entry if not.
Fixes the failure of `journalctl -b -1` for 'truncated' journal:
https://github.com/systemd/systemd/pull/29334#issuecomment-
1736567951
Yu Watanabe [Sat, 30 Sep 2023 10:45:27 +0000 (19:45 +0900)]
test: split test-tables into three
Let's drop dependency to libjournal_core and libudevd_core from
test-tables.
Yu Watanabe [Sat, 30 Sep 2023 10:18:34 +0000 (19:18 +0900)]
journal: move several tests to libsystemd/sd-journal
This also renames test-journal-xyz for journald (rather than sd-journal)
to test-journald-xyz.
Yu Watanabe [Sat, 30 Sep 2023 10:08:23 +0000 (19:08 +0900)]
journal-remote: drop dependencies to journald
Now journal-remote can be built without libjournal_core.
Yu Watanabe [Sat, 30 Sep 2023 07:09:16 +0000 (16:09 +0900)]
journald: move and rename journal/managed-journal-file.[ch] -> shared/journal-file-util.[ch]
The files are used by both journald and journal-remote.
Let's move them to src/shared.
Yu Watanabe [Sat, 30 Sep 2023 06:46:16 +0000 (15:46 +0900)]
journald: drop ManagedJournalFile
The ManagedJournalFile object is a trivial wrapper of JournalFile.
Let's drop it, and also drop 'managed_' prefix from the functions.
Yu Watanabe [Sat, 30 Sep 2023 06:15:28 +0000 (15:15 +0900)]
journald: split-out closing journal files from managed_journal_file_open()
No functional change, just refactoring and preparation for later
commits.
Yu Watanabe [Sat, 30 Sep 2023 06:05:23 +0000 (15:05 +0900)]
journald: do not close all files stored in Server.deferred_closes
Just before the call of managed_journal_file_open(), we already called
server_vacuum_deferred_closes(), so there is a room to store the file.
Yu Watanabe [Mon, 2 Oct 2023 01:28:55 +0000 (10:28 +0900)]
network: set maximum length to be read by read_full_file_full()
Fixes #29264 and oss-fuzz#62556
(https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=62556).