Commit Graph
61547 Commits
Author SHA1 Message Date
Nick Rosbrook 079fcdd04f test-fs-util: skip part of test_chase_symlinks if machine-id is not initialized
The part of test_chase_symlink in test-fs-util that calls
sd_id128_get_machine will fail if /etc/machine-id is empty, so skip this
block if the machine-id is not initialized.
2022-12-14 13:58:12 -05:00
Nick Rosbrook 415eb50570 test-id128: simplify machine-id check
This also ensures that the test is skipped when /etc/machine-id exists,
but is not initialized.
2022-12-14 13:58:12 -05:00
Lennart Poettering 5c6c587ce2 Merge pull request #25575 from brauner/nspawn.socket_surgery
nspawn: reduce number of sockets
2022-12-14 18:36:44 +01:00
Yu Watanabe 30a3181504 Merge pull request #25734 from yuwata/sd-id128
sd-id128: several followups
2022-12-15 02:23:03 +09:00
Felix Riemann 9b4e04f0cd timesync: Keep trying to connect even if the socket cannot be opened
This makes sure that after a server could not be contacted due to a
socket error, other (possibly working) NTP servers in the list of
configured NTP servers are (re-)tried.

Fixes #25728.
2022-12-15 02:21:25 +09:00
MVZ Ludwigsburg a76d7acae1 hwdb: Add mount matrix for CSL Panther Tab HD 2022-12-15 02:20:43 +09:00
Siddhesh Poyarekar 7929e180aa Use dummy allocator to make accesses defined as per standard
systemd uses malloc_usable_size() everywhere to use memory blocks
obtained through malloc, but that is abuse since the
malloc_usable_size() interface isn't meant for this kind of use, it is
for diagnostics only.  This is also why systemd behaviour is flaky when
built with _FORTIFY_SOURCE.

One way to make this more standard (and hence safer) is to, at every
malloc_usable_size() call, also 'reallocate' the block so that the
compiler can see the larger size.  This is done through a dummy
reallocator whose only purpose is to tell the compiler about the larger
usable size, it doesn't do any actual reallocation.

Florian Weimer pointed out that this doesn't solve the problem of an
allocator potentially growing usable size at will, which will break the
implicit assumption in systemd use that the value returned remains
constant as long as the object is valid.  The safest way to fix that is
for systemd to step away from using malloc_usable_size() like this.

Resolves #22801.
2022-12-14 17:49:47 +01:00
Yu Watanabe f0d8358c24 man: update documents for sd_id128_get_invocation() 2022-12-15 00:07:17 +09:00
Yu Watanabe 75fa1f25c0 sd-id128: also refuse an empty invocation ID 2022-12-15 00:07:17 +09:00
Yu Watanabe 786b652c89 sd-id128: allow sd_id128_get_machine() and friend to be called with NULL
It may be useful to check if the machine ID or friends is set or not.
2022-12-15 00:07:17 +09:00
Yu Watanabe e8a6625422 sd-id128: make sd_id128_get_machine() or friends return -EUCLEAN when an ID is in an invalid format
EINVAL suggests that the caller passes an invalid argument. EIO is
for "input/output error", i.e. the error you'd get if the disk or
file system is borked, and this error code could be returned by the
underlying read/write functions.

Let's make the functions return an unambiguous error code.
2022-12-15 00:07:13 +09:00
David Tardon cc137d53e3 swap: tell swapon to reinitialize swap if needed
If the page size of a swap space doesn't match the page size of the
currently running kernel, swapon will fail. Let's instruct it to
reinitialize the swap space instead.
2022-12-14 15:48:10 +01:00
Luca Boccassi e146136304 Merge pull request #25717 from bluca/reload
manager: log reload() sender and allow rate-limiting
2022-12-14 15:45:22 +01:00
Yu Watanabe bdc11d26d1 NEWS: fix typo 2022-12-14 20:41:42 +09:00
Yu Watanabe 0ec8777e18 Merge pull request #25726 from dtardon/cleanups
Several small cleanups
2022-12-14 20:17:56 +09:00
Yu Watanabe 863b620a4a resolve: fix NULL-pointer dereference
Fixes a bug introduced by 16a6bc5a7a.
Fixes CID#1501514.
2022-12-14 19:10:19 +09:00
Jiayi Chen b1c4466bba doc: add language decorator on the code block
Add `c` decorator on the code block for applying syntax highlighting.
2022-12-14 18:07:07 +09:00
David Tardon 246caacbb4 btrfs-util: shorten a bit 2022-12-14 09:57:35 +01:00
David Tardon 359e8d76e8 machine: propagate error from machine_new 2022-12-14 09:57:35 +01:00
David Tardon 38f514409a machine: use _cleanup_ in machine_new 2022-12-14 09:57:35 +01:00
David Tardon d2b6485385 localed-util: use _cleanup_ harder 2022-12-14 09:57:35 +01:00
David Tardon 6323bd1094 busctl-introspect: use _cleanup_ 2022-12-14 09:56:33 +01:00
Zbigniew Jędrzejewski-Szmek 357f5ccbf6 Merge pull request #25689 from YHNdnzj/systemctl-exit-code
systemctl: make is-* return EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN(4) when no unit file is found
2022-12-14 08:37:16 +01:00
Daan De Meyer 8275334bec repart: Rename --skip-partitions to --defer-partitions
Defer is better because it indicates that we still intend to
populate these partitions later.
2022-12-14 13:20:32 +09:00
Luca Boccassi 7fe1e7448f Merge pull request #25706 from yuwata/hwdb-pointing-stick
hwdb: several fixes for pointing stick
2022-12-14 01:38:55 +01:00
Luca Boccassi 71f7cc6a9e Merge pull request #25725 from keszybz/oom-policy-fixup
Add missing integration of OOMPolicy in scope units
2022-12-14 01:38:11 +01:00
Daan De Meyer 57db3399c3 mkosi: Enable CONFIG_ZBOOT
Required to boot mkosi images with systemd-boot on aarch64.
2022-12-13 21:27:15 +01:00
Zbigniew Jędrzejewski-Szmek 3b288a2d2b NEWS: add a bunch of entries for v253
During the call today we agreed to work towards -rc1 in January. Nevertheless,
I already started writing this up and I'll push it so it doesn't get lost.

