Commit Graph

73017 Commits

Author SHA1 Message Date
Yu Watanabe
6bd3102e3e man: fix typo
Follow-up for fef46ffb5b.
2024-04-23 01:42:11 +09:00
Luca Boccassi
f2316b1881
Merge pull request #32401 from bluca/chores
RC1 chores
2024-04-22 18:40:55 +02:00
Luca Boccassi
f149e68290
Merge pull request #32396 from YHNdnzj/verb-required
shared/verbs: show list of verbs when missing
2024-04-22 18:14:10 +02:00
Lennart Poettering
f92868db4e
Merge pull request #32369 from DaanDeMeyer/serial
terminal-util: Enable line wrapping in reset_terminal_fd()
2024-04-22 17:48:14 +02:00
Lennart Poettering
f96f1d68c5
Merge pull request #32402 from poettering/tpm2-setup-pcrextend-order
units: order tpm2-setup-early and pcrphase-initrd against each other
2024-04-22 17:47:51 +02:00
Lennart Poettering
29ba6bddc5
Merge pull request #32399 from poettering/doc-fixes-256
various documentation fixes (plus minor other work)
2024-04-22 17:41:39 +02:00
Lennart Poettering
00244c49df update TODO 2024-04-22 17:34:44 +02:00
Mike Yuan
9d43e0335f
nspawn: fix typo
Follow-up for edd3d4d7c2
2024-04-22 23:00:22 +08:00
Luca Boccassi
ff57d17140 Update translation files 2024-04-22 14:56:24 +01:00
Luca Boccassi
edd3d4d7c2 nspawn: ensure single-process container running as --user can access credentials
When starting a container with --user, the new uid will be resolved and switched to
only in the inner child, at the end of the setup, by spawning getent. But the
credentials are set up in the outer child, long before the user is resolvable,
and the directories/files are made only readable by root and read-only, which
means they cannot be changed later and made visible to the user.

When this particular combination is specified, it is obvious the caller wants
the single-process container to be able to use credentials, so make them world
readable only in that specific case.

Fixes https://github.com/systemd/systemd/issues/31794
2024-04-22 15:47:44 +02:00
Daan De Meyer
e888d1cae8 mkosi: Drop workaround to re-enable serial console line wrapping
Since we do it in reset_terminal_fd() now, there's no need to carry
this workaround anymore.
2024-04-22 15:28:26 +02:00
Daan De Meyer
f57705d67d terminal-util: Enable line wrapping in reset_terminal_fd()
The qemu seabios firmware disables serial console line wrapping. Let's
make sure we re-enable it again when we reset a terminal to some sane
defaults.

To avoid potentially blocking on writing to the terminal, we put it
in nonblocking mode and add a timeout of 50ms.
2024-04-22 15:28:26 +02:00
Daan De Meyer
e6724664c3 fd-util: Return 1 from fd_nonblock() if we actually change the mode 2024-04-22 15:28:26 +02:00
Luca Boccassi
a6261a32b5 Update systemd.pot 2024-04-22 14:27:39 +01:00
Luca Boccassi
56095ad6c0 Update autosuspend hwdb 2024-04-22 14:27:39 +01:00
Luca Boccassi
0760aef76c Update hwdb 2024-04-22 14:27:39 +01:00
Luca Boccassi
54300d4275 NEWS: update contributors list 2024-04-22 14:27:39 +01:00
Luca Boccassi
825dc2f32e NEWS: mention ExecMainHandoverTimestamp 2024-04-22 14:26:24 +01:00
Lennart Poettering
a64411deb4 man: document that IPAccounting= works for system services only
Fixes: #20356
2024-04-22 15:16:54 +02:00
Lennart Poettering
ef9262d0d1 man: be explicit that we don't proxy SO_PEER*, SCM_RIGHTS and co.
Fixes: #22744
2024-04-22 15:16:54 +02:00
Lennart Poettering
fef46ffb5b man: document that ReadOnlyPaths= doesn't affect ability to connect to AF_UNIX
Fixes: #23470
2024-04-22 15:16:54 +02:00
Lennart Poettering
c104d7a74e man: document that "systemctl set-environment" cannot be used to unset env vars configured via config file
Fixes: #28167
2024-04-22 15:16:54 +02:00
Lennart Poettering
afc194a135 man: say explicitly that $LESS + $LESSCHARSET have no effect on less invocations by systemd tools
Fixes: #29479
2024-04-22 15:16:54 +02:00
Lennart Poettering
c903d3df6f resolved: tighten the rules a bit on valid DNS-SD service identifiers
Let's insist that the ID is suitable for inclusion in a filename, as one
of the most basic of requirements.
2024-04-22 15:16:54 +02:00
Lennart Poettering
0ef0e2691a resolved: rename DnssdService "name" field to "id"
"name" is a bit confusing since this field is *not* the DNS-SD service
identifier, bust just some string derived from the .dnssd filename that
is used as handle for the service. Let's hence give it a better name:
"id".

