]>
git.ipfire.org Git - thirdparty/systemd.git/log
Yu Watanabe [Fri, 16 Sep 2022 20:11:43 +0000 (05:11 +0900)]
dissect-image: make verity_partition() actually fail when all attempts of activation failed
Yu Watanabe [Fri, 16 Sep 2022 18:24:57 +0000 (03:24 +0900)]
dissect-image: split out verity_timeout()
To make verity_partition() shorten. No functional changes, just
refactoring.
Yu Watanabe [Fri, 16 Sep 2022 16:25:44 +0000 (01:25 +0900)]
man: explicitly document that "reboot -f" is different from "systemctl reboot -f"
Closes #24696.
Lennart Poettering [Fri, 16 Sep 2022 16:08:19 +0000 (18:08 +0200)]
nspawn: fix two error strings
Dan Streetman [Fri, 16 Sep 2022 14:50:59 +0000 (10:50 -0400)]
add CAP_LINUX_IMMUTABLE to systemd-machined, so it can handle machinectl read-only requests
Without this, the 'machinectl read-only ...' command always fails.
Yu Watanabe [Fri, 16 Sep 2022 14:20:46 +0000 (23:20 +0900)]
sd-netlink: unexport sd-netlink
This effectively reverts
84e1001541151da71bae2137e2a1c254b5a3b89f .
The sd-netlink library has several issues, and we should not export it
without solving them. See issues #24258 and #24124.
Yu Watanabe [Fri, 16 Sep 2022 16:31:32 +0000 (01:31 +0900)]
Merge pull request #24692 from yuwata/dissect-image-fix-memleak
dissect-image: fix memleak
Lennart Poettering [Fri, 16 Sep 2022 15:24:08 +0000 (16:24 +0100)]
update TODO
Seeding RNG via SMBIOS is bad idea, since often measurement of SMBIOS
tables is used for TPM policies, under the assumption SMBIOS remains
static after a certain point.
Lennart Poettering [Fri, 16 Sep 2022 12:53:35 +0000 (13:53 +0100)]
tmpfiles: let's suffix path to dirs with '/' also in log messages
Lennart Poettering [Sun, 11 Sep 2022 10:16:17 +0000 (12:16 +0200)]
tmpfiles: drop redundant forward declarations
Yu Watanabe [Fri, 16 Sep 2022 15:18:53 +0000 (00:18 +0900)]
Merge pull request #24664 from yuwata/watchdog
watchdog: open /dev/watchdog0 only if it exists
Yu Watanabe [Fri, 16 Sep 2022 15:18:05 +0000 (00:18 +0900)]
Merge pull request #24688 from yuwata/watchdog-dbus-properties-follow-ups
pid1: follow-ups for watchdog DBus properties
Daniel Braunwarth [Fri, 16 Sep 2022 09:15:06 +0000 (11:15 +0200)]
journalctl: respect --quiet flag during file concistency verification
Fixes #24563.
Yu Watanabe [Fri, 16 Sep 2022 15:16:07 +0000 (00:16 +0900)]
Merge pull request #24685 from yuwata/uid-range
uid-range: several cleanups
Yu Watanabe [Wed, 14 Sep 2022 03:25:08 +0000 (12:25 +0900)]
dissect-image: handle all non-negative return values as success
No functional changes, just coding syle update.
Yu Watanabe [Wed, 14 Sep 2022 03:21:56 +0000 (12:21 +0900)]
dissect-image: fix memleak on failure
Yu Watanabe [Tue, 13 Sep 2022 19:55:35 +0000 (04:55 +0900)]
watchdog: use /dev/watchdog0 only if it exists
Fixes #24661.
Lennart Poettering [Thu, 15 Sep 2022 18:22:35 +0000 (19:22 +0100)]
update TODO
Yu Watanabe [Fri, 16 Sep 2022 12:50:58 +0000 (21:50 +0900)]
pid1: drop redundant DBus properties
Follow-up for
10f3f4ed016b9fe92ca3d093fcfaed8278e69220 .
We already have RuntimeWatchdogUSec or friends. Let's not introduce
redundant properties.
Also, drop the const qualifier for WatchdogLastPingTimestamp, as they
are actually not constant.
Yu Watanabe [Fri, 16 Sep 2022 12:48:39 +0000 (21:48 +0900)]
watchdog: explicitly initialize global variable
No functional change, as they were implicitly initialized with zero.
Yu Watanabe [Fri, 16 Sep 2022 12:11:19 +0000 (21:11 +0900)]
test: add tests for uid_range_coalesce()
Yu Watanabe [Fri, 16 Sep 2022 01:52:00 +0000 (10:52 +0900)]
uid-range: tie up number and array of uid range entries
This renames UidRange -> UidRangeEntry, and reintroduces UidRange which
contains the array of UidRangeEntry and its size.
No fucntional changes, just refactoring.
Yu Watanabe [Fri, 16 Sep 2022 01:51:36 +0000 (10:51 +0900)]
uid-range: make uid_range_intersect() take two UidRange objects
No functional changes, just refactoring.
Yu Watanabe [Fri, 16 Sep 2022 01:40:14 +0000 (10:40 +0900)]
uid-range: optimize to load uid_map file
If uid_map contains many lines, then the previous logic takes O(n^2 log n),
This makes O(n log n).
Yu Watanabe [Fri, 16 Sep 2022 01:29:56 +0000 (10:29 +0900)]
uid-range: escape from loop earlier
The array of uid range entries are already sorted. Hence, if x and y are
does not have intersection, then the remaining entries neither have
intersection with x.
Yu Watanabe [Fri, 16 Sep 2022 01:20:55 +0000 (10:20 +0900)]
uid-range: sort uid range entries in uid_range_coalesce()
As the logic in uid_range_coalesce() assumes the array of entries are
already sorted.
No functional changes, just refactoring.
Yu Watanabe [Fri, 16 Sep 2022 01:23:43 +0000 (10:23 +0900)]
uid-range: use parse_uid_range()
Yu Watanabe [Fri, 16 Sep 2022 02:57:45 +0000 (11:57 +0900)]
userdbctl: fix arrow direction
Yu Watanabe [Fri, 16 Sep 2022 02:54:55 +0000 (11:54 +0900)]
userdbctl: do not show meaningless boundaries when no uid range available
Yu Watanabe [Fri, 16 Sep 2022 00:26:07 +0000 (09:26 +0900)]
sd-device-monitor: do not trigger assertion when uid_map is not empty
Follow-up for
c0aa23cf1ed4b3cbbcaf8b19d47e6e29dc28c9a0 .
drosdeck [Thu, 15 Sep 2022 19:41:01 +0000 (15:41 -0400)]
Fix Positivo DUO k116 key toggle touchpad
Yu Watanabe [Thu, 15 Sep 2022 19:18:58 +0000 (04:18 +0900)]
update TODO
David Edmundson [Wed, 14 Sep 2022 18:21:00 +0000 (19:21 +0100)]
xdg-autostart-service: expand tilde in Exec lines
In typical desktop file parsing it is expected that "~" expands to a
home directory.
Users may write an autostart file with "Exec=myCoolService
~/.someSpecialConfig" which worked before the systemd migration.
Yu Watanabe [Wed, 14 Sep 2022 21:07:22 +0000 (06:07 +0900)]
unit: drop ProtectClock=yes from systemd-udevd.service
This partially reverts
cabc1c6d7adae658a2966a4b02a6faabb803e92b .
The setting ProtectClock= implies DeviceAllow=, which is not suitable
for udevd. Although we are slowly removing cgropsv1 support, but
DeviceAllow= with cgroupsv1 is necessarily racy, and reloading PID1
during the early boot process may cause issues like #24668.
Let's disable ProtectClock= for udevd. And, if necessary, let's
explicitly drop CAP_SYS_TIME and CAP_WAKE_ALARM (and possibly others)
by using CapabilityBoundingSet= later.
Fixes #24668.
j00512545 [Thu, 15 Sep 2022 14:10:33 +0000 (22:10 +0800)]
fix typo in log
Yu Watanabe [Sun, 11 Sep 2022 18:02:31 +0000 (03:02 +0900)]
test-date: do not fail even on ~50 years later
Fixes #16181.
Yu Watanabe [Sun, 11 Sep 2022 20:13:30 +0000 (05:13 +0900)]
test-seccomp: support systems that sched_setscheduler() is already limited
Fixes #17078.
Heinrich Schuchardt [Mon, 12 Sep 2022 16:41:34 +0000 (18:41 +0200)]
meson: add libatomic dependency
Building with GCC 12.2 and binutils 2.39 fails on riscv64 Ubuntu Kinetic
with:
FAILED: systemd-oomd
/usr/bin/ld: systemd-oomd.p/src_oom_oomd-util.c.o:
in function `oomd_cgroup_context_acquire':
build/../src/oom/oomd-util.c:415:
undefined reference to `__atomic_exchange_1'
We have to link with -latomic.
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Antonio Alvarez Feijoo [Thu, 15 Sep 2022 08:15:44 +0000 (10:15 +0200)]
bash-completion: add missing options to systemd-cryptenroll
Yu Watanabe [Wed, 14 Sep 2022 21:22:36 +0000 (06:22 +0900)]
Merge pull request #24671 from mrc0mmand/even-more-codeql
ci: enable a couple more possibly useful CodeQL queries
Frantisek Sumsal [Wed, 14 Sep 2022 18:36:40 +0000 (20:36 +0200)]
oom: include a header file instead of a source file
Yu Watanabe [Wed, 14 Sep 2022 21:03:57 +0000 (06:03 +0900)]
tree-wide: fix typo
Frantisek Sumsal [Wed, 14 Sep 2022 20:04:15 +0000 (22:04 +0200)]
ci: fix a couple of typos
Frantisek Sumsal [Wed, 14 Sep 2022 19:32:33 +0000 (21:32 +0200)]
ci: enable a couple more possibly useful CodeQL queries
Frantisek Sumsal [Wed, 14 Sep 2022 17:13:10 +0000 (19:13 +0200)]
ci: rename codeql-analysis.yml to codeql.yml
Just to be consistent with other repos under the systemd umbrella.
Yu Watanabe [Tue, 13 Sep 2022 20:05:04 +0000 (05:05 +0900)]
pid1: introduce dbus properties WatchdogDevice and friends
Closes #24665.
Yu Watanabe [Wed, 14 Sep 2022 11:27:07 +0000 (20:27 +0900)]
Merge pull request #24669 from dtardon/nested-asserts
Use nested ASSERT_PTR
David Tardon [Fri, 9 Sep 2022 08:19:29 +0000 (10:19 +0200)]
tree-wide: use nested ASSERT_PTR
David Tardon [Fri, 9 Sep 2022 08:04:36 +0000 (10:04 +0200)]
macro-fundamental: allow to nest ASSERT_PTR
E.g.,
int job_frobnicate(Job *j) {
Unit *u = ASSERT_PTR(ASSERT_PTR(j)->unit);
...
}
Yu Watanabe [Tue, 13 Sep 2022 20:31:10 +0000 (05:31 +0900)]
Merge pull request #24663 from mrc0mmand/codeql-follow-up
A couple of CodeQL tweaks and follow ups
Nick Rosbrook [Wed, 7 Sep 2022 17:25:13 +0000 (13:25 -0400)]
pstore: do not try to load all known pstore modules
Commit
70e74a5997 ("pstore: Run after modules are loaded") added After=
and Wants= entries for all known kernel modules providing a pstore.
While adding these dependencies on systems where one of the modules is
not present, or not configured, should not have a real affect on the
system, it can produce annoying error messages in the kernel log. E.g.
"mtd device must be supplied (device name is empty)" when the mtdpstore
module is not configured correctly.
Since dependencies cannot be removed with drop-ins, if a distro wants to
remove some of these modules from systemd-pstore.service, they need to
patch units/systemd-pstore.service.in. On the other hand, if they want
to append to the dependencies this can be done by shipping a drop-in.
Since the original intent of the previous commit was to fix [1], which
only requires the efi_pstore module, remove all other kernel module
dependencies from systemd-pstore.service, and let distros ship drop-ins
to add dependencies if needed.
[1] https://github.com/systemd/systemd/issues/18540
Yu Watanabe [Tue, 13 Sep 2022 20:29:00 +0000 (05:29 +0900)]
Merge pull request #24662 from mrc0mmand/test-exec-deserialization-tweaks
test: drop the use of `tempfile.mktemp()`
Frantisek Sumsal [Tue, 13 Sep 2022 19:30:10 +0000 (21:30 +0200)]
ci: limit scope for the CodeQL scan
Don't run the workflow unnecessarily for non-{cpp,python} related changes.
Frantisek Sumsal [Tue, 13 Sep 2022 19:28:00 +0000 (21:28 +0200)]
ci: drop LGTM stuff and move remaining bits into a new location
Frantisek Sumsal [Tue, 13 Sep 2022 19:18:44 +0000 (21:18 +0200)]
ci: run CodeQL on push to main/stable branches as well
Since we need results for the base branches as well in order to have
something to compare against.
Follow-up to
cbe25d0dccdd3f2901a1e74a665c068f42dae9f5 .
Frantisek Sumsal [Tue, 13 Sep 2022 18:14:48 +0000 (20:14 +0200)]
test: drop the use of `tempfile.mktemp()`
and use `uuid.uuid4()` instead to generate a sufficiently pseudo-random
file name.
Resolves: https://github.com/systemd/systemd/security/code-scanning/142
Frantisek Sumsal [Tue, 13 Sep 2022 18:07:22 +0000 (20:07 +0200)]
test: drop forgotten format()
Follow-up to
fda00958bb08f2920cf8d42c5212fb45bdb42d6d .
Frantisek Sumsal [Tue, 13 Sep 2022 17:11:25 +0000 (19:11 +0200)]
ci: run CodeQL on every PR
Since LGTM is no longer enabled for the systemd repo (as it's going to
be discontinued by the EOY), let's run CodeQL on every PR instead to
replace it.
David Edmundson [Tue, 13 Sep 2022 12:06:09 +0000 (13:06 +0100)]
xdg-autostart-service: Use common boolean parser
Technically the desktop entry specification says value should be the
string "true" or "false". Pragmatically every desktop has their own
parsing rules which are typically less strict on how to interpret other
values.
This caused some regressions downstream when we switched to the
xdg-autostart-generator where existing handmade files contained values
with "True" or "False".
Zbigniew Jędrzejewski-Szmek [Sun, 4 Sep 2022 08:47:28 +0000 (10:47 +0200)]
TODO: various things about partitioning
Michal Sekletar [Fri, 9 Sep 2022 11:38:58 +0000 (13:38 +0200)]
logind: schedule idle check full interval from now if we couldn't figure out atime timestamp
Yu Watanabe [Tue, 13 Sep 2022 12:08:10 +0000 (21:08 +0900)]
Merge pull request #24272 from dtardon/asserts
Use ASSERT_PTR more
Yu Watanabe [Tue, 13 Sep 2022 07:57:11 +0000 (16:57 +0900)]
boot: fix missing initialization
Fixes CID#
1497847 .
Yu Watanabe [Tue, 13 Sep 2022 12:05:42 +0000 (21:05 +0900)]
Merge pull request #24651 from yuwata/openssl-util
openssl-util: trivial cleanups
Yu Watanabe [Tue, 13 Sep 2022 08:07:50 +0000 (17:07 +0900)]
creds-util: fix NULL pointer dereference
Fixes CID#
1497840 .
Yu Watanabe [Tue, 13 Sep 2022 08:03:01 +0000 (17:03 +0900)]
openssl-util: use assert() if no side effect
Yu Watanabe [Tue, 13 Sep 2022 08:01:26 +0000 (17:01 +0900)]
openssl-util: drop meaningless assertion
As the type of 'msz' is int.
Fixes CID#
1497842 .
David Tardon [Fri, 9 Sep 2022 08:31:24 +0000 (10:31 +0200)]
dbus-execute: inline variable definition
Fixes a compiler warning:
../src/core/dbus-execute.c:460:22: error: unused variable 'c' [-Werror,-Wunused-variable]
ExecContext *c = ASSERT_PTR(userdata);
David Tardon [Wed, 10 Aug 2022 12:00:53 +0000 (14:00 +0200)]
tree-wide: check parameter before dereferencing
David Tardon [Tue, 9 Aug 2022 12:35:15 +0000 (14:35 +0200)]
tree-wide: use ASSERT_PTR more
Yu Watanabe [Mon, 12 Sep 2022 14:41:00 +0000 (23:41 +0900)]
Merge pull request #23087 from yuwata/udev-watch
udev: resolve race in saving inotify watch handle
Yu Watanabe [Mon, 12 Sep 2022 14:40:34 +0000 (23:40 +0900)]
Merge pull request #23043 from yuwata/udev-node-use-flock
udev-node: use flock() for symlink stack directory
Ansgar Burchardt [Mon, 12 Sep 2022 12:55:14 +0000 (14:55 +0200)]
base-filesystem.c: add trailing zero byte for s390x entry
Hans de Goede [Mon, 29 Aug 2022 15:28:37 +0000 (17:28 +0200)]
hwdb: Fix Acer Aspire One AOD270/Packard Bell Dot keymappings
The Acer Aspire One AOD270 and the same hardware rebranded as
Packard Bell Dot SC need a couple of keymap fixups:
1. The switch-video-mode key does not do anything. Standard acer-wmi
maps scancode 0x61 to KEY_IGNORE since typically these events are
duplicate with the ACPI video bus. But on these models the ACPI video
bus does not send events for this key, so map it.
2. The Brightness up / down hotkeys send atkbd scancode 0xce / 0xef
which by default are mapped to KEY_KPPLUSMINUS and KEY_MACRO.
These actually are duplicate events with the ACPI video bus,
so map these to KEY_IGNORE.
Lennart Poettering [Sun, 11 Sep 2022 23:13:44 +0000 (00:13 +0100)]
update TODO
Lennart Poettering [Sun, 11 Sep 2022 23:13:44 +0000 (00:13 +0100)]
update TODO
Yu Watanabe [Thu, 28 Apr 2022 10:28:11 +0000 (19:28 +0900)]
test: add testcase for udev-watch
Yu Watanabe [Thu, 14 Apr 2022 21:38:33 +0000 (06:38 +0900)]
sd-device: move device_new_from_watch_handle_at() to udev-watch.c
And drop unused watch handle related functions.
Yu Watanabe [Thu, 28 Apr 2022 07:42:12 +0000 (16:42 +0900)]
udev: warn on udev_watch_{begin,end}() failure
Yu Watanabe [Thu, 28 Apr 2022 07:39:49 +0000 (16:39 +0900)]
udev: drop unnecessary call of udev_watch_end()
As it is already called by udev_event_execute_rules().
Yu Watanabe [Thu, 28 Apr 2022 06:54:06 +0000 (15:54 +0900)]
udev: use rm_rf() to remove old watch directory
Yu Watanabe [Thu, 14 Apr 2022 21:31:21 +0000 (06:31 +0900)]
udev-watch: remove symlink for saving inotify watch handle only when it is owned by the processing device
Before removing symlinks that stores watch handles, this makes udev
worker check if the symlink is owned by the processing device.
Then, we can avoid TOCTOU and drop the try-and-wait loop.
This partially reverts
2d3af41f0e837390b734253f5c4a99a9f33c53e3 .
Yu Watanabe [Fri, 15 Apr 2022 00:42:15 +0000 (09:42 +0900)]
udev: ignore IN_IGNORED inotify event earlier
Yu Watanabe [Thu, 14 Apr 2022 21:08:13 +0000 (06:08 +0900)]
udev: not necessary to return 1 from on_inotify()
Yu Watanabe [Sun, 11 Sep 2022 16:17:36 +0000 (01:17 +0900)]
Merge pull request #24637 from mrc0mmand/TEST-75-tweaks
test: make the resolved notifications check a bit more robust
Frantisek Sumsal [Sun, 11 Sep 2022 12:17:56 +0000 (14:17 +0200)]
test: make the resolved notifications check a bit more robust
Let's parse the resolved JSON notifications via `jq` and check them in a
bit more "controlled" manner - e.g. until now the `grep` was checking just
a one gigantic JSON string, as all received notifications via the
varlink socket are terminated by a NUL character, not a newline.
Also, as the notification delivery is asynchronous, retry the check
a couple of times if it fails (spotted in C8S jobs):
```
[ 2891.935879] testsuite-75.sh[36]: + : '--- nss-resolve/nss-myhostname tests'
[ 2891.935988] testsuite-75.sh[36]: + run getent -s resolve hosts ns1.unsigned.test
[ 2891.936542] testsuite-75.sh[177]: + getent -s resolve hosts ns1.unsigned.test
[ 2891.937499] testsuite-75.sh[178]: + tee /tmp/tmp.pqjNvbQ2eS
[ 2891.939977] testsuite-75.sh[178]: 10.0.0.1 ns1.unsigned.test
[ 2891.940258] testsuite-75.sh[36]: + grep -qE '^10\.0\.0\.1\s+ns1\.unsigned\.test' /tmp/tmp.pqjNvbQ2eS
[ 2891.942235] testsuite-75.sh[189]: + grep -qF '[10,0,0,1]'
[ 2891.942577] testsuite-75.sh[188]: + grep -aF ns1.unsigned.test /tmp/notifications.txt
[ 2891.943978] systemd[1]: testsuite-75.service: Child 36 belongs to testsuite-75.service.
[ 2891.944112] systemd[1]: testsuite-75.service: Main process exited, code=exited, status=1/FAILURE
[ 2891.944215] systemd[1]: testsuite-75.service: Failed with result 'exit-code'.
```
Frantisek Sumsal [Sun, 11 Sep 2022 12:16:34 +0000 (14:16 +0200)]
test: install jq into all images
Frantisek Sumsal [Sat, 10 Sep 2022 19:42:26 +0000 (19:42 +0000)]
Merge pull request #24593 from jamacku/main
Update `advanced-issue-labeler` action - `@v1` -> `@v2`
Lennart Poettering [Fri, 9 Sep 2022 21:06:58 +0000 (23:06 +0200)]
tpm2-util: avoid trial
Let's avoid trial mode for putting together policies if we can, and use
the real policy whenever we can pull it off.
Fixes: #24401
Yu Watanabe [Fri, 9 Sep 2022 18:21:37 +0000 (03:21 +0900)]
test-29-portable: set timeout for 'portablectl reattach'
Then, the test can fail earlier than the timeout of the whole test
specified by $QEMU_TIMEOUT=.
This is useful when we try to run the test multiple times.
Workaround for issue #24147.
Yu Watanabe [Fri, 9 Sep 2022 17:52:54 +0000 (02:52 +0900)]
Merge pull request #24618 from yuwata/udev-split-synthesizing
udev: shorten synthesize_change() a bit
Yu Watanabe [Fri, 9 Sep 2022 15:33:43 +0000 (00:33 +0900)]
blockdev-util: split out blockdev_reread_partition_table()
No functional changes, just refactoring.
Lennart Poettering [Fri, 9 Sep 2022 16:18:37 +0000 (18:18 +0200)]
Merge pull request #24458 from poettering/stub-embedd-sig
optionally, embed PCR signature and public key in new sd-stub PE sections
Yu Watanabe [Fri, 9 Sep 2022 15:17:46 +0000 (00:17 +0900)]
udevd: use partition enumerator at one more place
No functional changes, just refactoring.
Yu Watanabe [Fri, 9 Sep 2022 14:32:15 +0000 (23:32 +0900)]
Merge pull request #24609 from yuwata/sd-device-enumerator-check-sysname
sd-device-enumerator: check sysname earlier
Yu Watanabe [Fri, 9 Sep 2022 14:31:19 +0000 (23:31 +0900)]
Merge pull request #24611 from yuwata/loop-util-refactoring
loop-util: several cleanups
Yu Watanabe [Thu, 8 Sep 2022 20:25:55 +0000 (05:25 +0900)]
blockdevi-util: also check sysname when enumerating partitions
Yu Watanabe [Fri, 9 Sep 2022 11:55:45 +0000 (20:55 +0900)]
sd-device-enumerator: use _cleanup_free_ attribute for safety
No functional changes, just improve readability.
Suggested by https://github.com/systemd/systemd/pull/24601#discussion_r966883459.
Yu Watanabe [Fri, 9 Sep 2022 11:52:41 +0000 (20:52 +0900)]
sd-device-enumerator: always ignore ENOENT from opendir()
But logs all errors.
Yu Watanabe [Thu, 8 Sep 2022 19:26:15 +0000 (04:26 +0900)]
sd-device-enumerator: check sysname earlier