]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
20 months agotree-wide: drop unused reference to DecryptedImage 24730/head
Yu Watanabe [Sun, 11 Sep 2022 15:07:17 +0000 (00:07 +0900)] 
tree-wide: drop unused reference to DecryptedImage

20 months agotree-wide: use dissected_image_relinquish()
Yu Watanabe [Sun, 11 Sep 2022 14:42:01 +0000 (23:42 +0900)] 
tree-wide: use dissected_image_relinquish()

20 months agodissect-image: introduce dissected_image_relinquish()
Yu Watanabe [Sun, 11 Sep 2022 14:23:22 +0000 (23:23 +0900)] 
dissect-image: introduce dissected_image_relinquish()

20 months agoMerge pull request #24720 from yuwata/dissect-image-take-reference
Daan De Meyer [Sun, 18 Sep 2022 14:08:13 +0000 (16:08 +0200)] 
Merge pull request #24720 from yuwata/dissect-image-take-reference

dissect-image: make DissectedImage object take reference to DecryptedImage and LoopDevice

20 months agoMerge pull request #24719 from yuwata/dissect-image-dissected-image-new
Yu Watanabe [Sun, 18 Sep 2022 13:41:49 +0000 (22:41 +0900)] 
Merge pull request #24719 from yuwata/dissect-image-dissected-image-new

dissect-image: introduce dissected_image_new()

20 months agosd-device: refuse block device without subsystem
Yu Watanabe [Sun, 18 Sep 2022 00:03:05 +0000 (09:03 +0900)] 
sd-device: refuse block device without subsystem

Previously, even if sd_device_get_subsystem() returns -ENOENT for block
device, we accepted that. This makes the check slightly stricter.

20 months agoMerge pull request #24691 from yuwata/udev-node-check-existence
Daan De Meyer [Sun, 18 Sep 2022 09:38:56 +0000 (11:38 +0200)] 
Merge pull request #24691 from yuwata/udev-node-check-existence

udev: check existence of device node

20 months agoMerge pull request #24710 from yuwata/test-50-dissect-cleanups
Daan De Meyer [Sun, 18 Sep 2022 09:21:30 +0000 (11:21 +0200)] 
Merge pull request #24710 from yuwata/test-50-dissect-cleanups

TEST-50-DISSECT: cleanups

20 months agodissect-image: free crypt_device object before trying to activate with unique name
Yu Watanabe [Sat, 17 Sep 2022 00:01:46 +0000 (09:01 +0900)] 
dissect-image: free crypt_device object before trying to activate with unique name

Otherwise we get error from libcryptsetup like the following:
systemd[1234]: Cannot use device /dev/loop5 which is in use (already mapped or mounted).

20 months agoudev: downgrade log level when device node is already removed
Yu Watanabe [Sat, 17 Sep 2022 21:03:14 +0000 (06:03 +0900)] 
udev: downgrade log level when device node is already removed

Follow-up for 790da548b0c37af60aed2f46867ba3885ea78718.

20 months agodissect-image: introduce DISSECTED_PARTITION_NULL 24719/head
Yu Watanabe [Fri, 9 Sep 2022 22:05:12 +0000 (07:05 +0900)] 
dissect-image: introduce DISSECTED_PARTITION_NULL

Currently, it is not necessary to set partno or architecture in
dissect_image_new(), but just for safety.
Preparation for later commits.

20 months agodissect-image: split out dissected_image_new()
Yu Watanabe [Fri, 9 Sep 2022 20:41:09 +0000 (05:41 +0900)] 
dissect-image: split out dissected_image_new()

To make dissect_image() shorter.
No functional changes, just refactoring.

20 months agodissect-image: take a reference of LoopDevice into DissectedImage 24720/head
Yu Watanabe [Sun, 11 Sep 2022 13:46:39 +0000 (22:46 +0900)] 
dissect-image: take a reference of LoopDevice into DissectedImage

To make LoopDevice object freed after DissectedImage is freed.
At least currently, this should not change anything. Preparation for
later commits.

20 months agoloop-util: introduce reference counter for LoopDevice
Yu Watanabe [Sun, 11 Sep 2022 13:41:03 +0000 (22:41 +0900)] 
loop-util: introduce reference counter for LoopDevice

