1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-10 05:18:17 +03:00
Commit Graph

62160 Commits

Author SHA1 Message Date
Luca Boccassi
a6a9ee4b36
Merge pull request #26115 from yuwata/test-fix-memleak-fdleak
test: fix memleak and fd leak
2023-01-20 11:00:53 +00:00
Yu Watanabe
d09df6b94e tree-wide: fix typo 2023-01-20 15:32:16 +09:00
Yu Watanabe
36f73b6c67 test-unit-name: fix fd leak
Fixes an issue reported at https://github.com/systemd/systemd/issues/22576#issuecomment-1396774385.
2023-01-20 14:55:46 +09:00
Yu Watanabe
86d82cb888 test-ndisc: fix memleak and fd leak
Fixes issues reported at #22576.
2023-01-20 14:54:53 +09:00
Luca Boccassi
a98d69f0af
Merge pull request #26105 from yuwata/network-config-parse-address-make-prefix-length-full
network: make config_parse_address() assume full prefix length
2023-01-19 21:06:08 +00:00
Michal Koutný
b9f976fb45 core: mount namespaces: Remove auxiliary bind mounts directory after unit termination
Unit that requires its own mount namespace creates a temporary directory
to implement dynamic bind mounts (org.freedesktop.systemd1.Manager.BindMountUnit).
However, this directory is never removed and they will accumulate for
each unique unit (e.g. templated units of systemd-coredump@).

Attach the auxiliary runtime directory existence to lifetime of other
"runtime" only per-unit directories.
2023-01-19 21:58:10 +01:00
Lennart Poettering
2f7fe6199c
Merge pull request #25977 from YHNdnzj/PropagatesStopTo-fix-restart
core: propagate stop too if restart is issued
2023-01-19 21:57:39 +01:00
Jelle van der Waa
ad8858c1f7 hostnamed: expose FirmwareDate as timestamp in dbus
Offer the firmware date as an epoch instead of the literal DMI string.

Closes #25679
2023-01-19 21:57:06 +01:00
Luca Boccassi
0bdf70f3fa
Merge pull request #26103 from lnussel/bootctl
bootctl: unlink and cleanup functions
2023-01-19 20:21:52 +00:00
Daan De Meyer
396a249388 mkosi: Rename the configuration files to use ".conf" as extension 2023-01-19 16:34:49 +01:00
edupont
76b4d355e1 Fix typo in parameter name 2023-01-19 23:11:36 +09:00
Mike Yuan
017a7ba4f4
core: propagate stop too if restart is issued
The restart of a unit should also be considered as that
a stop job happens, and thus gets propagated to units
specified using PropagatesStopTo=.

Fixes #24068
2023-01-19 21:56:58 +08:00
Ludwig Nussel
8702496bfb bootctl: unlink and cleanup functions
The unlink command removes an entry from the ESP including
referenced files that are not referenced in other entries. That is
useful eg to have multiple entries that use the same kernel with
different options.

The cleanup command removes all files that are not referenced by any
entry.
2023-01-19 14:24:43 +01:00
Sam James
e3342b2d3f bpf: disable -fstack-protector in meson
In Gentoo, we recently started making Clang behave the same way as
our GCC, with -fstack-protector and some friends enabled by default.

SSP doesn't make sense for BPF, so disable it explicitly.

See also e.g. https://www.spinics.net/lists/netdev/msg556400.html.

Bug: https://bugs.gentoo.org/890004
2023-01-19 13:12:15 +00:00
Ludwig Nussel
1132fd73b3 chase-symlinks: new chase_symlinks_and_unlink() 2023-01-19 14:11:12 +01:00
Yu Watanabe
580586291f NEWS: mention that Address= assumes /32 or /128 prefix length if not specified 2023-01-19 22:09:24 +09:00
Yu Watanabe
3402357063 in-addr-util: drop unused mode to parse prefix length 2023-01-19 22:09:24 +09:00
Yu Watanabe
e5e0743189 network: assume prefix length is full address size
The commit 0f707207b9 enables strong
warning about missing prefix length in Address= setting.
The change was done in v241, and was about 4 years ago.
Let's drop the legacy assumption and make the parser consistent with
'ip address' command.

C.f. #11307.
Closes #26102.
2023-01-19 22:09:10 +09:00
Frantisek Sumsal
48e582d7fe test: update Ubuntu CI docs 2023-01-19 13:54:31 +01:00
Yu Watanabe
5908d86425 network: do not enter failed state when received an invalid RA
Fixes the issue reported at https://github.com/systemd/systemd/issues/25891#issuecomment-1368509262.
2023-01-19 12:36:26 +00:00
Yu Watanabe
a93cc5d911 test-network: drop unused file 2023-01-19 21:22:22 +09:00
Ludwig Nussel
d7efb17068 meson: ukify depends on GNU_EFI
ukify is rather efi specific and the manpage is already conditional on
HAVE_GNU_EFI so make the program also depend on HAVE_GNU_EFI
2023-01-19 11:42:18 +00:00
Yu Watanabe
ff4d2a09fd test: use 'udevadm trigger --settle' even if device is renamed 2023-01-19 17:58:05 +09:00
Yu Watanabe
1193448cb6 udevadm-trigger: also check with the original syspath if device is renamed
For older kernels that synthetic UUID is not supported, we need to also
check the original device name, as udevd broadcasts uevent with new
sysname.

Fixes #25115.
2023-01-19 17:58:05 +09:00
Yu Watanabe
dfbd824a0b udevadm-trigger: settle with synthetic UUID if the kernel support it
If the kernel support synthetic UUID in uevent, then let's assume that
the UUID is unique, and check only if the received UUID matches we
specified.