I didn't include all the changes to systemd-repart, because those are still in
flux.
2022-12-13 20:25:59 +01:00
Luca Boccassi 856bfaeb05 manager: add option to rate limit daemon-reload
Reloading is a heavy-weight operation, and currently it is not
possible to stop an orchestrator from spamming reload requests.
Add configuration options to allow rate-limiting.
2022-12-13 18:13:10 +00:00
Luca Boccassi 9524c2fd43 manager: log unit/pid of sender when Reload() is called
Reloading is a heavy-weight operation, and currently it is not
possible to figure out who/what requested it, even at debug level
logging.
Check the sender of the D-Bus message and print it out at info level.
2022-12-13 18:13:10 +00:00
Mike Yuan 9aaa333fc3 TEST-26-SYSTEMCTL: test about systemctl return codes for is-* verbs
We should return 4 when no unit file is found.

See also: #25689 #25680
2022-12-14 01:43:28 +08:00
Mike Yuan 43e48a4738 systemctl: is-*: return correct code when no unit is found
According to systemctl(1), we should use LSB return code 4
(EXIT_PROGRAM_OR_SERVICES_STATUS_UNKNOWN) when the state
is "no such unit" for is-{active,failed,enabled} verbs.

Fixes #25680
2022-12-14 01:43:25 +08:00
Yu Watanabe 1d541ccdb9 hwdb: also add a generic entry for DualPoint Stick
Also mention Dell DualPoint Stick in the comment.
2022-12-14 01:50:11 +09:00
Yu Watanabe d3bee9f300 hwdb: add comments about matching entries
Follow-up for 57bb707d48.

This makes the comments in 60-evdev.hwdb, 60-keyboard.hwdb, and
70-pointingstick.hwdb consistent.
2022-12-14 01:50:07 +09:00
Yu Watanabe c31e7bf07d hwdb: drop trailing space 2022-12-14 01:45:10 +09:00
Yu Watanabe ab84b9efb8 Merge pull request #25658 from yuwata/fuzz-etc-hosts
resolve: dedup entries in /etc/hosts
2022-12-14 01:44:12 +09:00
Zbigniew Jędrzejewski-Szmek c5966ab5bf coredump: cescape invalid json data before logging
In both cases, the json string is short, so we can print it, which is useful
for diagnosing invalid data in packages. But we need escape non-printable
characters.

https://bugzilla.redhat.com/show_bug.cgi?id=2152685

I went over the rest of the codebase, and it seems that other calls to
json_parse() don't have this problem.
2022-12-14 01:37:19 +09:00
AndyChi e4970f5dae hwdb: Add additional Dell models that require ACCEL_LOCATION=base (#25724) 2022-12-14 00:19:27 +09:00
David Tardon 1dca43db12 ratelimit: drop use of goto 2022-12-13 16:03:37 +01:00
Christian Brauner fefb7a6def nspawn: remove cgroup socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 16:03:30 +01:00
Christian Brauner bb1aa18569 nspawn: remove pty socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 16:03:30 +01:00
Christian Brauner b07ee9035e nspawn: remove rtnl socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 16:03:30 +01:00
David Tardon 229b008635 mountpoint-util: reduce variable scope 2022-12-13 15:47:52 +01:00
Zbigniew Jędrzejewski-Szmek d5a1657d5a core,man: add missing integration of OOMPolicy= in scopes
Fixup for 5fa098357e.
2022-12-13 15:34:46 +01:00
Zbigniew Jędrzejewski-Szmek 100d37d4f3 man: rework description of OOMPolicy= a bit
One had to read to the very end of the long description to notice that
the setting is actually primarily intended for oomd. So let's mention oomd
right at the beginning.
2022-12-13 15:33:54 +01:00
Christian Brauner 5d9d3fcb18 nspawn: s/kmsg_socket_pair/fd_inner_socket_pair/g
Also stop stashing the kmsg fifo fd in the socket. Just retrieve it in
the parent and have the parent hold on to it.

Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:46 +01:00
Christian Brauner af06cd3024 nspawn: s/fd_socket_pair/fd_outer_socket_pair/g
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:46 +01:00
Christian Brauner 525f4e59db nspawn: remove uid socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:46 +01:00
Christian Brauner 1823d92d7b nspawn: remove uuid socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:45 +01:00
Christian Brauner b1e1d1fa48 nspawn: remove pid socket
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
2022-12-13 15:25:45 +01:00