20 months agodissect-image: take reference of DecryptedImage into DissectedImage
Yu Watanabe [Sun, 11 Sep 2022 14:08:25 +0000 (23:08 +0900)] 
dissect-image: take reference of DecryptedImage into DissectedImage

No functional changes. Preparation for later commits.

20 months agodissect-image: introduce reference counter for DecryptedImage
Yu Watanabe [Sun, 11 Sep 2022 14:07:29 +0000 (23:07 +0900)] 
dissect-image: introduce reference counter for DecryptedImage

20 months agodissect-image: lazily deactivate decrypted DM volumes 24667/head
Yu Watanabe [Wed, 14 Sep 2022 02:48:16 +0000 (11:48 +0900)] 
dissect-image: lazily deactivate decrypted DM volumes

The DM block device may be still used by other processes.

20 months agomeasure: rename measure_pcr() to measure_kernel()
Lennart Poettering [Sat, 17 Sep 2022 13:20:32 +0000 (15:20 +0200)] 
measure: rename measure_pcr() to measure_kernel()

Let's say what we actually measure, not what into (which is obvious
anyway).

This is generally more descriptive, but also good for later work that
allows measuring the boot phase too.

20 months agocryptsetup-util: introduce crypt_free_and_replace()
Yu Watanabe [Fri, 16 Sep 2022 18:24:26 +0000 (03:24 +0900)] 
cryptsetup-util: introduce crypt_free_and_replace()

20 months agoMerge pull request #24622 from yuwata/udev-open-with-noctty
Lennart Poettering [Sat, 17 Sep 2022 17:03:15 +0000 (19:03 +0200)] 
Merge pull request #24622 from yuwata/udev-open-with-noctty

udev: open with O_NOCTTY

20 months agoMerge pull request #24708 from keszybz/not-available-in-tables
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 16:16:42 +0000 (18:16 +0200)] 
Merge pull request #24708 from keszybz/not-available-in-tables

various: use "-" instead of "n/a" in tables

20 months agotest-50-dissect: do not fail test on cleanup 24710/head
Yu Watanabe [Sat, 17 Sep 2022 12:27:31 +0000 (21:27 +0900)] 
test-50-dissect: do not fail test on cleanup

These paths are read-only mount points. Hence, we cannot remove the
contents.

20 months agotest-50-dissect: check mount destination instead of mount source
Yu Watanabe [Sun, 11 Sep 2022 15:37:01 +0000 (00:37 +0900)] 
test-50-dissect: check mount destination instead of mount source

And rebreak long lines.

This should take no effective change, just refactoring.

20 months agoMerge pull request #24670 from keszybz/early-boot-ordering
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 11:26:51 +0000 (13:26 +0200)] 
Merge pull request #24670 from keszybz/early-boot-ordering

Early boot ordering

20 months agocoredumpctl: rename table entry 24708/head
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 10:20:33 +0000 (12:20 +0200)] 
coredumpctl: rename table entry

"Disk Size" could be mistaken for "Size of the Disk".

20 months agovarious: use "-" instead of "n/a" in tables
Zbigniew Jędrzejewski-Szmek [Sat, 17 Sep 2022 09:06:39 +0000 (11:06 +0200)] 
various: use "-" instead of "n/a" in tables

In the context of a table, both would be generally understood to have the same
meaning. "n/a" is a strange beast. It was useful when tables were produced on
the typewriter with "---------" used to separate rows. It is visually more
pleasing to use "-", and there is no risk of it being mistaken for a row
separator.

20 months agoMerge pull request #24703 from yuwata/dissect-image-verity-partition-make-fail
Daan De Meyer [Sat, 17 Sep 2022 07:57:20 +0000 (09:57 +0200)] 
Merge pull request #24703 from yuwata/dissect-image-verity-partition-make-fail

dissect-image: make verity_partition() actually fail when all attempts of activation failed

20 months agofd-util: rename CLOSE_AND_REPLACE() -> close_and_replace()
Yu Watanabe [Fri, 16 Sep 2022 16:57:04 +0000 (01:57 +0900)] 
fd-util: rename CLOSE_AND_REPLACE() -> close_and_replace()

