1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-22 17:35:35 +03:00
Commit Graph

62245 Commits

Author SHA1 Message Date
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
Koba Ko
9ca3bfb6c4 hwdb: Add mic mute key mappings for Dell G16 Series
add Dell G16 series to use the mic mute hotkey.
2023-01-18 18:56:22 +09:00
Lennart Poettering
6c54e1d61f repart: auto-probe sector size when not specified 2023-01-18 10:47:17 +01:00
Lennart Poettering
81dde3d85d homework: when creating/resizing GPT partitions, also set sector size explicitly 2023-01-18 10:47:17 +01:00
Lennart Poettering
1d93c00386 dissect: show sector size in info output 2023-01-18 10:47:17 +01:00
Lennart Poettering
22ee78a898 loop-util: always tell kernel explicitly about loopback sector size
Let's not leave the sector size unspecified: either set a user supplied
value, or auto-detect the right size by probing the disk image
accordingly.
2023-01-18 10:47:17 +01:00
Lennart Poettering
05c4c59ff1 dissect-image: add probe_sector_size() helper for detecting sector size of a GPT disk image
When we operate with DDIs with sector sizes != 512 we need to configure
the loopback device to match it, otherwise the image and the kernel
block device will disagree what things are.

Let's add a prober that tries to determine the sector size of a GPT DDI.
It does this by looking for the GPT partition table header at the
various byte offsets they must be located on, given a specific sector
size. It will try sector size 512, 1024, 2048 and 4096. Of these only
the 512 and 4096 really make sense IRL I guess, but let's be thorough.
2023-01-18 10:10:57 +01:00
Lennart Poettering
1163ddb386 loop-util: insist on setting the sector size correctly
If we attach a disk image to a loopback device the sector size of the
image must match the one of the loopback device, hence be more careful
here.
2023-01-18 10:10:57 +01:00
Lennart Poettering
65046b92dc blockdev-util: add simple wrapper around BLKSSZGET
Just adds some typesafety and generates an error if the field is not
initialized in the block device yet.
2023-01-18 10:10:57 +01:00
Daan De Meyer
d3d308538e
Merge pull request #26044 from DaanDeMeyer/repart-sector-size
repart: Allow configuring sector size
2023-01-18 09:54:50 +01:00
Frantisek Sumsal
c78d18215b test: bump D-Bus service start timeout if we run without accel
The default (25s) doesn't seem to be enough in some cases (especially
in VMs without acceleration), causing spurious timeouts:

[  174.297658] dbus-daemon[647]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service' requested by ':1.0' (uid=0 pid=645 comm="hostnamectl " label="kernel")
[  184.202313] systemd[1]: systemd-update-utmp-runlevel.service: Consumed 1.253s CPU time.
[  197.335422] systemd[1]: Started dbus.service.
[  199.211468] testsuite-71.sh[639]: + assert_in 'Static hostname: H' ''
[  199.347192] dbus-daemon[647]: [system] Failed to activate service 'org.freedesktop.hostname1': timed out (service_start_timeout=25000ms)
[  199.394879] testsuite-71.sh[657]: + set +ex
[  199.438918] testsuite-71.sh[657]: FAIL: 'Static hostname: H' not found in:
[  200.966006] systemd-logind[631]: Watching system buttons on /dev/input/event0 (Power Button)
[  201.008178] systemd-logind[631]: Watching system buttons on /dev/input/event1 (AT Translated Set 2 keyboard)
[  201.034106] systemd-logind[631]: New seat seat0.
[  201.238267] sh[658]: + systemctl poweroff --no-block
[  201.329890] systemd[1]: Starting systemd-hostnamed.service...
[  202.156622] systemd[1]: systemd-update-utmp-runlevel.service: Deactivated successfully.
[  204.818913] hostnamectl[645]: Failed to query system properties: Connection timed out
[  205.195583] systemd[1]: testsuite-71.service: Main process exited, code=exited, status=1/FAILURE
[  205.227237] systemd[1]: testsuite-71.service: Failed with result 'exit-code'.
[  205.712780] systemd[1]: Failed to start testsuite-71.service.
2023-01-17 23:09:34 +00:00
Luca Boccassi
2cd1e475dd
Merge pull request #26081 from yuwata/udev-symlink-remove
udev: support -= operator for SYMLINK
2023-01-17 21:59:12 +00:00
8facac5fdd coredump: use fstatvfs to check the available space
Given that we already have the file descriptor opened for writing, it
would make sense to call fstatvfs with that file descriptor rather than
statvfs with the directory path that was used to open that descriptor.
2023-01-17 22:22:12 +01:00
Lennart Poettering
f591cf66f0 doc: document how we expect empty lines to be used 2023-01-17 21:26:13 +01:00
Daan De Meyer
e1878ef72a repart: Allow configuring sector size
Let's allow users to configure the (logical) sector size of their
image. This is required when building images for a 4k sector size
disk on a 512b sector size host or vice-versa.
2023-01-17 20:09:22 +01:00
Daan De Meyer
065bdb6f0f mkfs-util: Shorten strv operations error handling 2023-01-17 19:50:48 +01:00