While we are at it, switch from basename() to path_extract_filename().
2024-04-22 15:16:54 +02:00
Lennart Poettering
407630164e resolved: rename DnssdService.filename field to .path
It contains a full path, not just a filename, hence name it
appropriately.
2024-04-22 15:16:54 +02:00
Lennart Poettering
403492793a man: document missing resolved D-Bus APIs
Fixes: #29598
2024-04-22 15:16:54 +02:00
Lennart Poettering
04366e0693 man: document that StateDirectory= trumps ProtectSystem=strict explicitly
Fixes: #29798
2024-04-22 15:16:54 +02:00
Lennart Poettering
552dc4a97c man: document explicitly that LogExtraFields= and LogFilterPatterns= are for system service only for now
Fixes: #29956
2024-04-22 15:16:54 +02:00
Lennart Poettering
6b7a1a3679 man: document explicitly that bind restrictions cannot be escaped by opening a new netns
And while we are at it reword the introductary sentence a bit to make it
clearer.

Fixes: #30555
2024-04-22 15:16:54 +02:00
Lennart Poettering
0adce85ebe man: explicitly document the various systemd.journald.max_level_*= kernel cmdline options
Fixes: #31327
2024-04-22 15:16:54 +02:00
Lennart Poettering
db2b499423 journald: bring order of MaxLevelXYZ= setting explanations in sync with listed names 2024-04-22 15:16:54 +02:00
Lennart Poettering
3c7f0d6b44 man: explicitly say that BindPaths=/BindReadOnlyPaths= opens a new mount
namespace

Fixes: #32339
2024-04-22 15:16:54 +02:00
Lennart Poettering
3f6551fc82 man: run update-man-rules again 2024-04-22 15:16:54 +02:00
Luca Boccassi
93cb78aee2 core: add ExecMainHandoverTimestamp property recording time-of-execve
Enable the exec_fd logic for Type=notify* services too, and change it
to send a timestamp instead of a '1' byte. Record the timestamp in a
new ExecMainHandoverTimestamp property so that users can track accurately
when control is handed over from systemd to the service payload, so
that latency and startup performance can be trivially and accurately
tracked and attributed.
2024-04-22 15:16:05 +02:00
Lennart Poettering
ad7ac02035 units: merge two After= lines 2024-04-22 15:15:05 +02:00
Lennart Poettering
a6e9c37f5e tpm2-setup-early: order against pcrphase-initrd
Right now systemd-tpm2-setup-early and systemd-pcrphase-initrd.service
are not ordered against each other. However, they require the same slow
resource to operate: the TPM2. If we allow them to access the device
simultaneously, the kernel resource manager like has to save/restore TPM
state while they operate, slowing things down further.

hence, let's avoid all this mess, and just order them against each other
so that the shared resource is first used in full by one and then by the
other.

I opted to order systemd-pcrphase-initrd before
systemd-tpm2-setup-early, since there's value in having the former as
early as possible in userspace, to be a good marker for the transition
from kernel to first userspace. I can see no benefit in the opposite
order however.
2024-04-22 14:47:58 +02:00
Mike Yuan
adaf1f7ea3
shared/verbs: show list of verbs when missing
Replaces #32062

As discussed in #32062, making 'help' the default verb
is not very appealing for two reasons:

1) If the verb is missing, showing a help which is pages long
   isn't really helpful to locate the problem.
   (https://github.com/systemd/systemd/pull/32062#issuecomment-2064997158)

2) We want to reserve the right to set default verbs to be
   more useful ones, instead of help. E.g. 'busctl' lists all
   bus peers by default.

