Commit Graph

9845 Commits

Author SHA1 Message Date
Colin Walters
3c85d99c79 man: Clarify secure-boot-enroll defaults
Clarify in the docs that `if-safe` is the default by noting
that in the text for it, but also moving it to the first mentioned
option.

Make explicit in `man systemd-boot` that the `secure-boot-enroll`
option is specified in the `loader.conf`

Update an outdated comment in boot.c around the same.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-12-05 11:57:18 +01:00
Alexandru Tocar
1d9a8e439c man: drop --import-credential mention from systemd-nspawn(1) 2025-12-04 07:47:23 +09:00
Antonio Alvarez Feijoo
6b892f85e2 man/inhibit: mention handle-reboot-key operation 2025-12-03 17:55:50 +09:00
Lennart Poettering
8c5917a03b man: remove notes about limitations of unpriv containers that don't apply anymore 2025-12-01 17:14:53 +00:00
Lennart Poettering
fc3adbbbcb man: always prefix links to uapi specs with their UAPI.XY spec number
Let's try to establish the spec numbers, by mentioning them in most doc
links.

Follow-up for: https://github.com/uapi-group/specifications/pull/187
2025-11-23 18:09:11 +01:00
Daan De Meyer
2691e7558b run0: Add note about processes having privileges over --empower sessions 2025-11-21 13:08:50 +01:00
Christoph Anton Mitterer
2e5f717545 man: fix typo 2025-11-20 15:37:54 +00:00
Daan De Meyer
3c6af4cc79 Make file-hierarchy.7 link to two online docs and drop most of the contents (#39412) 2025-11-20 09:56:41 +01:00
Christoph Anton Mitterer
b3d99e2308 man: improve BindsTo= documentation
Make “effect” plural to indicate that BindsTo= also includes the other effects
of Requires= (like starting the listed units).

The documentation of Requires= already describes that the configuring unit is
stopped/restarted if any of the list units is explicitly stopped/restarted.
This made the previous wording “in addition to the effect of Requires, it
declares that if the unit bound to is stopped, this unit will be stopped too.”
ambiguous – this is no in addition, Requires= already does that, at least for
some (namely the explicit) cases.
Resolve this by making it clear what the actual difference to Requires= is and
further mention that this also includes failed units.

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2025-11-20 09:51:08 +01:00
Quentin Deslandes
5b0e262f45 network: clear existing routes if Gateway= is empty in [Network]
Add support for an empty Gateway= in [Network] to clear the existing
routes. This change will allow users to remove the default route from a
drop-in file.
2025-11-20 07:16:26 +09:00
Zbigniew Jędrzejewski-Szmek
9d7a70003d man: add 'testing' as one of the suggestions for DEPLOYMENT=
Looking at the list, "test" or "testing" seems to be a fairly generic entry
that is missing from the list of suggestions. I went with "testing" because it
fits better with the other item, e.g. "staging".

In https://github.com/systemd/systemd/issues/38743 "laboratory" was also
suggested. I didn't include this because that is more about the location, not
deployment type. Any of the other deployments could be in a "laboratory".

Closes https://github.com/systemd/systemd/issues/38743.
2025-11-19 22:01:15 +01:00
Christoph Anton Mitterer
6077791b3a man: use prefix number that matches the general suggestion
`systemd.network(5)` recommends “that each filename is prefixed with a number
smaller than "70" (e.g.  10-eth0.network)”.

Reduce that used by the example accordingly, but stay above the number (`50`)
used in the earlier example for static configuration, so that would take
precedence over the dynamic one if both match for the same network.
2025-11-19 14:13:19 +09:00
Zbigniew Jędrzejewski-Szmek
4d999c73b4 man/file-hierarchy: refer to LFSH and MOUNT_REQUIREMENTS
The contents of file-hierarchy.7 have been copied over to the new page in
uapi-docs, and are already going stale here, since a bunch of additions and
improvements has been made there. OTOH, a commit was made here, but not there.
https://github.com/uapi-group/specifications/pull/172 updates the other doc.
OTOH, a reader should also read MOUNT_REQUIREMENTS if they care about what
systemd cares about. Thus, replace most of the text in our man page by a
reference to those two pages. In case we later want to list some disagreements
or differences wrt. LFSH, we can always add a paragraph or two here,
but having two documents with almost the same content is not going to work.
2025-11-18 13:03:38 +01:00
Simon Barth
ceb67d42f5 man: Fix systemd-analyze exit-status example output
The output of `systemd-analyze exit-status` changed in commit
e04ed6db6b, so that the exit-status class
for EXIT_SUCCESS and EXIT_FAILURE is "libc" instead of "glibc".

This commit makes the example output in the man-page match the actual
output again.
2025-11-17 23:37:46 +01:00
Lennart Poettering
0a03092cb5 repart: avoid label string clashes between LUKS superblocks and the filesystems on them
Let's make sure that by default /dev/disk/by-label/ symlinks avoid
ambiguities, and the LUKS volume carries a different one than the file
system inside it.

Alternative-to: #39536
2025-11-17 15:37:14 +01:00
Luca Boccassi
b4fb69d1d7 man: regenerate man/rules/meson.build
ninja -C build update-man-rules
2025-11-17 08:59:53 +00:00
Lennart Poettering
a7fa29b1b5 networkd: add support for resolved hook for DHCP server
Let's synthesize DNS RRs for leases handed out by our DHCP server. This
way local VMs can have resolvable hostnames locally.

This does not implement reverse look ups for now. We can add this
later in similar fashion.
2025-11-15 07:52:42 +01:00
Lennart Poettering
8209f4adcd resolved: add hook api
This introduces /run/systemd/resolve.hook/ as a new directory that local
(privileged) programs can bind a Varlink socket into. If they do they'll
get a method call for each attempted resolved lookup, which they can
then either process themselves (and generate new records for, or return
errors to block stuff) or let pass so that the regular resolution is
done.

Usecase for this is primarily two things:

1. in machined we can add local resolution of machine names to their IP
   addresses, similar in fashion to nss-mymachines, but working also if
   the non-NSS interfaces to name resolution are used, i.e. the local
   DNS responder. In fact, I think we should eventually remove
   nss-mymachines from our tree, as soon as this code in resolved is
   setlled.

2. in networkd we can add local resolution of names specified in DHCP
   leases we hand out.

But beyond that there should be many other uses, for example people
could write "dns firewalls" with this if they like where they
dynamically block certain names from resolution.

Fixes: #8518
2025-11-15 07:44:24 +01:00
Yu Watanabe
fe9bccb2b7 Make new sd-path configuration search functionality generic (#39684)
Reverts systemd/systemd#38680

After taking a closer look I'm not convinced by the approach, see below.

First of all, all other SD_PATH_SEARCH_* are either somewhat generic,
i.e. encode the common prefix for configurations, binaries, etc., or are
subdirectories under systemd/ hence in our own "domain". The
tmpfiles/sysctl/binfmt we don't prefix with "systemd" precisely because
the concept is generic and there're actually other impls of them. A
specific SD_PATH_SEARCH_SYSCTL doesn't fit into our existing scheme.
Instead something along the lines of "SEARCH_SYSTEM_CONFIGURATION" shall
be introduced, and consumers will just suffix
sysctl.d/tmpfiles.d/binfmt.d for the final result.

And secondly, I don't grok why systemd-sysctl now unnecessarily calls
into sd-path to obtain the fixed search path. None of our other tools do
that.

-----------

An alternate approach, SD_PATH_SYSTEM_SEARCH_CONFIGURATION, which does
exactly above, will be introduced instead. It provides a universal
interface for querying any system config with our idiomatic
/etc/:/run/:/usr/local/lib/:/usr/lib/ hierarchy.
2025-11-15 10:09:19 +09:00
Yu Watanabe
6412e540bc path-util: add generic ignore extension to the hidden files (#39554) 2025-11-15 10:05:38 +09:00
Lennart Poettering
45c305f9b8 man: add pcrproduct to man page header, too 2025-11-14 22:22:39 +01:00
Lennart Poettering
a84202edc5 man: document that ConditionSecurity=tpm2 means full UEFI/PC Client profile support
TPM2 support is not too useful if the firmware doesn't actually use it
for the boot chain, hence we require the full PC client profile support.
Let's make that clear in the docs.

Fixes: #38939
2025-11-14 22:22:39 +01:00
Lennart Poettering
867e64737a units: measure a separator event into PCR 9 after completing NvPCR initialization
We do this in a separate service (rather than inside of
systemd-tpm2-setup), since we want failures of this measurement to
result in an instant reboot, like for most our measurements.

Failures to initialize nvpcrs, or allocate an SRK are somewhat OK (and
more likely), as long as this separator communicates clearly where they
have to have taken place, if they worked.
2025-11-14 22:22:39 +01:00
Lennart Poettering
86dc140b9f pcrextend: allow setting the event type for the event log on the command line
This makes the tool more powerful as we can invoke it for any type of
measurement correctly
2025-11-14 22:04:58 +01:00
Daan De Meyer
10c79431a0 Three new sd-event features + various fixes (#39608) 2025-11-14 12:05:12 +01:00
Daan De Meyer
5a5cb6ba50 sd-event: Add exit-on-idle support
Sometimes it's hard to assign responsibility to a specific event source
for exiting when there's no more work to be done. So let's add exit-on-idle
support where we exit when there are no more event sources.
2025-11-14 11:38:56 +01:00
Daan De Meyer
475729b805 run0: Make --same-root-dir available for run0
This enables running something like
"mkosi box -- run0 --empower --same-root-dir -E PATH" to get an
empowered session as the current user within the "mkosi box" environment.
2025-11-14 10:36:53 +01:00
Daan De Meyer
c11e1001db sd-event: Allow passing WNOWAIT to sd_event_add_child()
This allows doing the reaping outside of the callback, we'll use this
when adding fibers in a later commit.
2025-11-14 10:34:32 +01:00
Luca Boccassi
98ae19d9fe integritysetup: Add support for hmac-sha512 and wrapped key HMAC algorithms phmac-sha256 and phmac-sha512 (#39719)
Currently the only supported integrity algorithm using HMAC is
`hmac-sha256`. Add `hmac-sha512` to the list of supported algorithms as
well.

Also add the `PHMAC` integrity algorithm to the list of supported
algorithms. The `PHMAC` algorithm is like the regular HMAC algorithm,
but it takes a wrapped key as input. A key for the `PHMAC` algorithm is
an opaque key blob, who's physical size has nothing to do with the
cryptographic size. Such a wrapped key can for example be a HSM
protected key. Currently PHMAC is only available for the s390x
architecture (Linux on IBM Z).

Support for PHMAC has just been added to the cryptsetup project via MR
https://gitlab.com/cryptsetup/cryptsetup/-/merge_requests/693 by commit

296eb39c60

To allow automatic opening of integrity protected volumes that use PHMAC
via `/etc/integritytab`, this change in systemd's integritysetup tool is
needed as well.
2025-11-14 00:12:34 +00:00
Chris Down
7f9c0c31d2 sd-dhcp-server: Add Hostname= option to static leases
This adds a new `Hostname=` option to the [DHCPServerStaticLease]
section in .network files, allowing an administrator to assign a
specific hostname to a client receiving a static lease.

We automatically select the correct DHCP option to use based on the
format of the provided string:

- Single DNS labels are sent as Option 12.
- Names with multiple DNS labels are sent as Option 81 in wire format.

Fixes: #39634
2025-11-14 07:50:13 +09:00
Yu Watanabe
be33b202e6 core: record transactions that have seen ordering cycles and expose them via IPC (#39210)
Closes #3829.
2025-11-14 00:41:46 +09:00
Ingo Franzki
eb7b0d413e integritysetup: Add PHMAC algorithm to list of known algorithms
Add the PHMAC integrity algorithm to the list of supported algorithms.

The PHMAC algorithm is like the regular HMAC algorithm, but it takes a wrapped key
as input. A key for the PHMAC algorithm is an opaque key blob, who's physical size
has nothing to do with the cryptographic size. Currently PHMAC is only available
for the s390x architecture.
2025-11-13 16:14:25 +01:00
Daan De Meyer
8bb6f4f164 stdio-bridge: Add --quiet option
When we use stdio-bridge via sd-bus to connect to a bus of a different
user, container or host, stdio-bridge should not log at error level but
at debug level as it's invoked by the sd-bus library and sd-bus should
generally not log above debug level.

We can't actually use the --quiet option yet as that would break connecting
to hosts running older versions of systemd but let's already add the option
now in preparation for a brighter future.
2025-11-13 14:45:51 +01:00
Zbigniew Jędrzejewski-Szmek
dc04a884e0 systemd-path: add 'system-search-configuration'
This provides functionality to replace what was provided by the preceding
revert:

  $ build/systemd-path system-search-configuration --suffix=sysctl.d
  /etc/sysctl.d:/run/sysctl.d:/usr/local/lib/sysctl.d:/usr/lib/sysctl.d

The result is identical, but more generic, since by changing suffix we can also
get the answer for sysusers.d, tmpfiles.d, and any other of the directories
which follow the same general rule.
2025-11-13 14:11:11 +01:00
Ingo Franzki
7bf1cfe3b2 integritysetup: Add support for hmac-sha512
Currently the only supported integrity algorithm using HMAC is 'hmac-sha256'.
Add 'hmac-sha512' to the list of supported algorithms as well.
2025-11-13 10:25:08 +01:00
Zbigniew Jędrzejewski-Szmek
7af88c1e1e journald: allow default storage mode to be configured
So far the idea was that the default is 'auto', and if appropriate, the
distribution will create /var/log/journal/ to tell journald to use persistent
mode. This doesn't work well with factory resets, because after a factory reset
obviously /var/log is gone. That old default was useful when journald was new
and people were reluctant to enable persistent mode and instead relied on
rsyslog and such for the persistent storage. But nowadays that is rarer, and
anyway various features like user journals only work with persistent storage,
so we want people to enable this by default. Add an option to flip the default
and distributions can opt in. The default default value remains unchanged.

(I also tested using tmpfiles to instead change this, since we already set
access mode for /var/log/journal through tmpfiles. Unfortunately, tmpfiles runs
too late, after journald has already started, so if tmpfiles creates the
directory, it'll only be used after a reboot. This probably could be made to
work by adding a new service to flush the journal, but that becomes complicated
and we lose the main advantage of simplicity.)

Resolves https://bugzilla.redhat.com/show_bug.cgi?id=1387796.
2025-11-13 00:08:31 +01:00
Zbigniew Jędrzejewski-Szmek
7e9a787a86 man: stop inventing custom entity names for docbook
For some reason, the entity names configured in custom-entities.ent
used abbreviated names. This just creates unnecessary confusion, so update
to use the same name as the config dict.

Reword some surrounding sentences while at it.
2025-11-13 00:08:27 +01:00
Zbigniew Jędrzejewski-Szmek
e1ddcb1125 man: fedora 43 is the latest stable 2025-11-12 23:01:48 +00:00
Mike Yuan
58686034eb core: expose transactions with ordering cycle
Closes #3829
Alternative to #35417

I don't think the individual "WasOnDependencyCycle" attrs on units
are particularly helpful and comprehensible, as it's really about
the dep relationship between them. And as discussed, the dependency
cycle is not something persistent, rather local to the currently
loaded set of units and shall be reset with daemon-reload (see also
https://github.com/systemd/systemd/issues/35642#issuecomment-2591296586).

Hence, let's report system state as degraded and point users to
the involved transactions when ordering cycles are encountered instead.
Combined with log messages added in 6912eb315f
it should achieve the goal of making ordering cycles more observable,
while avoiding all sorts of subtle bookkeeping in the service manager.
The degraded state can be reset via the existing ResetFailed() manager-wide
method.
2025-11-12 23:47:39 +01:00
Daan De Meyer
3150c34270 run0: Never ask --empower sessions for polkit auth
A --empower session is effectively root without being UID 0, so it
doesn't make sense to enforce polkit authentication in those. Let's
add the empower group, add --empower sessions to that group and ship
a polkit rule to skip authentication for all users in the empower
group.

(As a side-effect this will also allow users to add themselves to this
group outside of 'run0 --empower' to mimick NOPASSWD from sudo)
2025-11-12 19:55:35 +01:00
Mike Yuan
14a9fb7a8e Revert "sd_path_lookup*() add new type SD_PATH_SEARCH_SYSCTL" 2025-11-12 01:32:11 +01:00
Yu Watanabe
a1cb4fae86 sd-path: add new type SD_PATH_SEARCH_SYSCTL (#38680)
Aim of this patches set, is to add a new type SD_PATH_SEARCH_SYSCTL for
sd_path_lookup() and sd_path_lookup_strv(). This new type is used to get the
directories list used by systemd-sysctl:

-  /etc/sysctl.d/
-  /run/sysctl.d/
-  /usr/local/lib/sysctl.d/
-  /usr/lib/sysctl.d/

This implements the change in libsystemd, systemd-path, and systemd-sysctl.
2025-11-12 08:54:09 +09:00
Masanari Iida
036100d745 systemd-logind: Add signal section in man systemd-logind
This patch adds signal setion in man systemd-logind
2025-11-12 08:45:55 +09:00
Goffredo Baroncelli
457a39a866 libsystemd: add new type SD_PATH_SEARCH_SYSCTL for sd_path_lookup*
Add the new type SD_PATH_SEARCH_SYSCTL to libsystemd.
With this new type sd_path_lookup() and sd_path_lookup_strv() will
return the paths used by systemd-sysctl(1) to search the .conf files:

           /etc/sysctl.d/
           /run/sysctl.d/
           /usr/local/lib/sysctl.d/
           /usr/lib/sysctl.d/

Refer to sysctl.d(5) man page.

Note: the old type SD_PATH_SYSCTL is still available, and returns the
last path (/usr/lib/sysctl.d/).
2025-11-10 22:58:25 +01:00
Dr. David Alan Gilbert
72afecf1f6 network: Typo fix configur*a*d
configurad->configured
2025-11-10 10:58:11 +09:00
cvlc12
c3e80f8f2b man: systemd-measure. Remove 'tpm2-pcrs=' from cryptenroll command (#39590)
This is now default since 4b840414be.
2025-11-07 05:54:06 +09:00
Christoph Anton Mitterer
07f4718242 man: clarify what “failed” means
systemd.service(5)’s documentation of `ExecCondition=` uses “failed” with
respect to the unit active state.
In particular the unit won’t be considered failed when `ExecCondition=`’s
command exits with a status of 1 through 254 (inclusive). It will however, when
it exits with 255 or abnormally (e.g. timeout, killed by a signal, etc.).

The table “Defined $SERVICE_RESULT values” in systemd.exec(5) uses “failed”
however rather with respect to the condition.

Tests seem to have shown that, if the exit status of the `ExecCondition=`
command is one of 1 through 254 (inclusive), `$SERVICE_RESULT` will be
`exec-condition`, if it is 255, `$SERVICE_RESULT` will be `exit-code` (but
`$EXIT_CODE` and `$EXIT_STATUS` will be empty or unset), if it’s killed because
of `SIGKILL`, `$SERVICE_RESULT` will `signal` and if it times out,
`$SERVICE_RESULT` will be `timeout`.

This commit clarifies the table at least for the case of an exit status of 1
through 254 (inclusive).
The others (signal, timeout and 255 are probably also still ambiguous (e.g.
`signal` uses “A service process”, which could be considered as the actual
service process only).

Signed-off-by: Christoph Anton Mitterer <mail@christoph.anton.mitterer.name>
2025-11-06 10:47:06 +01:00
Managor
b1aa33ff91 systemctl.xml: unify ellipsis (#39586)
The reverts in #39423 brought this back. This PR will unify the page.
2025-11-06 10:34:57 +01:00
Nils K
bea3b300bc man: fix username prefix mentioned in manual for capsule users (#39573) 2025-11-06 07:33:56 +09:00
Christoph Anton Mitterer
72a1cba512 man: document some filename patterns that are generally ignored 2025-11-04 17:41:13 +01:00