We have free_and_replace() and friends, they are all named with lower
letters, even they are macros, not functions.
For consistency, let's rename CLOSE_AND_REPLACE() with lower letters.

This also mekes the macro used more places.

20 months agodissect-image: make verity_partition() actually fail when all attempts of activation... 24703/head
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

20 months agodissect-image: split out verity_timeout()
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.

20 months agoman: explicitly document that "reboot -f" is different from "systemctl reboot -f"
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.

20 months agonspawn: fix two error strings
Lennart Poettering [Fri, 16 Sep 2022 16:08:19 +0000 (18:08 +0200)] 
nspawn: fix two error strings

20 months agoadd CAP_LINUX_IMMUTABLE to systemd-machined, so it can handle machinectl read-only...
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.

20 months agosd-netlink: unexport sd-netlink
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.

20 months agoMerge pull request #24692 from yuwata/dissect-image-fix-memleak
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

20 months agoupdate TODO
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.

20 months agotmpfiles: let's suffix path to dirs with '/' also in log messages
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

20 months agotmpfiles: drop redundant forward declarations
Lennart Poettering [Sun, 11 Sep 2022 10:16:17 +0000 (12:16 +0200)] 
tmpfiles: drop redundant forward declarations

20 months agoMerge pull request #24664 from yuwata/watchdog
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

20 months agoMerge pull request #24688 from yuwata/watchdog-dbus-properties-follow-ups
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

20 months agojournalctl: respect --quiet flag during file concistency verification
Daniel Braunwarth [Fri, 16 Sep 2022 09:15:06 +0000 (11:15 +0200)] 
journalctl: respect --quiet flag during file concistency verification

Fixes #24563.

20 months agoMerge pull request #24685 from yuwata/uid-range
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

20 months agodissect-image: handle all non-negative return values as success 24692/head
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.

20 months agodissect-image: fix memleak on failure
Yu Watanabe [Wed, 14 Sep 2022 03:21:56 +0000 (12:21 +0900)] 
dissect-image: fix memleak on failure

20 months agoudev-node: do not create symlink to a non-existing device node 24691/head
Yu Watanabe [Tue, 13 Sep 2022 21:07:09 +0000 (06:07 +0900)] 
udev-node: do not create symlink to a non-existing device node

Previously, the stack directory contains empty regular files named with
device ID, and we create sd_device object from the device name.
Hence, we implicitly checked the existence of the device node.

However, now the files in the stack directory are symlink, and we
retrieve the path to the device node and its priority from the symlink.
Hence, the existence of the device node is not checked.
Let's check if the device node is still exist.

20 months agoudev-node: split out stack_directory_read_one()
Yu Watanabe [Mon, 12 Sep 2022 19:42:38 +0000 (04:42 +0900)] 
udev-node: split out stack_directory_read_one()

No functional changes, just refactoring.

20 months agowatchdog: use /dev/watchdog0 only if it exists 24664/head
Yu Watanabe [Tue, 13 Sep 2022 19:55:35 +0000 (04:55 +0900)] 
watchdog: use /dev/watchdog0 only if it exists

Fixes #24661.

20 months agoupdate TODO
Lennart Poettering [Thu, 15 Sep 2022 18:22:35 +0000 (19:22 +0100)] 
update TODO

20 months agopid1: drop redundant DBus properties 24688/head
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.

20 months agowatchdog: explicitly initialize global variable
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.

20 months agotest: add tests for uid_range_coalesce() 24685/head
Yu Watanabe [Fri, 16 Sep 2022 12:11:19 +0000 (21:11 +0900)] 
test: add tests for uid_range_coalesce()

20 months agouid-range: tie up number and array of uid range entries
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.

20 months agouid-range: make uid_range_intersect() take two UidRange objects
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.

20 months agouid-range: optimize to load uid_map file
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).

20 months agouid-range: escape from loop earlier
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.

20 months agouid-range: sort uid range entries in uid_range_coalesce()
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.

20 months agouid-range: use parse_uid_range()
Yu Watanabe [Fri, 16 Sep 2022 01:23:43 +0000 (10:23 +0900)] 
uid-range: use parse_uid_range()