So, when there are more than 2 verbs, let's instead add
the list of available verbs to the "Command verb required"
message, that serves as a hint. That way we try to be friendlier
to users, but still make the problem obvious.
2024-04-22 20:42:35 +08:00
Martin Srebotnjak
489ae6b3d5 po: Translated using Weblate (Slovenian)
Currently translated at 2.1% (5 of 233 strings)

po: Added translation using Weblate (Slovenian)

Co-authored-by: Martin Srebotnjak <miles@filmsi.net>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/sl/
Translation: systemd/main
2024-04-22 14:38:39 +02:00
Mike Yuan
48fb49f1bd
shared/verbs: minor modernization 2024-04-22 20:35:51 +08:00
Luca Boccassi
f64222b748
Merge pull request #32347 from yuwata/sd-radv-reachable-time
sd-radv: allow to configure reachable time
2024-04-22 14:04:25 +02:00
Daan De Meyer
1b889631ed core: Check for TERM=dumb in show_status()
We shouldn't try to use any ANSI escape sequences if TERM=dumb.
Also, the "\r\n" we output can get interpreted as a double newline
(for example by Github Actions), so let's output just "\n" when
TERM=dumb to clean up the CI logs.
2024-04-22 13:27:27 +02:00
Luca Boccassi
c3411932b1
Merge pull request #32389 from keszybz/bin-sbin-merge
Try PATH without sbin even if compiled with split-bin=true
2024-04-22 13:07:48 +02:00
Lennart Poettering
21a3bc6b9f tpm2-util: add generic wrapper tpm2_context_new_or_warn() that wrpas tpm2_context_new and logs about errors
We so far just print a short log message that is not very useful, let's
add some recognizable error codes, and output better log messages if we
can't get TPM stuff to work.

Fixes: #31925
2024-04-22 12:40:09 +02:00
Yu Watanabe
2fa480592d sd-event: fix fd leak when fd is owned by IO event source
When an IO event source owns relevant fd, replacing with a new fd leaks
the previously assigned fd.
===
sd_event_add_io(event, &s, fd, ...);
sd_event_source_set_io_fd_own(s, true);
sd_event_source_set_io_fd(s, new_fd);  <-- The previous fd is not closed.
sd_event_source_unref(s);  <-- new_fd is closed as expected.
===

Without the change, valgrind reports the leak:
==998589==
==998589== FILE DESCRIPTORS: 4 open (3 std) at exit.
==998589== Open file descriptor 4:
==998589==    at 0x4F119AB: pipe2 (in /usr/lib64/libc.so.6)
==998589==    by 0x408830: test_sd_event_source_set_io_fd (test-event.c:862)
==998589==    by 0x403302: run_test_table (tests.h:171)
==998589==    by 0x408E31: main (test-event.c:935)
==998589==
==998589==
==998589== HEAP SUMMARY:
==998589==     in use at exit: 0 bytes in 0 blocks
==998589==   total heap usage: 33,305 allocs, 33,305 frees, 1,283,581 bytes allocated
==998589==
==998589== All heap blocks were freed -- no leaks are possible
==998589==
==998589== For lists of detected and suppressed errors, rerun with: -s
==998589== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)
2024-04-22 18:30:12 +08:00
dependabot[bot]
3ee5e3d046 build(deps): bump pkg/arch from ccc32ea to 124b1da
Bumps pkg/arch from `ccc32ea` to `124b1da`.

---
updated-dependencies:
- dependency-name: pkg/arch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-22 12:02:16 +02:00
Yu Watanabe
4f52944054 man: fix typo
Follow-ups for 418f2dc755.
2024-04-22 18:44:48 +09:00
Yu Watanabe
0fe4a1c870 test-network: add test for [IPv6SendRA] ReachableTimeSec= and RetransmitSec= 2024-04-22 18:42:56 +09:00
Yu Watanabe
5d8b72e1e0 man: slightly rephrase RetransmitSec= setting 2024-04-22 18:42:46 +09:00
Yu Watanabe
59d475ba40 network/radv: introduce ReachableTimeSec= setting
To make the reachable time in the RA header sent by networkd
configurable.
2024-04-22 18:41:37 +09:00