Commit graph

8753 commits

Author SHA1 Message Date
Kamil Szczęk e262205eb7 cryptenroll: support for enrolling FIDO2 tokens in manual mode
systemd-cryptsetup supports a FIDO2 mode with manual parameters, where
the user provides all the information necessary for recreating the
secret, such as: credential ID, relaying party ID and the salt. This
feature works great for implementing 2FA schemes, where the salt file
is for example a secret unsealed from the TPM or some other source.
While the unlocking part is quite straightforward to set up, enrolling
such a keyslot - not so easy. There is no clearly documented
way on how to set this up and online resources are scarce on this topic
too. By implementing a straightforward way to enroll such a keyslot
directly from systemd-cryptenroll we streamline the enrollment process
and reduce chances for user error when doing such things manually.
2024-06-20 14:26:24 +02:00
Ludwig Nussel 8ce171bf51 bootctl: add --random-seed=yes/no 2024-06-20 14:26:13 +09:00
Diego Viola 11b46dc117 man: fix typo in systemd-tmpfiles
Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-06-20 13:02:06 +09:00
Antonio Alvarez Feijoo 111f988992 kernel-install: correct the place where it works in man and help text 2024-06-20 03:01:22 +09:00
Maximilian Wilhelm 163bb43cea man/systemd.exec: list inaccessible files for ProtectKernelTunables 2024-06-20 03:00:59 +09:00
Yu Watanabe 3176c78e68
Merge pull request #32868 from keszybz/more-whomification
Fix confusion between killer and prey
2024-06-20 02:59:14 +09:00
Zbigniew Jędrzejewski-Szmek cd2fb04960 Fix confusion between killer and prey
"who" is the entity doing the killing, "whom" is the target.
Follow-up for 4ccde410a3.
2024-06-19 16:22:23 +02:00
pyfisch 051d462b42 Use consistent spelling of systemd.condition_first_boot argument 2024-06-19 09:01:35 +02:00
Mike Yuan fd41dfc135 man/systemd.journal-fields: document _SOURCE_{MONOTONIC,BOOTTIME}_TIMESTAMP
Follow-up for a9357c2ce2
2024-06-19 14:50:02 +09:00
Lennart Poettering c142a8fbcb man: suffix tmpfiles.d with /, as per coding style 2024-06-18 14:46:00 +01:00
Lennart Poettering 41064a3c97 tmpfiles: insist on at least one configuration file being specified on --purge
Also, extend the man page explanation substantially, matching more
closely what --create says.

Fixes: #33349
2024-06-18 14:45:59 +01:00
Luca Boccassi fcbe3e3b2e
Merge pull request #32724 from bluca/dynamic_user_no_private_tmp
core: do not imply PrivateTmp with DynamicUser, create a private tmpfs instead
2024-06-18 00:11:11 +01:00
Luca Boccassi 0e551b04ef core: do not imply PrivateTmp with DynamicUser, create a private tmpfs instead
DynamicUser= enables PrivateTmp= implicitly to avoid files owned by reusable uids
leaking into the host. Change it to instead create a fully private tmpfs instance
instead, which also ensures the same result, since it has less impactful semantics
with respect to PrivateTmp=yes, which links the mount namespace to the host's /tmp
instead. If a user specifies PrivateTmp manually, let the existing behaviour
unchanged to ensure backward compatibility is not broken.
2024-06-17 17:05:55 +01:00
Mike Yuan d4d90ef900
Merge pull request #33214 from keszybz/system-clock-epoch
Rework the setting and description of system clock to the epoch
2024-06-16 17:42:47 +02:00
Mike Yuan b5c8cc0a3b man,units: drop "temporary" from description of systemd-tmpfiles
Historically, systemd-tmpfiles was designed to manager temporary
files, but nowadays it has become a generic tool for managing
all kinds of files. To avoid user confusion, let's remove "temporary"
from the tool's description.