20 months agouserdbctl: fix arrow direction
Yu Watanabe [Fri, 16 Sep 2022 02:57:45 +0000 (11:57 +0900)] 
userdbctl: fix arrow direction

20 months agouserdbctl: do not show meaningless boundaries when no uid range available
Yu Watanabe [Fri, 16 Sep 2022 02:54:55 +0000 (11:54 +0900)] 
userdbctl: do not show meaningless boundaries when no uid range available

20 months agosd-device-monitor: do not trigger assertion when uid_map is not empty
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.

20 months agoFix Positivo DUO k116 key toggle touchpad
drosdeck [Thu, 15 Sep 2022 19:41:01 +0000 (15:41 -0400)] 
Fix Positivo DUO k116 key toggle touchpad

20 months agoupdate TODO
Yu Watanabe [Thu, 15 Sep 2022 19:18:58 +0000 (04:18 +0900)] 
update TODO

20 months agoxdg-autostart-service: expand tilde in Exec lines
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.

20 months agounit: drop ProtectClock=yes from systemd-udevd.service
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.

20 months agofix typo in log
j00512545 [Thu, 15 Sep 2022 14:10:33 +0000 (22:10 +0800)] 
fix typo in log

20 months agounits: drop path to executable in $PATH 24670/head
Zbigniew Jędrzejewski-Szmek [Wed, 14 Sep 2022 12:05:25 +0000 (13:05 +0100)] 
units: drop path to executable in $PATH

We don't have it other places, so let's make things a bit simpler.

20 months agounits: make sure that initrd-switch-root.service pulls in .target
Zbigniew Jędrzejewski-Szmek [Wed, 14 Sep 2022 12:00:43 +0000 (13:00 +0100)] 
units: make sure that initrd-switch-root.service pulls in .target

Normally we queue initrd-switch-root.target/isolate, which pulls in the
service via Wants= in the .target unit file. But if the service is instead
started directly, there may be nothing pulling in the target. Let's make
sure that the reference exists.

20 months agounits: add dependency ordering for emergency.service conflicts
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 12:58:25 +0000 (14:58 +0200)] 
units: add dependency ordering for emergency.service conflicts

If we want to stop those services which would compete for access to
the console, we need to have an ordering so that they are actually
stopped before the other things starts, not asynchronously.

20 months agounits: add ordering dependencies on initrd-switch-root.target
Zbigniew Jędrzejewski-Szmek [Wed, 14 Sep 2022 11:39:10 +0000 (12:39 +0100)] 
units: add ordering dependencies on initrd-switch-root.target

For shutdown, we queue shutdown.target/start, so in every unit which should be
stopped *before* shutdown, we need both Conflicts and an ordering dependency
with shutdown.target (either Before= or After= would work, because stop jobs
are always ordered before start jobs).

For initrd transition, we queue initrd-switch-root.service/isolate. This
automatically creates a /stop job for every running unit without
IgnoreOnIsolate. But no ordering dependency is created, unless the unit has a
(possibly transitive) ordering dependency on initrd-switch-root.service.
Since most units must stop before the transition, we should add the ordering
dependency. It is nicer to use Before=initrd-switch-root.target for this.
initrd-switch-root.target is ordered before initrd-switch-root.service, so
the effect it the same when both are in a transaction.

Fixes #23745.

To also cover the case where somebody is emergency mode in the initrd and
queues initrd-switch-root.service/start (not isolate), also add
Conflicts=initrd-switch-root.target, so various units are stopped properly.
This extends 2525682565b372b9b83c848bfe89c025fed47a1d to cover all the other
services that are touched. It could be consider "operator error", but it's
easy to make and it's nicer if we can make this more foolproof.

20 months agounits/systemd-network-generator.service: add forgotten ordering for shutdown
Zbigniew Jędrzejewski-Szmek [Thu, 15 Sep 2022 10:22:42 +0000 (11:22 +0100)] 
units/systemd-network-generator.service: add forgotten ordering for shutdown

20 months agounits: reorder/split unit dependency blocks
Zbigniew Jędrzejewski-Szmek [Wed, 14 Sep 2022 11:39:10 +0000 (12:39 +0100)] 
units: reorder/split unit dependency blocks