Partially fixes #25115.
2023-01-19 17:57:56 +09:00
Yu Watanabe
b15039425f udevadm-trigger: allow to fallback without synthetic UUID only first time
If a device is successfully triggered with synthetic UUID, then that means
the kernel support it. Hence, it is not necessary to fallback without UUID
for later devices.
2023-01-19 17:55:21 +09:00
Yu Watanabe
3e61656fab sd-id128: introduce id128_hash_ops_free 2023-01-19 17:55:21 +09:00
Daan De Meyer
78d774bab4 testsuite-77: Fix race condition
Use a socket unit to make sure the socket exists before we start
the client that accesses it.
2023-01-19 02:11:41 +00:00
Luca Boccassi
41d125614c
Merge pull request #23706 from medhefgo/efi-clang
boot: Add printf functions
2023-01-18 22:24:39 +00:00
William Roberts
aae6eb9611 tpm2: add salt to pin
Add a salt to the pin and store it in the TPM2 LUKS header for future
this. This adds entropy to user supplied pins and helps brute forcing
the passphrase on the key residing in the TPM or brute forcing bind key
encrypted sessions with low entropy passphrases.

Signed-off-by: malikabhi05 <abhishek.malik@intel.com>
Signed-off-by: William Roberts <william.c.roberts@intel.com>
2023-01-18 21:58:33 +00:00
Luca Boccassi
f2af682cd6 man: note that cgroup-based sandboxing is not bypassed by '+'
DeviceAllow= and others are applied to the whole cgroup via bpf, so
using '+' on an Exec line will not bypass them. Explain this in the
manpage.

Fixes https://github.com/systemd/systemd/issues/26035
2023-01-18 17:59:43 +00:00
Lennart Poettering
db5310cfc1
Merge pull request #25790 from joshua-zivkovic/JZ/plotjson-main
systemd-analyze: Add JSON and table output to systemd-analyze's plot
2023-01-18 18:11:12 +01:00
Lennart Poettering
a56182ddac
Merge pull request #26082 from kraxel/uki
bootctl: add is-uki command
2023-01-18 18:10:30 +01:00
Jan Janssen
9220b2c46b boot: Drop use of Print
The custom print helpers have been replaced with explicit checks at the
call site to keep this in line with the way it is done in userspace. Any
calls where the check has been ommited should not need them as the value
is expected to alawys be around.
2023-01-18 17:47:57 +01:00
Jan Janssen
2f3c3b0bee boot: Drop use of xpool_print/SPrint 2023-01-18 17:47:57 +01:00
Jan Janssen
5a9b915766 tree-wide: Use __func__ in asserts
clang puts the whole function signature in __PRETTY_FUNCTION__, which is
a bit excessive for something that can already be figured out by using
the line number.
2023-01-18 17:47:11 +01:00
Jan Janssen
5966c54df4 boot: Add log_trace debugging helper 2023-01-18 16:50:04 +01:00
Jan Janssen
6ac54809de boot: Introduce log_wait
Instead of stalling for every log message as it appears we now wait for
several messages at strategic locations.
2023-01-18 16:50:04 +01:00
Jan Janssen
c2c6203556 boot: Use printf for error logging
This also drops the _stall suffix in anticipation of the next commit.
2023-01-18 16:50:04 +01:00
Jan Janssen
7c4536a9af boot: Add printf functions 2023-01-18 16:50:04 +01:00
joshuazivkovic
a23be57de3 systemd-analyze: Add --json=, --table and -no-legend tests for plot 2023-01-18 14:33:08 +00:00
joshuazivkovic
f21a6502d8 systemd-analyze: Add tab complete logic for plot 2023-01-18 14:33:08 +00:00
joshuazivkovic
dc57a3387b systemd-analyze: Update man/systemd-analyze.xml with Plot JSON and table 2023-01-18 14:33:08 +00:00
Joshua Zivkovic
ff46b2f97c systemd-analyze: Add table and JSON output implementation to plot 2023-01-18 14:33:08 +00:00
Yu Watanabe
df0a741cdd test-network: reprocess the loopback network interface
Fixes the issue reported at https://github.com/systemd/systemd-centos-ci/pull/585#issuecomment-1385537641.
2023-01-18 14:08:14 +00:00
Lennart Poettering
11b6d7cba9
Merge pull request #26021 from fbuihuu/some-journald-improvements
Some journald improvements
2023-01-18 15:05:40 +01:00
Gerd Hoffmann
a05255981b bootctl: add kernel-inspect command
Takes a kernel image as argument. Prints details about the kernel.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2023-01-18 14:32:14 +01:00
Gerd Hoffmann
53c368d71b bootctl: add kernel-identity command
The command takes a kernel as argument and checks what kind of kernel
the image is.  Returns one of uki, pe or unknown.
2023-01-18 14:32:14 +01:00
Lennart Poettering
42c042cfd1
Merge pull request #26092 from poettering/dissect-sector-size
auto-detect intended sector size from DDI disk images, and configure loopback devices for it
2023-01-18 14:14:39 +01:00
Luca Boccassi
e0e7bc8223 core: add GetUnitByPIDFD method and use it in systemctl
A pid can be recycled, but a pidfd is pinned. Add a new method that is safer
as it takes a pidfd as input.
Return not only the D-Bus object path, but also the unit id and the last
recorded invocation id, as they are both useful (especially the id, as
converting from a path object to a unit id from a script requires another
round-trip via D-Bus).

Note that the manager still tracks processes by pid, so theorethically this
is not fully error-proof, but on the other hand the method response is
synchronous and the manager is single-threaded, so once a call is being
processed the unit database will not change anyway. Once the manager
switches to use pidfds everywhere, this can be further hardened.
2023-01-18 10:58:46 +01:00