As discussed in #33349
2024-06-15 19:08:35 +02:00
Zbigniew Jędrzejewski-Szmek 863098fdc9 man: describe setting of the clock by systemd and systemd-timesyncd
The setting of systemd clock is important and deserves an accurate description,
see for example:
https://discussion.fedoraproject.org/t/f38-to-f39-40-dnf-system-upgrade-can-fail-on-raspberry-pi/92403
https://bugzilla.redhat.com/show_bug.cgi?id=2242759

The meat of the description was in systemd-timesyncd.service(8), but
actually it's systemd that sets the clock. In particular, systemd-timesyncd
doesn't know anything about /usr/lib/clock-epoch, and since systemd sets
the clock to the epoch when initializing, systemd-timesyncd would only
get to advance the clock to the epoch under special circumstances.
Also, systemd-timesyncd is an optional component, so we can't even rely
on its man page being installed in all circumstances. The description needs
to be moved to systemd(1).

The description is updated to describe the changes that were made in
previous commits.
2024-06-15 16:58:11 +02:00
Nick Rosbrook 9ebcac3b51 man: add a bit of a warning to systemd-tmpfiles --purge
Mention that by default, /home is managed by tmpfiles.d/home.conf, and
recommend that users run systemd-tmpfiles --dry-run --purge first to
see exactly what will be removed.
2024-06-15 00:00:53 +01:00
Luca Boccassi a2979bb842
Merge pull request #33046 from poettering/varlinkctl-quiet
varlinkctl: add --quiet/-q switch for suppressing method call reply output
2024-06-13 16:17:17 +01:00
Kamil Szczęk d5fa6e6ca7 cryptsetup: manual FIDO2 PIN, UP and UV configuration
When in FIDO2 mode with manual parameters, i.e. when not reading the
parameters off the LUKS2 header, the current behavior in regards to PIN,
UP and UV features is to default to v248 logic, where we use PIN + UP
when needed, and do not configure UV at all. Let's allow users to
configure those features in manual mode too.
2024-06-13 13:50:39 +02:00
Lennart Poettering cd4e9166bb varlinkctl: add "-q" switch for suppressing varlinkctl output 2024-06-13 11:30:52 +02:00
Lennart Poettering 16cfe84c24 varlinkctl: add new list-methods verb
For putting together "varlinkctl call" command lines it's useful to
quickly enumerate all methods implemented by a service. Hence, let's add
a new "list-methods" which uses the introspection data of a service to
quickly list methods.

This is implemented as a special flavour of the "introspect" logic,
and just suppresses all output except for the method names.
2024-06-13 09:37:15 +02:00
Lennart Poettering 2475b0e81a varlinkctl: make interface argument to "introspect" optional, and allow more than one
let's make it easier to use the introspection functionality of
"varlinkctl": if no interface name is shown, display the introspection
data of all available interfaces. Moreover, allow that multiple
interfaces can be listed, in which case we enumerate them all.

This relieves the user from having to list interfaces first in order to
find the ones which to introspect.
2024-06-13 09:35:23 +02:00
Lennart Poettering 86d754050b man: add brief intro page to new sd-json APIs 2024-06-12 18:42:22 +02:00
Lennart Poettering 8c5045f9b2 analyze: add verb for dumping SMBIOS Type #11 data
I find myself wanting to check this data with a quick command, and
browsing through /sys/ manually getting binary data sucks. Hence let's
do add a nice little analysis tool.
2024-06-12 12:48:28 +02:00
Дамјан Георгиевски d357f129b2 vsock-mux ssh proxy
allow the ssh-proxy to connect to cloud-hypervisor/Firecracker guests,
via their unix-domain socket to AF_VSOCK multiplexer:

https://github.com/cloud-hypervisor/cloud-hypervisor/blob/main/docs/vsock.md
https://github.com/firecracker-microvm/firecracker/blob/main/docs/vsock.md
2024-06-12 18:36:21 +09:00
Yu Watanabe f7da67db58
Merge pull request #32720 from poettering/hostnamed-no-varlink-exit-on-idle
hostnamed: exit-on-idle tweaks
2024-06-12 18:25:24 +09:00
Matthieu Baerts (NGI0) 3f69070598 core/socket: allow MPTCP protocol
Multipath TCP (MPTCP), standardized in RFC8684 [1], is a TCP extension
that enables a TCP connection to use different paths. It allows a device
to make use of multiple interfaces at once to send and receive TCP
packets over a single MPTCP connection. MPTCP can aggregate the
bandwidth of multiple interfaces or prefer the one with the lowest
latency, it also allows a fail-over if one path is down, and the traffic
is seamlessly re-injected on other paths.

To benefit from MPTCP, both the client and the server have to support
it. Multipath TCP is a backward-compatible TCP extension that is enabled
by default on recent Linux distributions (Debian, Ubuntu, Redhat, ...).
Multipath TCP is included in the Linux kernel since version 5.6 [2]. To
use it on Linux, an application must explicitly enable it when creating
the socket:

  int sd = socket(AF_INET(6), SOCK_STREAM, IPPROTO_MPTCP);

No need to change anything else in the application.

This patch allows MPTCP protocol in the Socket unit configuration. So
now, a <unit>.socket can contain this to use MPTCP instead of TCP:

  [Socket]
  SocketProtocol=mptcp

MPTCP support has been allowed similarly to what has been already done
to allow SCTP: just one line in core/socket.c, a very simple addition
thanks to the flexible architecture already in place.

On top of that, IPPROTO_MPTCP has also been added in the list of allowed
protocols in two other places, and in the doc. It has also been added to
the missing_network.h file, for systems with an old libc -- note that it
was also required to include <netinet/in.h> in this file to avoid
redefinition errors.

Link: https://www.rfc-editor.org/rfc/rfc8684.html [1]
Link: https://www.mptcp.dev [2]
2024-06-12 00:14:08 +01:00
Kamil Szczęk 608bfe76c1 core: populate $REMOTE_ADDR for AF_UNIX sockets
Set the $REMOTE_ADDR environment variable for AF_UNIX socket connections
when using per-connection socket activation (Accept=yes). $REMOTE_ADDR
will now contain the remote socket's file system path (starting with a
slash "/") or its address in the abstract namespace (starting with an
at symbol "@").