The block is reordered and split to have:
  1. description + documentation
  2. (optionally) conditions
  3. all the dependencies
I think it's easier to read the units this way.
Also, the Conflicts+Before is seperated out to separate lines.
The ordering dependency is "fake", because it could just as well be
After=, we are adding it to force ordering wrt. shutdown.target, and
it plays a different role than the other Before=, which are about a
real ordering on boot.

20 months agotest-date: do not fail even on ~50 years later
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.

20 months agotest-seccomp: support systems that sched_setscheduler() is already limited
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.

20 months agomeson: add libatomic dependency
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>
20 months agobash-completion: add missing options to systemd-cryptenroll
Antonio Alvarez Feijoo [Thu, 15 Sep 2022 08:15:44 +0000 (10:15 +0200)] 
bash-completion: add missing options to systemd-cryptenroll

20 months agoMerge pull request #24671 from mrc0mmand/even-more-codeql
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

20 months agooom: include a header file instead of a source file
Frantisek Sumsal [Wed, 14 Sep 2022 18:36:40 +0000 (20:36 +0200)] 
oom: include a header file instead of a source file

20 months agotree-wide: fix typo
Yu Watanabe [Wed, 14 Sep 2022 21:03:57 +0000 (06:03 +0900)] 
tree-wide: fix typo

20 months agoci: fix a couple of typos 24671/head
Frantisek Sumsal [Wed, 14 Sep 2022 20:04:15 +0000 (22:04 +0200)] 
ci: fix a couple of typos

20 months agoci: enable a couple more possibly useful CodeQL queries
Frantisek Sumsal [Wed, 14 Sep 2022 19:32:33 +0000 (21:32 +0200)] 
ci: enable a couple more possibly useful CodeQL queries

20 months agoci: rename codeql-analysis.yml to codeql.yml
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.

20 months agopid1: introduce dbus properties WatchdogDevice and friends
Yu Watanabe [Tue, 13 Sep 2022 20:05:04 +0000 (05:05 +0900)] 
pid1: introduce dbus properties WatchdogDevice and friends

Closes #24665.

20 months agoMerge pull request #24669 from dtardon/nested-asserts
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

20 months agotree-wide: use nested ASSERT_PTR 24669/head
David Tardon [Fri, 9 Sep 2022 08:19:29 +0000 (10:19 +0200)] 
tree-wide: use nested ASSERT_PTR

20 months agomacro-fundamental: allow to nest 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);
        ...
}

20 months agoMerge pull request #24663 from mrc0mmand/codeql-follow-up
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

20 months agopstore: do not try to load all known pstore modules
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

20 months agoMerge pull request #24662 from mrc0mmand/test-exec-deserialization-tweaks
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()`

20 months agoci: limit scope for the CodeQL scan 24663/head
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.

20 months agoci: drop LGTM stuff and move remaining bits into a new location
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

20 months agoci: run CodeQL on push to main/stable branches as well
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.

20 months agotest: drop the use of `tempfile.mktemp()` 24662/head
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

20 months agotest: drop forgotten format()
Frantisek Sumsal [Tue, 13 Sep 2022 18:07:22 +0000 (20:07 +0200)] 
test: drop forgotten format()

Follow-up to fda00958bb08f2920cf8d42c5212fb45bdb42d6d.

20 months agoci: run CodeQL on every PR
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.

20 months agoxdg-autostart-service: Use common boolean parser
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".

20 months agoTODO: various things about partitioning
Zbigniew Jędrzejewski-Szmek [Sun, 4 Sep 2022 08:47:28 +0000 (10:47 +0200)] 
TODO: various things about partitioning

20 months agologind: schedule idle check full interval from now if we couldn't figure out atime...
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

20 months agoMerge pull request #24272 from dtardon/asserts
Yu Watanabe [Tue, 13 Sep 2022 12:08:10 +0000 (21:08 +0900)] 
Merge pull request #24272 from dtardon/asserts

Use ASSERT_PTR more

20 months agoboot: fix missing initialization
Yu Watanabe [Tue, 13 Sep 2022 07:57:11 +0000 (16:57 +0900)] 
boot: fix missing initialization

Fixes CID#1497847.

20 months agoMerge pull request #24651 from yuwata/openssl-util
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