Commit Graph
39855 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek eb5b6b7310 Merge pull request #24708 from keszybz/not-available-in-tables
various: use "-" instead of "n/a" in tables
2022-09-17 18:16:42 +02:00
Zbigniew Jędrzejewski-Szmek 7f8afa6dc1 coredumpctl: rename table entry
"Disk Size" could be mistaken for "Size of the Disk".
2022-09-17 13:12:49 +02:00
Zbigniew Jędrzejewski-Szmek 8a9651088f 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.
2022-09-17 13:05:51 +02:00
Daan De Meyer 9bf36477bf 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
2022-09-17 09:57:20 +02:00
Yu Watanabe ee3455cf11 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.
2022-09-17 09:54:41 +02:00
Yu Watanabe 9972e6d6ed dissect-image: make verity_partition() actually fail when all attempts of activation failed 2022-09-17 05:18:25 +09:00
Yu Watanabe ad361a50fb dissect-image: split out verity_timeout()
To make verity_partition() shorten. No functional changes, just
refactoring.
2022-09-17 05:18:25 +09:00
Lennart Poettering c941b65075 nspawn: fix two error strings 2022-09-17 05:15:02 +09:00
Yu Watanabe dd35a61caf sd-netlink: unexport sd-netlink
This effectively reverts 84e1001541.

The sd-netlink library has several issues, and we should not export it
without solving them. See issues #24258 and #24124.
2022-09-17 01:31:57 +09:00
Yu Watanabe 54ee1cd69d Merge pull request #24692 from yuwata/dissect-image-fix-memleak
dissect-image: fix memleak
2022-09-17 01:31:32 +09:00
Lennart Poettering c5be1ceb08 tmpfiles: let's suffix path to dirs with '/' also in log messages 2022-09-17 00:20:24 +09:00
Lennart Poettering 0af7e6ee73 tmpfiles: drop redundant forward declarations 2022-09-17 00:20:10 +09:00
Yu Watanabe ab8e6464b5 Merge pull request #24664 from yuwata/watchdog
watchdog: open /dev/watchdog0 only if it exists
2022-09-17 00:18:53 +09:00
Yu Watanabe e99b370ccb Merge pull request #24688 from yuwata/watchdog-dbus-properties-follow-ups
pid1: follow-ups for watchdog DBus properties
2022-09-17 00:18:05 +09:00
Daniel Braunwarth 43deb1a8dc journalctl: respect --quiet flag during file concistency verification
Fixes #24563.
2022-09-17 00:17:47 +09:00
Yu Watanabe 5bf5013fc9 dissect-image: handle all non-negative return values as success
No functional changes, just coding syle update.
2022-09-16 23:11:09 +09:00
Yu Watanabe 041e2edac8 dissect-image: fix memleak on failure 2022-09-16 23:11:09 +09:00
Yu Watanabe a6b7ebaafa watchdog: use /dev/watchdog0 only if it exists
Fixes #24661.
2022-09-16 22:34:37 +09:00
Yu Watanabe 3e911a0d0e pid1: drop redundant DBus properties
Follow-up for 10f3f4ed01.

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.
2022-09-16 21:53:28 +09:00
Yu Watanabe 9341f41801 watchdog: explicitly initialize global variable
No functional change, as they were implicitly initialized with zero.
2022-09-16 21:48:39 +09:00
Yu Watanabe 269073fda6 test: add tests for uid_range_coalesce() 2022-09-16 21:11:19 +09:00
Yu Watanabe 8dcc66cefc 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.
2022-09-16 20:56:58 +09:00
Yu Watanabe 6cc6cd9289 uid-range: make uid_range_intersect() take two UidRange objects
No functional changes, just refactoring.
2022-09-16 20:52:47 +09:00
Yu Watanabe f6c13f9f95 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).
2022-09-16 20:52:36 +09:00
Yu Watanabe b5739767da 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.
2022-09-16 20:50:00 +09:00
Yu Watanabe 34eeba475d 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.
2022-09-16 20:49:55 +09:00
Yu Watanabe 7cf337c50f uid-range: use parse_uid_range() 2022-09-16 20:48:53 +09:00
Yu Watanabe fb76e6a710 userdbctl: fix arrow direction 2022-09-16 20:48:53 +09:00
Yu Watanabe 3498609f08 userdbctl: do not show meaningless boundaries when no uid range available 2022-09-16 20:48:53 +09: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
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
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
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
Yu Watanabe 10f3f4ed01 pid1: introduce dbus properties WatchdogDevice and friends
Closes #24665.
2022-09-14 13:13:59 +01: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
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
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