Commit Graph

59821 Commits

Author SHA1 Message Date
Yu Watanabe
f562abe296 unit: drop ProtectClock=yes from systemd-udevd.service
This partially reverts cabc1c6d7a.

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.
2022-09-16 03:41:29 +09:00
j00512545
365c2885f0 fix typo in log 2022-09-15 17:46:04 +02:00
Yu Watanabe
88ffd21014 test-date: do not fail even on ~50 years later
Fixes #16181.
2022-09-15 13:48:55 +01:00
Yu Watanabe
a900274915 test-seccomp: support systems that sched_setscheduler() is already limited
Fixes #17078.
2022-09-15 13:47:17 +01:00
Heinrich Schuchardt
132c73b57a 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>
2022-09-15 13:44:11 +01:00
Antonio Alvarez Feijoo
82ff978d0b bash-completion: add missing options to systemd-cryptenroll 2022-09-15 13:40:23 +01:00
Yu Watanabe
f539452505 Merge pull request #24671 from mrc0mmand/even-more-codeql
ci: enable a couple more possibly useful CodeQL queries
2022-09-15 06:22:36 +09:00
Frantisek Sumsal
797b1987ae oom: include a header file instead of a source file 2022-09-15 06:22:03 +09:00
Yu Watanabe
af3d387365 tree-wide: fix typo 2022-09-15 06:03:57 +09:00
Frantisek Sumsal
9fe61660ba ci: fix a couple of typos 2022-09-14 22:09:19 +02:00
Frantisek Sumsal
5e781e07db ci: enable a couple more possibly useful CodeQL queries 2022-09-14 22:09:19 +02:00
Frantisek Sumsal
d97733908b ci: rename codeql-analysis.yml to codeql.yml
Just to be consistent with other repos under the systemd umbrella.
2022-09-14 19:13:49 +02:00
Yu Watanabe
10f3f4ed01 pid1: introduce dbus properties WatchdogDevice and friends
Closes #24665.
2022-09-14 13:13:59 +01:00
Yu Watanabe
908eb7be58 Merge pull request #24669 from dtardon/nested-asserts
Use nested ASSERT_PTR
2022-09-14 20:27:07 +09:00
David Tardon
fbd747a46f tree-wide: use nested ASSERT_PTR 2022-09-14 08:21:42 +02:00
David Tardon
23cd002562 macro-fundamental: allow to nest ASSERT_PTR
E.g.,

int job_frobnicate(Job *j) {
        Unit *u = ASSERT_PTR(ASSERT_PTR(j)->unit);
        ...
}
2022-09-14 08:21:40 +02:00
Yu Watanabe
c9bc7a449c Merge pull request #24663 from mrc0mmand/codeql-follow-up
A couple of CodeQL tweaks and follow ups
2022-09-14 05:31:10 +09:00
Nick Rosbrook
8b8bd621e1 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
2022-09-14 05:30:03 +09:00
Yu Watanabe
d0b387b617 Merge pull request #24662 from mrc0mmand/test-exec-deserialization-tweaks
test: drop the use of `tempfile.mktemp()`
2022-09-14 05:29:00 +09:00
Frantisek Sumsal
736a1df747 ci: limit scope for the CodeQL scan
Don't run the workflow unnecessarily for non-{cpp,python} related changes.
2022-09-13 21:32:15 +02:00
Frantisek Sumsal
774cf0d8fd ci: drop LGTM stuff and move remaining bits into a new location 2022-09-13 21:32:15 +02:00
Frantisek Sumsal
27d6281158 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 cbe25d0dcc.
2022-09-13 21:18:44 +02:00
Frantisek Sumsal
5a634f2ec0 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
2022-09-13 21:03:04 +02:00
Frantisek Sumsal
2a843ec832 test: drop forgotten format()
Follow-up to fda00958bb.
2022-09-13 21:03:04 +02:00
Frantisek Sumsal
cbe25d0dcc 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.
2022-09-14 03:55:16 +09:00