Commit Graph

69261 Commits

Author SHA1 Message Date
Mike Yuan
ced3e6bc0e elf2efi: remove outdated comment mentioning linker script
Follow-up for 142f0c61a3
2023-12-10 12:50:14 +00:00
Yu Watanabe
fca212b022 resolve: fix wrong error cause assignment to log_debug_errno()
Fixes #30392.
2023-12-10 17:47:36 +08:00
Mike Yuan
c8f7c9a11d core/exec-invoke: sigwait() returns positive errno and never EINTR
Follow-up for 5b6319dcee (gosh this is
ancient), and effectively reverts 3dead8d925.

sigwait() is documented to "suspend execution of the calling thread
until one of the signals specified in the signal set becomes pending".
And the only error it returns is EINVAL, when "set contains an invalid
signal number". Therefore, there's no need to run it in a loop or
to check for runtime error.
2023-12-10 09:44:44 +01:00
Yu Watanabe
a753d30303 systemctl: fix typo
Follow-up for 329050c5e2.
2023-12-10 14:26:33 +09:00
Yu Watanabe
0500f755fc networkctl: fix typo
Follow-up for 2b98926f98.
2023-12-10 14:25:33 +09:00
Mike Yuan
ba8245a77a core/executor: do destruct static variables and selinux before exiting
I was wondering why I couldn't trigger the assertion in safe_fclose()
when submitting #30251. It turned out that the static destructor was
not run at all :/

Replace main() with a minimized version of main-func.h. This also
prevents emitting negative exit codes.
2023-12-10 14:13:35 +09:00
Yu Watanabe
f1e89cb9b1 Merge pull request #30399 from YHNdnzj/memory-accounting-always-peak
systemctl-show: always show memory peak if available
2023-12-10 14:11:05 +09:00
Mike Yuan
8ad973ed99 hibernate-util: de-duplicate clear_efi_hibernate_location 2023-12-10 14:08:46 +09:00
Yu Watanabe
3a4e3d4f9e Merge pull request #30400 from bluca/coverity
Assorted coverity fixes
2023-12-10 14:07:37 +09:00
Luca Boccassi
3b3bce04f0 test-login: remove dead code
HANDLE_SLEEP is == _HANDLE_ACTION_SLEEP_LAST and the loop is bounded
by < _HANDLE_ACTION_SLEEP_LAST, so no need to check for it

CID#1529414
2023-12-09 13:17:02 +00:00
Luca Boccassi
2343f6b11e logind: use ASSERT_PTR to validate result before use
handle_action_lookup() in general can return NULL, but not
here as the handle is checked before, so add an assert.

CID#1529415
CID#1529416
2023-12-09 13:17:02 +00:00
Luca Boccassi
fc9d7ddbac systemctl: fix copy/paste
on_circle is set twice to the same value

CID#1529418
2023-12-09 13:17:02 +00:00
Luca Boccassi
5572e9d82f journal-remote: set upper length bound when parsing incoming headers
CID#1529420
2023-12-09 13:17:02 +00:00
Mike Yuan
2747cd6d17 systemctl-show: always show memory peak if available 2023-12-09 20:42:48 +08:00
Mike Yuan
ad009380e1 core/cgroup: cache the last memory usage values before destroying cgroup
Currently, memory accounting values are only cached if it was queued
at least once before destroying cgroup. Let's always cache it like
what we already do for CPU usage.

Preparation for later changes.
2023-12-09 20:42:48 +08:00
Luca Boccassi
9614dd542b mount: check that MountParameters is valid before use
Follow-up for 6c75eff6af

CID#1530430
2023-12-09 11:57:01 +00:00
Florian Schmaus
7ba8260c46 NEWS: fix typo s/show/shown/ 2023-12-09 19:44:20 +08:00
Luca Boccassi
1d13163520 Merge pull request #30387 from mrc0mmand/TEST-17-tweaks
test: a couple of tweaks for TEST-17-UDEV
2023-12-09 11:06:37 +00:00
Mike Yuan
32a0004c62 Merge pull request #30384 from YHNdnzj/rename-process
core/executor: save argv for later use by rename_process()
2023-12-09 19:04:07 +08:00
Yu Watanabe
2b2f192a0e Merge pull request #30362 from mrc0mmand/cat-highlight-directives
shared: highlight directives when dumping configs
2023-12-09 18:54:46 +09:00
Zbigniew Jędrzejewski-Szmek
ba056e146a Revert "packit: don't take ownership of /etc/ssh/sshd_config.d/"
This reverts commit 9f7d189923.
systemd.spec was updated in [1], so we don't need this here anymore.

[1] 245a2587e0
2023-12-08 19:12:19 +00:00
Frantisek Sumsal
e23fc070e2 test: backup /etc/udev/udev.conf only if it exists
On Fedora systemd recently moved all of its configuration files to
/usr/lib/ [0], so make sure we account for this case as well.

[   42.450325] testsuite-17.sh[800]: + mkdir -p /run/udev/rules.d
[   42.466504] testsuite-17.sh[800]: + cp -f /etc/udev/udev.conf /etc/udev/udev.conf.bckp
[   42.503348] testsuite-17.sh[802]: cp: cannot stat '/etc/udev/udev.conf': No such file or directory

[0] 29eb35530b
2023-12-08 18:38:41 +01:00
Frantisek Sumsal
ad23ff13de test: reset systemd-udevd.service restart counter
Since we restart systemd-udevd here a couple of times, we might hit the
rate limit in later tests:

[   26.028355] testsuite-17.sh[2074]: + udevadm control -e
[   26.028355] testsuite-17.sh[2074]: + udevadm control -l emerg
[   26.126160] systemd[1]: systemd-udevd.service: Start request repeated too quickly.
[   26.126213] systemd[1]: systemd-udevd.service: Failed with result 'start-limit-hit'.
[   26.140310] systemd[1]: Failed to start systemd-udevd.service.
[   26.140897] systemd[1]: systemd-udevd-control.socket: Failed with result 'service-start-limit-hit'.
[   26.141286] systemd[1]: systemd-udevd-kernel.socket: Failed with result 'service-start-limit-hit'.
[   26.142225] testsuite-17.sh[2074]: + udevadm control -l alert
[   26.149206] udevadm[2088]: Failed to send request to set log level: No such file or directory

Follow-up to: 6ef512c0bb
2023-12-08 18:14:05 +01:00
Mike Yuan
b041175e08 core/executor: save argv for later use by rename_process()
Partially fixes #30352
2023-12-08 21:49:27 +08:00
Mike Yuan
c0e82e3a23 core/exec-invoke: voidify one rename_process call 2023-12-08 19:46:53 +08:00