Zbigniew Jędrzejewski-Szmek [Mon, 9 Jan 2023 20:24:52 +0000 (21:24 +0100)]
man: restore example formatting in systemd-coredump(8)
Fixup for
4f57f77267610388139272d9ab9ee64dd78e9720.
Daan De Meyer [Tue, 10 Jan 2023 13:30:53 +0000 (14:30 +0100)]
Merge pull request #24939 from msizanoen1/journal-realtime-enforce-consistency
journal: enforce strict consistency for realtime timestamps on write
Ludwig Nussel [Thu, 5 Jan 2023 14:31:13 +0000 (15:31 +0100)]
kernel-install: refactor some variables
In preparation for plugin support
Yu Watanabe [Tue, 10 Jan 2023 09:20:04 +0000 (18:20 +0900)]
shutdown: propagate the original errno
Follow-up for
b293bb23162534e0260ed07357c2478655541166.
Kai-Chuan Hsieh [Tue, 10 Jan 2023 08:36:51 +0000 (16:36 +0800)]
hwdb: Mark Dell platform accel sensor location to base
Dell would like to disable screen rotation for the platform eternally.
Mark the aceel sensor location base to disable it.
drosdeck [Mon, 9 Jan 2023 15:56:00 +0000 (11:56 -0400)]
Fix Positivo MASTER-N1110 key toggle touchpad
Lennart Poettering [Tue, 10 Jan 2023 08:44:42 +0000 (09:44 +0100)]
Merge pull request #25980 from yuwata/udev-fail-to-rename-netif
udev,pid1: gracefully handle failure in renaming network interface
Ulrich Ölmann [Tue, 10 Jan 2023 06:39:49 +0000 (07:39 +0100)]
man: exec,nspawn: fix typo
Yu Watanabe [Mon, 9 Jan 2023 07:02:09 +0000 (16:02 +0900)]
test: add tests for failure in renaming network interface
Yu Watanabe [Mon, 9 Jan 2023 07:11:52 +0000 (16:11 +0900)]
core/device: ignore failed uevents
When udevd failed to process the device, SYSTEMD_ALIAS or any other
properties may contain invalid values. Let's refuse to handle the uevent.
Yu Watanabe [Mon, 9 Jan 2023 07:11:04 +0000 (16:11 +0900)]
core/device: downgrade log level for ignored errors
Yu Watanabe [Mon, 9 Jan 2023 07:44:11 +0000 (16:44 +0900)]
sd-device: introduce device_get_property_int()
Yu Watanabe [Mon, 9 Jan 2023 05:58:58 +0000 (14:58 +0900)]
udev: restore syspath and properties on failure
Otherwise, invalid sysname or properties may be broadcast to udev
listeners.
Lennart Poettering [Mon, 9 Jan 2023 13:07:07 +0000 (14:07 +0100)]
shutdown: propagate mount() failures from child to parent
Let's propagate the actual error code up, as we usual do.
Inspired by: #25168
Lennart Poettering [Mon, 9 Jan 2023 17:59:20 +0000 (18:59 +0100)]
Merge pull request #25982 from mrc0mmand/curl-scheme
Fix build with the latest libcurl
Jan Janssen [Sat, 7 Jan 2023 21:16:52 +0000 (22:16 +0100)]
boot: Simplify object erasure
This erase_obj() machinery looks like voodoo and creates an awful lot of
noise as soon as we get back to building with -O0. We can do this in a
more simple way by introducing a struct that holds the information we
need on cleanup. When building with optimization enabled, all this gets
inlined and the eraser vanishes.
msizanoen1 [Mon, 9 Jan 2023 16:05:19 +0000 (23:05 +0700)]
journal: handle clock rollback error in managed_journal_file_open_reliably
-EREMCHG was introduced to denote a clock rollback detection error.
Handle this in managed_journal_file_open_reliably.
msizanoen1 [Wed, 12 Oct 2022 08:38:25 +0000 (15:38 +0700)]
test-journal-flush: don't fail on -EREMCHG
-EREMCHG on write is now used to denote clock rollback conditions
detected during journal write.
msizanoen1 [Sat, 8 Oct 2022 07:37:02 +0000 (14:37 +0700)]
journal: enforce strict consistency for realtime timestamps on write
Ensure all realtime timestamps in a journal file are strictly
ordered on write as a defense-in-depth measure. All known callers of
journal_file_append_entry and journal_file_copy_entry, which call this
function, should be able to handle the error by rotating the journal.
This is especially helpful for systems with RTC local time enabled,
where all log entries from initramfs might be recorded as several hours
later than it actually is, which won't get caught by journald during log
flushing. In those cases, the resulting inconsistency can cause libsystemd
to loop infinitely through journal files as observed in
`abrt-dump-journal-oops`.
Frantisek Sumsal [Mon, 9 Jan 2023 11:44:28 +0000 (12:44 +0100)]
import: use CURLOPT_PROTOCOLS_STR with libcurl >= 7.85.0
CURLOPT_PROTOCOLS [0] was deprecated in libcurl 7.85.0 with
CURLOPT_PROTOCOLS_STR [1] as a replacement, causing build warnings/errors:
../build/src/import/curl-util.c: In function ‘curl_glue_make’:
../build/src/import/curl-util.c:255:9: error: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Werror=deprecated-declarations]
255 | if (curl_easy_setopt(c, CURLOPT_PROTOCOLS, CURLPROTO_HTTP|CURLPROTO_HTTPS|CURLPROTO_FILE) != CURLE_OK)
| ^~
In file included from ../build/src/import/curl-util.h:4,
from ../build/src/import/curl-util.c:6:
/usr/include/curl/curl.h:1749:3: note: declared here
1749 | CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Since there's no grace period between the two symbols, let's resort
to a light if-def-ery to resolve this.
[0] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS.html
[1] https://curl.se/libcurl/c/CURLOPT_PROTOCOLS_STR.html
Lennart Poettering [Mon, 9 Jan 2023 11:58:09 +0000 (12:58 +0100)]
man: make clearer that sd_bus_get_timeout() returns an absolute time-out
Prompted by:
https://lists.freedesktop.org/archives/systemd-devel/2023-January/048714.html
Frantisek Sumsal [Mon, 9 Jan 2023 09:09:52 +0000 (10:09 +0100)]
import: use CURLINFO_SCHEME instead of CURLINFO_PROTOCOL
CURLINFO_PROTOCOL has been deprecated in curl 7.85.0 causing compilation
warnings/errors:
../build/src/import/pull-job.c: In function ‘pull_job_curl_on_finished’:
../build/src/import/pull-job.c:142:9: error: ‘CURLINFO_PROTOCOL’ is deprecated: since 7.85.0. Use CURLINFO_SCHEME [-Werror=deprecated-declarations]
142 | code = curl_easy_getinfo(curl, CURLINFO_PROTOCOL, &protocol);
| ^~~~
In file included from ../build/src/import/curl-util.h:4,
from ../build/src/import/pull-job.h:6,
from ../build/src/import/pull-common.h:7,
from ../build/src/import/pull-job.c:16:
/usr/include/curl/curl.h:2896:3: note: declared here
2896 | CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
| ^~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Since both CURLINFO_SCHEME and CURLINFO_PROTOCOL were introduced in
the same curl version (7.52.0 [0][1]) we don't have to worry about
backwards compatibility.
[0] https://curl.se/libcurl/c/CURLINFO_SCHEME.html
[1] https://curl.se/libcurl/c/CURLINFO_PROTOCOL.html
Lennart Poettering [Mon, 9 Jan 2023 08:56:04 +0000 (09:56 +0100)]
Merge pull request #25979 from yuwata/coverity-fixes
Coverity fixes
Jan Janssen [Sun, 8 Jan 2023 08:07:22 +0000 (09:07 +0100)]
boot: Remove option TPM PCR compat option
It says remove in 2023; happy to oblige.
Yu Watanabe [Mon, 9 Jan 2023 06:00:30 +0000 (15:00 +0900)]
udev: move device_rename() from device-private.c
The function is used only by udevd.
Yu Watanabe [Mon, 9 Jan 2023 05:07:16 +0000 (14:07 +0900)]
sd-device: do not directly access entry in sd-device object
No functional change, just refactoring.
Yu Watanabe [Mon, 9 Jan 2023 05:00:09 +0000 (14:00 +0900)]
sd-device: make device_set_syspath() clear sysname and sysnum
Otherwise, when a new syspath is assigned to the sd-device object,
sd_device_get_sysname() or _sysnum() will provide an outdated device
name or number.
Yu Watanabe [Mon, 9 Jan 2023 02:20:35 +0000 (11:20 +0900)]
udev: align table
Yu Watanabe [Mon, 9 Jan 2023 02:00:53 +0000 (11:00 +0900)]
bootctl: 'tmp' is always non-NULL
Fixes CID#
1502330.
Yu Watanabe [Mon, 9 Jan 2023 01:58:10 +0000 (10:58 +0900)]
bootctl: fix indentation
Yu Watanabe [Mon, 9 Jan 2023 01:53:20 +0000 (10:53 +0900)]
tmpfile: make failure in path_extract_filename() non-critical
Yu Watanabe [Mon, 9 Jan 2023 01:52:30 +0000 (10:52 +0900)]
tmpfile: fix resource leak
Fixes CID#
1501687.
Siddhesh Poyarekar [Sun, 8 Jan 2023 00:30:32 +0000 (19:30 -0500)]
alloc-util: Disallow inlining of expand_to_usable
Explicitly set __attribute__ ((noinline)) so that the compiler does not
attempt to inline expand_to_usable, even with LTO.
Luca Boccassi [Sat, 7 Jan 2023 16:56:14 +0000 (17:56 +0100)]
Merge pull request #25915 from poettering/arm-timer-rel
pid1: rework service_arm_timer() to optionally take a relative time v…
Luca Boccassi [Sat, 7 Jan 2023 16:52:49 +0000 (17:52 +0100)]
Merge pull request #25936 from poettering/emergaction-fix
EmergencyAction parsing fix
Frantisek Sumsal [Sat, 7 Jan 2023 09:27:05 +0000 (10:27 +0100)]
oss-fuzz: include generated corpora in the final zip file
Since the files with generated directives are now automatically
generated during build, they're now under the respective build directory
which the current oss-fuzz CI script didn't account for.
Follow-up to: #24958
Resolves: #25859
Lennart Poettering [Fri, 6 Jan 2023 18:02:16 +0000 (19:02 +0100)]
man: improve docs about systemd-notify invocations and NotifyAccess= settings
Fixes: #24516
dependabot[bot] [Fri, 6 Jan 2023 18:48:52 +0000 (18:48 +0000)]
build(deps): bump stefanbuck/github-issue-parser from 2.0.4 to 3.0.1
Bumps [stefanbuck/github-issue-parser](https://github.com/stefanbuck/github-issue-parser) from 2.0.4 to 3.0.1.
- [Release notes](https://github.com/stefanbuck/github-issue-parser/releases)
- [Commits](https://github.com/stefanbuck/github-issue-parser/compare/
f80b14f78892a66d7a35bba44f0a7d63bee03602...
c1a559d78bfb8dd05216dab9ffd2b91082ff5324)
---
updated-dependencies:
- dependency-name: stefanbuck/github-issue-parser
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:06 +0000 (09:01 +0000)]
build(deps): bump ossf/scorecard-action from 2.0.6 to 2.1.2
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.0.6 to 2.1.2.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](https://github.com/ossf/scorecard-action/compare/
99c53751e09b9529366343771cc321ec74e9bd3d...
e38b1902ae4f44df626f11ba0734b14fb91f8f86)
---
updated-dependencies:
- dependency-name: ossf/scorecard-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:09 +0000 (09:01 +0000)]
build(deps): bump github/super-linter from 4.9.6 to 4.9.7
Bumps [github/super-linter](https://github.com/github/super-linter) from 4.9.6 to 4.9.7.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/docs/release-process.md)
- [Commits](https://github.com/github/super-linter/compare/
01d3218744765b55c3b5ffbb27e50961e50c33c5...
bb2d833b08b6c288608686672b93a8a4589cdc49)
---
updated-dependencies:
- dependency-name: github/super-linter
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:18 +0000 (09:01 +0000)]
build(deps): bump actions/checkout from 3.0.2 to 3.2.0
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.0.2 to 3.2.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.0.2...
755da8c3cf115ac066823e79a1e1788f8940201b)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
dependabot[bot] [Sun, 1 Jan 2023 09:01:19 +0000 (09:01 +0000)]
build(deps): bump meson from 0.64.1 to 1.0.0 in /.github/workflows
Bumps [meson](https://github.com/mesonbuild/meson) from 0.64.1 to 1.0.0.
- [Release notes](https://github.com/mesonbuild/meson/releases)
- [Commits](https://github.com/mesonbuild/meson/compare/0.64.1...1.0.0)
---
updated-dependencies:
- dependency-name: meson
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Lennart Poettering [Thu, 5 Jan 2023 09:34:23 +0000 (10:34 +0100)]
load-fragment: config_parse_emergency_action() doesn't ever get a Manager pointer passed in
In 'data' we get the location passed in we write stuff, and that's not
the Manager object.
And we neither get the Manager passed in via 'userdata', because at the
time we parse the emergency action for the manager the Manager is not
actually allocated yet.
hence, let's fix this differently, and pass in the user/system mode
descriptor via the 'ltype' argument.
Fixes: #25933
Lennart Poettering [Thu, 5 Jan 2023 09:34:52 +0000 (10:34 +0100)]
load-fragment: remove EmergencyAction compat we were supposed to remove back in v241
Lennart Poettering [Fri, 6 Jan 2023 15:15:14 +0000 (16:15 +0100)]
update TODO
Lennart Poettering [Fri, 6 Jan 2023 14:36:38 +0000 (15:36 +0100)]
update TODO
Lennart Poettering [Fri, 6 Jan 2023 14:21:27 +0000 (15:21 +0100)]
Merge pull request #25918 from bluca/smbios_sd_notify
Support AF_VSOCK in sd_notify and pick up notify_socket from creds
Quentin Deslandes [Fri, 6 Jan 2023 08:15:55 +0000 (09:15 +0100)]
journald: fix followup comments on regex feature
Fix followup comments on PR #24058:
- Use `mempcpy_safe()`.
- Remove unused `pcre2_code` variable.
- Use `static const` when relevant.
Lennart Poettering [Fri, 6 Jan 2023 11:30:36 +0000 (12:30 +0100)]
nspawn: guard acl_free() with a NULL check
Inspired by #25957 there's one other place where we don't guard
acl_free() calls with a NULL check.
Fix that.
Sam James [Fri, 6 Jan 2023 10:58:32 +0000 (10:58 +0000)]
tmpfiles: avoid null free() for acl attributes
When built with ACL support, we might be processing a tmpfiles
entry where there's no cause for us to call parse_acls_from_arg,
then we get to the end of parse_line without having ever populated
i.{acl_access, acl_default}.
Then we pass a null pointer into acl_free().
From UBSAN w/ GCC 13.0.0_pre20230101:
```
$ systemd-tmpfiles --clean
/var/tmp/portage/sys-apps/acl-2.3.1-r1/work/acl-2.3.1/libacl/acl_free.c:44:14: runtime error: applying non-zero offset
18446744073709551608 to null pointer
#0 0x7f65d868b482 in acl_free /var/tmp/portage/sys-apps/acl-2.3.1-r1/work/acl-2.3.1/libacl/acl_free.c:44
#1 0x55fe7e592249 in item_free_contents ../systemd-9999/src/tmpfiles/tmpfiles.c:2855
#2 0x55fe7e5a347a in parse_line ../systemd-9999/src/tmpfiles/tmpfiles.c:3158
#3 0x55fe7e5a347a in read_config_file ../systemd-9999/src/tmpfiles/tmpfiles.c:3897
#4 0x55fe7e590c61 in read_config_files ../systemd-9999/src/tmpfiles/tmpfiles.c:3985
#5 0x55fe7e590c61 in run ../systemd-9999/src/tmpfiles/tmpfiles.c:4157
#6 0x55fe7e590c61 in main ../systemd-9999/src/tmpfiles/tmpfiles.c:4218
#7 0x7f65d7ebe289 (/usr/lib64/libc.so.6+0x23289)
#8 0x7f65d7ebe344 in __libc_start_main (/usr/lib64/libc.so.6+0x23344)
#9 0x55fe7e591900 in _start (/usr/bin/systemd-tmpfiles+0x11900)
```
Lennart Poettering [Fri, 6 Jan 2023 10:00:48 +0000 (11:00 +0100)]
man: document explicitly that LogRateLimit= has no effect on StandardOutput=file:…
Fixes: #25951
Daan De Meyer [Fri, 6 Jan 2023 13:11:57 +0000 (14:11 +0100)]
Merge pull request #25947 from poettering/resolved-dns-creds
resolved: add support for reading DNS config from kernel cmdline + service credentials
Lennart Poettering [Thu, 5 Jan 2023 21:38:55 +0000 (22:38 +0100)]
gpt-auto-generator: improve log messages a bit
Fixes: #20331
Sam James [Fri, 6 Jan 2023 11:39:10 +0000 (11:39 +0000)]
CODING_STYLE: fix 'better' typo
Lennart Poettering [Mon, 2 Jan 2023 14:06:10 +0000 (15:06 +0100)]
pid1: rework service_arm_timer() to optionally take a relative time value
In most cases this is actually what we want, hence simplify this case.
Lennart Poettering [Fri, 6 Jan 2023 10:27:17 +0000 (11:27 +0100)]
sd-event: don't mistake USEC_INFINITY passed in for overflow
Let's pass USEC_INFINITY from sd_event_source_set_time_relative() to
sd_event_source_set_time() instead of raising EOVERFLOW.
We should raise EOVERFLOW only if your addition fails, but not if the
input already is USEC_INFINITY, since it's an entirely valid operation
to have an infinite time-out, and we should support that.
Jan Janssen [Fri, 6 Jan 2023 08:26:04 +0000 (09:26 +0100)]
bootctl: Fix NULL pointer dereference
Fixes: #25952
Lennart Poettering [Thu, 5 Jan 2023 19:41:20 +0000 (20:41 +0100)]
bootspec: show default/selected entry info in JSON output
Fixes: #25889
Lennart Poettering [Thu, 5 Jan 2023 21:10:46 +0000 (22:10 +0100)]
resolved: disable SO_BINDTOIFINDEX hack for localhost IP addresses
Fixes: #23010
Luca Boccassi [Mon, 2 Jan 2023 22:43:33 +0000 (23:43 +0100)]
Update TODO
Luca Boccassi [Tue, 3 Jan 2023 17:11:04 +0000 (18:11 +0100)]
creds: import 'vmm.notify_socket' and use it to set
This is intended to be used with VSOCK, to notify the hypervisor/VMM, eg on the host:
qemu <...> -smbios type=11,value=io.systemd.credential:vmm.notify_socket=vsock:2:1234 -device vhost-vsock-pci,id=vhost-vsock-pci0,guest-cid=42
(vsock:2:1234 -> send to host on vsock port 1234, default is to send to 0 which is
the hypervisor itself)
Also on the host:
$ socat - VSOCK-LISTEN:1234,socktype=5
READY=1
STATUS=Ready.
Luca Boccassi [Tue, 3 Jan 2023 17:08:09 +0000 (18:08 +0100)]
sd_notify: support AF_VSOCK
Allow sending notifications via AF_VSOCK, so that VMs can communicate
to the hypervisor/VMM that they are finished booting.
Note that if the hypervisor does not support SOCK_DGRAM over AF_VSOCK
(ie: qemu at the time of writing), SOCK_SEQPACKET will be used instead.
Dirk Su [Thu, 5 Jan 2023 09:09:49 +0000 (17:09 +0800)]
hwdb: Add Dell models that require ACCEL_LOCATION=base
Ludwig Nussel [Wed, 21 Dec 2022 12:57:47 +0000 (13:57 +0100)]
kernel-install: run depmod only if writeable
Benjamin Tissoires [Thu, 5 Jan 2023 12:57:51 +0000 (13:57 +0100)]
virt: fix container detection
Commit
1b86c7c59ecc ("virt: make virtualization enum a named type")
made the conversion from `if (!r)` to `if (v != VIRTUALIZATION_NONE)`.
However, the initial test was meaning "if r is null", IOW "if r IS
`VIRTUALIZATION_NONE`).
The test is wrong and this can lead to false detection of the container
environment (when calling `systemctl exit`).
For example, https://gitlab.freedesktop.org/whot/libevdev/-/jobs/
34207974
is calling `systemctl exit 0`, and systemd terminates with the exit code
`130`.
Fixing that typo makes `systemctl exit 0` returns `0`.
Fixes:
1b86c7c59ecc26efdf278f5c1c4430346021cd38.
Ludwig Nussel [Wed, 7 Dec 2022 10:43:56 +0000 (11:43 +0100)]
bootctl: print entry token as well
Lennart Poettering [Thu, 5 Jan 2023 16:34:40 +0000 (17:34 +0100)]
units: condition systemd-networkd-wait-online.service like systemd-networkd.service
This adds the same condition that systemd-networkd.service already
carries also to systemd-networkd-wait-online.service. Otherwise we'll
potentially see some logs we'd rather not see about a service we BindTo=
not running. Or in other words, if service X binds to Y then X should be
at least as conditioned as Y.
Lennart Poettering [Thu, 5 Jan 2023 15:18:31 +0000 (16:18 +0100)]
dns-domain: dns_name_is_empty() is redundant
dns_name_is_empty() was added later, but does the same thing as the more
accurately called dns_name_is_root(), hence drop the former.
Lennart Poettering [Thu, 5 Jan 2023 16:34:18 +0000 (17:34 +0100)]
resolvectl: remove duplicate ':' from output
The second argument to dump_list() actually ends up in a TABLE_FIELD
cell now, where we implicitly append a ":". Hence drop it from the
strings.
Follow-up for:
37a50123fac050c7ccde4afcf3f37ee77aad012c
Lennart Poettering [Thu, 5 Jan 2023 17:42:10 +0000 (18:42 +0100)]
update TODO
Lennart Poettering [Thu, 5 Jan 2023 14:35:20 +0000 (15:35 +0100)]
resolved: read DNS conf also from creds and kernel cmdline
Note that this drops ProtectProc=invisible from
systemd-resolved.service.
This is done because othewise access to the booted "kernel" command line is not
necessarily available. That's because in containers we want to read
/proc/1/cmdline for that.
Fixes: #24103
Luca Boccassi [Tue, 3 Jan 2023 17:01:28 +0000 (18:01 +0100)]
src/shared/: split AF_UNIX/AF_VSOCK address parsing into src/basic/
We'll use it from libsystemd0 later, but AF_INET/6 requires some
netlink calls and thus the additional library dependency
Lennart Poettering [Tue, 3 Jan 2023 12:05:32 +0000 (13:05 +0100)]
vconsole: permit configuration of vconsole settings via credentials
Luca Boccassi [Thu, 5 Jan 2023 12:25:13 +0000 (13:25 +0100)]
Merge pull request #25929 from poettering/resolvectl-loopback-fix
resolvectl: show 127.0.0.1 among global DNS servers again
Lennart Poettering [Thu, 5 Jan 2023 09:33:32 +0000 (10:33 +0100)]
update TODO
Mike Yuan [Thu, 29 Dec 2022 06:51:06 +0000 (14:51 +0800)]
systemctl: enable: overwrite broken alias symlinks
When switching to an alternative alias provider,
the previous one might have been uninstalled or so.
It should be fine for us to overwrite them directly.
Closes #23694
Mike Yuan [Tue, 27 Dec 2022 09:41:18 +0000 (17:41 +0800)]
systemctl: edit: rephrase edit markers to avoid misunderstanding
Closes #25856
Joshua Goins [Mon, 26 Dec 2022 17:48:10 +0000 (12:48 -0500)]
udev: Fix some tablet pads being classified as mouse or joysticks
Luca Boccassi [Wed, 28 Dec 2022 16:27:37 +0000 (17:27 +0100)]
man: note that DynamicUser=yes is incompatible with D-Bus
Due to policy checks against system users this cannot currently work, and it is non-obvious.
In the future it might be implemented if support is added to dbus-broker/dbus-daemon, e.g.:
https://github.com/bus1/dbus-broker/issues/259
Lennart Poettering [Wed, 4 Jan 2023 16:49:21 +0000 (17:49 +0100)]
Merge pull request #25802 from poettering/bootctl-reseed
move EFI random seed update logic from systemd-random-seed.service into separate service
Lennart Poettering [Wed, 4 Jan 2023 15:36:15 +0000 (16:36 +0100)]
resolvectl: don't filter loopback DNS server from global DNS server list
"resolvectl status" shows per-link DNS servers separately from global
ones. When querying the global list, it will contain both per-link and
global servers however. Thus, to not show duplicate info we filter all
entries that actually have a non-zero ifindex set (under the assumption
that that's a per-link server).
This doesn't work if people configured 127.0.0.1 as global server
though, as we'll add ifindex 1 to it since
6e32414a66ff8dbcef233981a7066684d903ee9f unconditionally even for global
servers.
Let's address that by excluding entries with ifindex 1 from suppression.
This is safe as resolved ignores loopback ifaces, hence never will have
per-link servers on ifindex 1.
Note that this splits up the "with_ifindex" parameter into a second
parameter "only_global", since they semantically do two different
things. One controls whether we shall expect/parse an ifindex dbus
field. The other controls whether we shall filter all ifindex values set
!= 0. These are effectively always used in conjunction hence making them
the same actually worked. However this is utterly confusing I think,
which as I guess is resulting in the confusion around #25796 (which
removes the whole check)
Replaces: #25796
Lennart Poettering [Wed, 4 Jan 2023 15:32:51 +0000 (16:32 +0100)]
resolved: add some line-breaks/comments
Let's make this a bit more readable.
Lennart Poettering [Wed, 4 Jan 2023 15:29:34 +0000 (16:29 +0100)]
resolvectl: fix type of ifindex D-Bus field, and make sure to initialize to zero in all code paths
Lennart Poettering [Tue, 20 Dec 2022 17:03:06 +0000 (18:03 +0100)]
bootctl: split out setting of system token into function of its own
Let's break a huge function in two. No code change, just some
refactoring.
Lennart Poettering [Tue, 20 Dec 2022 16:16:47 +0000 (17:16 +0100)]
units: rename/rework systemd-boot-system-token.service → systemd-boot-random-seed.service
This renames systemd-boot-system-token.service to
systemd-boot-random-seed.service and conditions it less strictly.
Previously, the job of the service was to write a "system token" EFI
variable if it was missing. It called "bootctl --graceful random-seed"
for that. With this change we condition it more liberally: instead of
calling it only when the "system token" EFI variable isn't set, we call
it whenever a boot loader interface compatible boot loader is used. This
means, previously it was invoked on the first boot only: now it is
invoked at every boot.
This doesn#t change the command that is invoked. That's because
previously already the "bootctl --graceful random-seed" did two things:
set the system token if not set yet *and* refresh the random seed in the
ESP. Previousy we put the focus on the former, now we shift the focus to
the latter.
With this simple change we can replace the logic
f913c784ad4c93894fd6cb2590738113dff5a694 added, but from a service that
can run much later and doesn't keep the ESP pinned.
Lennart Poettering [Tue, 20 Dec 2022 15:34:36 +0000 (16:34 +0100)]
bootctl: downgrade graceful messages to LOG_NOTICE
Lennart Poettering [Tue, 20 Dec 2022 15:18:11 +0000 (16:18 +0100)]
random-seed: don't refresh EFI random seed from random-seed.c anymore
The ESP is simply not mounted early enough for this. We want that the
regular random seed handling runs as early as we possibly could, but we
don't want to delay this until the ESP is actually mounted.
Hence, let's remove this from random-seed.c here. A follow-up commit
will then add this back in, in a separate service which just calls
"bootctl random-seed".
Effectively reverts:
f913c784ad4c93894fd6cb2590738113dff5a694
Fixes: #25769
Lennart Poettering [Tue, 20 Dec 2022 10:53:37 +0000 (11:53 +0100)]
sha256: add helper than hashes a buffer *and* its size
We use this pattern all the time in order to thward extension attacks,
add a helper to make it shorter.
Lennart Poettering [Tue, 20 Dec 2022 10:48:21 +0000 (11:48 +0100)]
bootctl: when updating EFI random seed file, hash old seed with new one
Let's not regress in entropy in any case.
This does what
f913c784ad4c93894fd6cb2590738113dff5a694 also does.
Lennart Poettering [Tue, 20 Dec 2022 10:15:51 +0000 (11:15 +0100)]
bootctl: properly sync fs before/after moving random seed file into place
Let's do a careful, focussed sync at the right places instead of a
blanket sync at the end. After all we want to run this on every boot
soon.
Lennart Poettering [Mon, 19 Dec 2022 21:26:30 +0000 (22:26 +0100)]
bootctl: rework random seed logic to use open_mkdir_at() and openat()
This doesn't really fix anything, but in general we should put stronger
emphasis on operating via dir fds rather than paths more (in particular
when writing files as opposed to consuming them).
No real change in behaviour.
Lennart Poettering [Mon, 19 Dec 2022 21:25:28 +0000 (22:25 +0100)]
bootctl: fix errno logging
Luca Boccassi [Tue, 3 Jan 2023 22:18:43 +0000 (23:18 +0100)]
hwdb: remove spurious whitespace
Fixes test failures.
Follow-up for
c3950f0a27fb7d2298a2182f21d645c7017f9c0c and
https://github.com/systemd/systemd/pull/25908
Lennart Poettering [Tue, 3 Jan 2023 14:58:46 +0000 (15:58 +0100)]
efi: skip Read() calls with zero sizes
Let's avoid calling Read() with zero-sized buffer, to avoid needless firmware
quirkiness.
See: #25911
Lennart Poettering [Tue, 3 Jan 2023 15:26:55 +0000 (16:26 +0100)]
resolved: downgrade inability to send varlink reply error message
Previously, if a client disconnected after sending a lookup request but
before waiting for the reply we'd log at LOG_ERR level. That's
confusing, since it's entirely OK for the client to lose interest.
Hence, let's downgrade to debug level.
Fixes: #25892
Luca Boccassi [Tue, 3 Jan 2023 22:10:36 +0000 (23:10 +0100)]
Merge pull request #25910 from crrodriguez/wth_c2x
Fix FTBS when -std=gnu2x
msizanoen1 [Tue, 27 Dec 2022 04:57:12 +0000 (11:57 +0700)]
udev: match device tags in rules using current device tags
This ensures that udev scripts using `TAG-="..."` and expecting later
udev rules to honor it will work properly. An use case is removing the
`uaccess` tag from a device without overriding the original file and
ensuring that `73-seat-uaccess.rules` won't run the uaccess builtin later.
marcel151 [Sun, 1 Jan 2023 18:19:19 +0000 (19:19 +0100)]
Added Tablet Teclast X98 Air 3G (C5J6)
Latest BIOS of X98 Air 3G has later date, that's why it wasn't recognized. Uses the same Matrix as the X89 (E7ED).
Jia Zhang [Sat, 24 Dec 2022 09:46:01 +0000 (17:46 +0800)]
efi-api: check the EFI_TCG2_FINAL_EVENTS_TABLE in efi_has_tpm2()
The EFI firmware may provide the TPM2 event log using
EFI_TCG2_FINAL_EVENTS_TABLE stored in EFI configuration table,
instead of the ACPI Table TPM2.
If the ACPI Table TPM2 doesn't exist, try to check whether
EFI_TCG2_FINAL_EVENTS_TABLE is available or not.
Signed-off-by: Jia Zhang <zhang.jia@linux.alibaba.com>
Jan Janssen [Fri, 23 Dec 2022 13:14:53 +0000 (14:14 +0100)]
Revert "boot: Use EFI_BOOT_MANAGER_POLICY_PROTOCOL to connect console devices"
This reverts commit
b99bf5811850afdb2502ba37251c48348da63c82.
It seems that using this protocol on some firmwares to forcibly
initialize console devices may break handles (already opened file
handles and the device handle itself) that we rely on to access the
boot filesystem, making it impossible to load the selected entry.
It might be possible to get a new handle by querying for the device
handle by using its device path after calling into this protocol, but
this is untested. The firmware might also be so buggy that accessing
devices after using this protocol is impossible.
It seems prudent to revert this for now until some reliable way is found
to initialize console devices without introducing huge boot delays. Any
users on firmware where console devices cannot be accessed would have to
rely on disabling fastboot.
Fixes: #25737, #25846