This information is essential for identifying the remote peer in AF_UNIX
socket connections, but it's not easy to obtain in a shell script for
example without pulling in a ton of additional tools. By setting
$REMOTE_ADDR, we make this information readily available to the
activated service.
2024-06-12 00:11:10 +01:00
Lennart Poettering 48ce0824dc sd-bus: add new sd_bus_pending_method_calls() call 2024-06-11 23:17:38 +01:00
Zbigniew Jędrzejewski-Szmek 7b529bfc47 man: document that separate /usr/local/ must not be used for config
Since we document /usr/local/lib/systemd/ and other paths for various things,
add notes that this is not supported if /usr/local is a separate partition. In
systemd.unit, I tried to add the footnote in the table where
/usr/local/lib/systemd/ is listed, but that get's rendered as '[sup]a[/sup]'
with a mangled footnote at the bottom of the table :( .

Also, split paragraphs in one place where the subject changes without any
transition.

Follow-up for 02f35b1c90.
Replaces https://github.com/systemd/systemd/pull/33231.
2024-06-11 18:02:31 +01:00
Zbigniew Jędrzejewski-Szmek 6eddfeebdb man/systemd-soft-reboot.service: upgrade drop-in to unit file for slice
Follow-up for d91c7c91bf.
Closes https://github.com/systemd/systemd/issues/33260.
2024-06-11 10:36:50 +01:00
Luca Boccassi d91c7c91bf man: note that templated surviving units need a drop-in for their slice
As reported on the mailing list, this is non-obvious, so document it.

https://lists.freedesktop.org/archives/systemd-devel/2024-June/050351.html
2024-06-07 12:33:18 +01:00
Jörg Behrmann 02f35b1c90 man: document /usr/local/lib in search paths 2024-06-06 12:07:08 +02:00
Zbigniew Jędrzejewski-Szmek f11aaf7dfb man/systemd: reorder content a bit
Section "Description" didn't actually say what systemd does. And we had a giant
"Concepts" section that actually described units types and other details about
them. So let's move the basic description of functionality to "Description" and
rename the following section to "Units".

The link to the Original Design Document is moved to "See Also", it is of
historical interest mostly at this point.

The only actual change is that when talking about API filesystems, /dev is also
mentioned. (I think /sys+/proc+/dev are the canonical set and should be always
listed on one breath.)
2024-06-05 14:34:12 +02:00
hanjinpeng 9246d16d3d man: mention that ExecCondition= in COMMAND LINES section for systemd.service 2024-06-02 09:23:12 +09:00
Yu Watanabe 4ccaf512d7 man: fix typo
Follow-up for d24ceef937.
2024-06-01 14:42:19 +09:00
Yu Watanabe d24ceef937 man: mention that IPMasquerade= and IPv6SendRA= implies IPv4Forwarding=/IPv6Forwarding=
It has been mentioned in IPv4Forwarding= and IPv6Forwarding=,
but let's also explain in the settings who imply these settings.

Follow-up for 3976c43092 and
485f5148b3.
2024-05-30 10:20:33 +02:00
Zbigniew Jędrzejewski-Szmek b95914f4b0 man: capsule support was added in v256
The version info added directly to --capsule. If we add the
same switch in other places in the future, we will have to move
this.

Closes https://github.com/systemd/systemd/issues/33048.
2024-05-28 16:30:54 +02:00
Zbigniew Jędrzejewski-Szmek 75ced6d5ee various: update links to usr-merge 2024-05-28 14:48:56 +02:00
Zbigniew Jędrzejewski-Szmek a37454bd90 man: update links to "API File Systems" 2024-05-28 14:48:56 +02:00
Zbigniew Jędrzejewski-Szmek d5c17aceb3 various: update links to more wiki pages 2024-05-28 14:48:53 +02:00
Zbigniew Jędrzejewski-Szmek 5507480cf4 man: update links to "Inhibitor Locks" 2024-05-28 14:48:53 +02:00
Zbigniew Jędrzejewski-Szmek b346d72c79 man: update links to "Compatibility with SysV" 2024-05-28 14:46:44 +02:00
Zbigniew Jędrzejewski-Szmek f81af0b082 man: update links to "New Control Group Interfaces" 2024-05-28 14:46:44 +02:00
Zbigniew Jędrzejewski-Szmek 03d35b5d18 man: update links to catalog docs 2024-05-28 14:46:44 +02:00
Mike Yuan 8d4fa6531b man/run0: remove @ syntax for --machine=
For run0 (as opposed to systemd-run in general), connecting to
the system bus (of localhost or container) as a different user
than root and then trying to elevate privilege from that
makes little sense:
https://github.com/systemd/systemd/issues/32997#issuecomment-2127992973

The @ syntax is mostly useful when connecting to the user bus,
which is not a use case for run0. Hence, let's remove the example.
The syntax will be properly refused in #32999.
2024-05-27 09:40:47 +09:00
Mike Yuan 006c02b371 man/run0: remove -M alias for --machine=
run0 doesn't know about the former.
2024-05-27 09:40:47 +09:00
Yu Watanabe 4c42df8166 man: update machine-id-setup(1)
- mention that /run/machine-id is used if exist.
- mention system.machine_id credential,
- credential, VM uuid, and container uuid are not read when --root=
  is specified or running in a chroot environment.
2024-05-25 02:13:00 +09:00
Luca Boccassi 5f5ee2eb07 man: mention that NFTSet is only available for system services 2024-05-24 11:21:04 +02:00
Yu Watanabe a328b24edd man: swap the order of soft-reboot.service and .target
Follow-up for the previous revert commit.
2024-05-23 00:08:14 +09:00