Commit graph

59829 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 92e7202812 headers: export partition uuids and flags in new sd-gpt.h file
I think those constants are generally useful. It's quite easy to make a mistake
when copying things from the docs, so let's make them easy and convenient to
access.
2022-09-20 16:48:50 +02:00
Zbigniew Jędrzejewski-Szmek b66a6e1a58 man: "the initial RAM disk" → "the initrd"
In many places we spelled out the phrase behind "initrd" in full, but this
isn't terribly useful. In fact, no "RAM disk" is used, so emphasizing this
is just confusing to the reader. Let's just say "initrd" everywhere, people
understand what this refers to, and that it's in fact an initramfs image.

Also, s/i.e./e.g./ where appropriate.

Also, don't say "in RAM", when in fact it's virtual memory, whose pages
may or may not be loaded in page frames in RAM, and we have no control over
this.

Also, add <filename></filename> and other minor cleanups.
2022-09-20 16:48:50 +02:00
Zbigniew Jędrzejewski-Szmek 483bf5643a man: add missing subject in sentence 2022-09-17 13:12:22 +02:00
Lennart Poettering 72a773775d update TODO 2022-09-16 13:57:05 +01:00
Yu Watanabe f91c23f785 sd-device-monitor: do not trigger assertion when uid_map is not empty
Follow-up for c0aa23cf1e.
2022-09-16 13:05:51 +02:00
drosdeck 05d5db01b7 Fix Positivo DUO k116 key toggle touchpad 2022-09-16 08:23:52 +09:00
Yu Watanabe 8cfde28b61 update TODO 2022-09-16 04:18:58 +09:00
David Edmundson 8c0a6a96fe 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.
2022-09-16 03:43:17 +09:00
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
David Edmundson 38429cb1e3 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".
2022-09-14 03:54:28 +09:00
Zbigniew Jędrzejewski-Szmek d01d9197f5 TODO: various things about partitioning 2022-09-13 15:52:33 +01:00
Michal Sekletar ab7ae746c6 logind: schedule idle check full interval from now if we couldn't figure out atime timestamp 2022-09-13 21:11:34 +09:00
Yu Watanabe 6f2d367e49
Merge pull request #24272 from dtardon/asserts
Use ASSERT_PTR more
2022-09-13 21:08:10 +09:00
Yu Watanabe 63d18b6cd0 boot: fix missing initialization
Fixes CID#1497847.
2022-09-13 21:06:05 +09:00
Yu Watanabe e51bea3433
Merge pull request #24651 from yuwata/openssl-util
openssl-util: trivial cleanups
2022-09-13 21:05:42 +09:00
Yu Watanabe 35aefda35f creds-util: fix NULL pointer dereference
Fixes CID#1497840.
2022-09-13 21:05:16 +09:00
Yu Watanabe 2e64df07b8 openssl-util: use assert() if no side effect 2022-09-13 17:03:34 +09:00
Yu Watanabe d39929d96d openssl-util: drop meaningless assertion
As the type of 'msz' is int.

Fixes CID#1497842.
2022-09-13 17:03:18 +09:00
David Tardon 48b7490985 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);
2022-09-13 08:13:43 +02:00
David Tardon c9958c4fc5 tree-wide: check parameter before dereferencing 2022-09-13 08:13:42 +02:00
David Tardon 995340074e tree-wide: use ASSERT_PTR more 2022-09-13 08:13:27 +02:00
Yu Watanabe 6d64cb0625
Merge pull request #23087 from yuwata/udev-watch
udev: resolve race in saving inotify watch handle
2022-09-12 23:41:00 +09:00
Yu Watanabe 75a5a143bb
Merge pull request #23043 from yuwata/udev-node-use-flock
udev-node: use flock() for symlink stack directory
2022-09-12 23:40:34 +09:00
Ansgar Burchardt 4167e2135e base-filesystem.c: add trailing zero byte for s390x entry 2022-09-12 23:35:09 +09:00
Hans de Goede 5092f7c86d 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.
2022-09-12 22:02:54 +09:00
Lennart Poettering 1135779156 update TODO 2022-09-12 11:03:42 +01:00