371 Commits

Author SHA1 Message Date
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
45c305f9b8 man: add pcrproduct to man page header, too 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
633a4b8839 man: add documentation for the various sd_json_dispatch_xyz() calls
Now that we comprehensively return accept null it's a good idea to
document which function maps null to what.
2025-11-01 21:58:28 +01:00
Lennart Poettering
73740ca2fc sd-varlink: add sd_varlink_is_connected() 2025-10-16 16:24:29 +02:00
Zbigniew Jędrzejewski-Szmek
675bfef837 Stop specifying license for generated file, instead mark as generated
I exclude generated files from license check, and I noticed
that this file was marked with a license header, which doesn't
make much sense, it is not copyrightable.
2025-10-04 18:13:27 +02:00
Lennart Poettering
ac63a04bd6 mute-console: add simple varlink service that can disable log/status spew to kernel console
For "wizard" style interactive tools it's very annoying if they are
interrupted by kernel log output or PID1's status output. let's add some
infra to disable this temporarily. I decided to implement this as an IPC
service so that we can make this robust: if the client request the
muting dies we can automatically unmute again.

This is hence a tiny varlink service, but it can also be started
directly from the cmdline.
2025-09-26 09:42:13 +02:00
Lennart Poettering
2bbfbe4089 man: run update-man-rules 2025-09-18 15:56:11 +02:00
Lennart Poettering
cba8c099a9 sd-varlink: optionally handle SIGTERM/SIGINT explicitly in simple varlink event loop 2025-09-18 15:56:11 +02:00
Lennart Poettering
04e2cb8928 sd-varlink: add api for resetting timeout to default
We currently don't expose the literal default time-out as API. Let's at
least provide users with a way to reset the time-out to the default.
2025-09-18 15:56:11 +02:00
Zbigniew Jędrzejewski-Szmek
5510a98fda systemd-sysext: introduce a global config (#38250)
This PR implements what is proposed in
https://github.com/systemd/systemd/issues/37992.

Having a global config file that supports the same cmdline options for
sysext/confext allows the user to customize the behavior of
systemd-sysext.service unit too, without the need of hacking the service
manually.

The global config will live in
`CONF_PATHS_STRV()/systemd/{sysext/confext}.conf` and it will be
overridden by cmdline, so it is possible to customize a run if
`systemd-sysext` is executed manually.

For now support `--mutable=` (`Mutable`) and `--image-policy=`
(`ImagePolicy`).
2025-09-17 15:13:11 +02:00
Zbigniew Jędrzejewski-Szmek
ee1ded6cd6 man: add sd-path page
We have similar pages for other parts of libsystemd too.
2025-08-10 13:40:32 +02:00
Emanuele Giuseppe Esposito
afbf09350b man/sysext.conf: add systemd-sysext config files
Add sysext.conf, which similar to other configs like coredump, will be
searched in:
/{etc run usr/lib}/systemd/{sysext/confext}.conf
but also
/{etc run usr/lib}/systemd/{sysext/confext}.conf.d/*

This config is an alternative to command line options, especially useful
if we want to extend the service units without modifying them.
2025-07-29 05:34:50 -04:00
Yu Watanabe
fff4dcc6de man: fix reference to systemd-quotacheck@.service
Also this makes the man page mentions systemd-quotacheck-root.service.
2025-07-16 05:47:38 +09:00
Yu Watanabe
dc1505555b utmp: drop setting runlevel entry in utmp
This removes systemd-update-utmp-runlevel.service and related command.
2025-07-13 05:49:00 +09:00
Yu Watanabe
8ba48d4bf8 core,initctl,systemctl: kill /dev/initctl support
This also kills support for controlling system state through
/sbin/init, initctl, and telinit.
2025-07-13 05:38:14 +09:00
Yu Watanabe
af925f7eb3 systemctl: kill SysV compat 'runlevel' command 2025-07-13 05:38:13 +09:00
Lennart Poettering
cfd8920243 ssh-generator: generate /etc/issue.d/ with VSOCK ssh info data
I find myself trying to log into a fresh ParticleOS VM started via
systemd-vmspawn all the time, but I don't know its CID. Let's show it on
the getty screen, to make it immediately visible.
2025-07-03 17:36:09 +02:00
Mike Yuan
46b0844743 sd-daemon: add sd_pidfd_get_inode_id()
We nowadays expose pidfdid at various places, e.g. envvars
and dbus properties. Also the sd_notify() MAINPID= message
has been complemented with MAINPIDFDID=. But acquiring
pidfdid is actually non-trivial especially considering
the 32-bit case, hence let's introduce a public helper
in sd-daemon specifically for that purpose.
2025-06-05 01:35:08 +02:00
Shubhendra Kushwaha
2948f981dd docs: add man page for sd_device_enumerator_get_device_first() and friends
For #20929.
2025-05-31 04:40:33 +09:00
Shubhendra Kushwaha
fbad1beae4 docs: add man pages for sd_device_enumerator_add_match_* (#37589)
Add man pages for:
- `sd_device_enumerator_add_all_parents`
- `sd_device_enumerator_add_match_parent`
- `sd_device_enumerator_add_match_property`
- `sd_device_enumerator_add_match_property_required`
- `sd_device_enumerator_add_match_subsystem`
- `sd_device_enumerator_add_match_sysattr`
- `sd_device_enumerator_add_match_sysname`
- `sd_device_enumerator_add_match_tag`
- `sd_device_enumerator_add_nomatch_sysname`
- `sd_device_enumerator_allow_uninitialized`.

Related to #20929
2025-05-29 18:40:18 +09:00
Shubhendra Kushwaha
ac8ed83947 docs: add man pages for sd_device_enumerator_[new,ref,unref,unrefp] (#37586)
For #20929.
2025-05-25 05:01:27 +09:00
Lennart Poettering
89768b601b man: document dns-delegate files 2025-05-20 23:00:53 +02:00
Igor Opaniuk
51e1c882fa man: run update-man-rules
Re-generate meson rules (as systemd-boot-clear-sysfail.service.xml
man page was added).

Fixes: https://github.com/systemd/systemd/issues/37415
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
2025-05-14 09:34:07 +02:00
Yu Watanabe
0c111392fd sd-bus: introduce sd_bus_message_dump_json()
We have already expose sd_bus_message_dump(). Let's also expose how
we convert dbus message into json format in busctl.
2025-04-30 19:40:37 +09:00
Lennart Poettering
5b5c6826ba man: document sd_varlink_send() 2025-04-30 10:34:44 +02:00
Lennart Poettering
b302a6bae5 man: document sd_varlink_push_fd() 2025-04-30 10:34:44 +02:00
Lennart Poettering
a05b344330 man: document image filters 2025-04-03 11:08:57 +02:00
Yu Watanabe
74f25ea7a9 meson: disable rc-local-generator when an empty string is specified to rc-local= meson option
In such case, the generator is meaningless. Let's kill it.
2025-04-03 00:18:48 +09:00
Luca Boccassi
b73a042ab0 man: add missing conditional
Follow-up for d95818f522

man: run 'update-man-rules' again
2025-04-01 10:59:27 +01:00
Lennart Poettering
1e79a29233 man: run 'update-man-rules' again 2025-04-01 09:26:27 +02:00
Lennart Poettering
0bdd5ccc81 validatefs: add new tool that enforces mount constraints
This new tool looks for a three xattr on the root inode of a file system
that encode mount constraints of the file system. The tool is supposed
to be hooke into the mount logic and is supposed to protect against
misappropriating trusted file systems in unintended ways.

Consider the following scenario: we boot up on first boot and create a
tpm-locked pair of /var/ and /srv/ partitions via systemd-repart. An
attacker then offline modifies the partition table, exchanging the
metadata of the /var/ and /srv/ partition. So far we'd happily accept
that, honour the modified metadata and boot up. This could be used to
revert changes to /var/ or similar. And all that even though both
partitions are encrypted and locked to TPM!

With this new mechanism we can encode in the protected contents of the
file systems the ways it can be used: the partition type uuid, the
partition label and the intended mount point can be stored in xattrs,
and we can check them automatically on mount, and take action on
mismatch. (action would typically be immediate reboot).
2025-03-31 15:14:13 +02:00
Luca Boccassi
d95818f522 meson: add feature flag for nspawn build
Other tools have it, nspawn doesn't, add one
2025-03-28 10:34:02 +00:00
Lennart Poettering
73e53d2ee4 tpm2-clear: optionally reset TPM during a factory reset 2025-03-05 12:37:51 +01:00
Lennart Poettering
41d9ed93d9 factory-reset: revamp infrastructure
This introduces a bunch of facilities:

1. The factory-reset.target unit that requests a factory reset is now
   complemented by factory-reset-now.target that executes it at next
   boot.

2. This latter is added to the initial transaction via the new trivial
   systemd-factory-reset-generator.

3. A tool systemd-factory-reset has been added to query, request,
   cancel, complete factory reset operations (via EFI variables). Two of
   these are wrapped into units that are plugged into
   factory-reset.target and factory-reset-now.target respectively. The
   tool also provides a simple Varlink API.

This should make things a lot cleaner, and both be useful as explicit
implementation on UEFI, and as template + hookpoints for alternative
implementations on non-UEFI.
2025-03-05 12:37:26 +01:00
Lennart Poettering
f2b1de6f5b Revert "sd-json: add new sd_json_variant_unset_field() call"
This reverts commit b6a2df6307.

The functionality is entirely redundant, we already have
sd_json_variant_filter() which does the same, and is in fact even more
powerful, since it takes a list instead of a single field to remove.
2025-03-02 11:04:15 +00:00
Lennart Poettering
50063d496d units: add generic service for attaching a file to a loopback device
This is mostly just a friendly unit wrapper around "systemd-dissect
--attach".

This is useful so that we can automatically attach disk images as
block device at boot.
2025-02-21 09:57:02 +01:00
Lennart Poettering
25c24619db sd-varlink: add sd_varlink_get_description() call 2025-01-23 21:28:02 +01:00
Lennart Poettering
b6a2df6307 sd-json: add new sd_json_variant_unset_field() call 2025-01-23 21:27:39 +01:00
Yu Watanabe
2bc733d9b0 units: introduce systemd-udevd-varlink.socket
Co-authored-by: David Tardon <dtardon@redhat.com>
2025-01-07 20:31:15 +09:00
Daan De Meyer
8224a48da9 Introduce systemd-pty-forward
This allows running a command with tinted terminal background.
2025-01-03 17:07:33 +01:00
Luca Boccassi
d21b42b463 sysext: add initrd-specific unit
In the initrd we want to run as early as possible, before
any of the filesystems are set up, so that users can use
sysexts to customize kernel modules, firmware, etc. But
in the root fs it needs to run after /var/ has been set
up. Split the unit, and have an initrd-specific one that
runs very early.
2024-12-01 12:17:21 +00:00
Luca Boccassi
e813252378 confext: add initrd-specific unit
In the initrd we want to run as early as possible, before
any of the filesystems are set up, so that users can use
confexts to customize fstab/veritytab/crypttab/etc. But
in the root fs it needs to run after /var/ has been set
up. Split the unit, and have an initrd-specific one that
runs very early.
2024-12-01 12:16:54 +00:00
Daan De Meyer
4b1ad0398e Introduce systemd-keyutil to do various key/certificate operations
Let's gather generic key/certificate operations in a new tool
systemd-keyutil instead of spreading them across various special
purpose tools.

Fixes #35087
2024-11-08 15:00:21 +01:00
Luca Boccassi
d6f4c96b10 man: run update-man-rules 2024-11-06 19:19:13 +00:00
Lennart Poettering
4f5fabe7a3 man: add brief entrypoint man page for sd-varlink
We have this in a similar fashion for the other APIs libsystemd
provides. Add the same for sd-varlink. There isn't too much on it for
now, but at least it's a start.

Also link it up everywhere.
2024-11-05 22:57:51 +01:00
Zbigniew Jędrzejewski-Szmek
243b63d8a6 meson: add separate option for sysupdated, disable in release builds
This commit introduces a build-time option to enable/disable sysupdated
separately from sysupdate. 'auto' translated to enabled by default in
developer builds.
2024-10-31 21:08:08 +00:00
Adrian Vovk
e1384cfb09 sysupdate: Introduce optional features
Optional features allow distros to define sets of transfers that can
be enabled or disabled by the system administrator. This is useful for
situations where a distro may want to ship some resources version-locked
to the core OS, but many people have no need for the resource, such as:
development tools/compilers, drivers for specialized hardware, language
packs, etc

We also rename sysupdate.d/*.conf -> sysupdate.d/*.transfer, because
now there are more than one type of definition in sysupdate.d/. For
backwards compat, we still load *.conf files as long as no *.transfer
files are found and the *.conf files don't try to declare themselves
as part of any features

Fixes https://github.com/systemd/systemd/issues/33343
Fixes https://github.com/systemd/systemd/issues/33344
2024-10-18 17:58:45 -04:00
Yu Watanabe
fd0958762a man: add basic documents for org.freedesktop.timesync1
Closes #34352.
2024-09-11 04:42:50 +09:00
Yu Watanabe
1ff0164be5 sd-device: make device_get_device_id() public
We have already exposed sd_device_new_from_device_id(), but we have
never provide the way to get device ID from an existing sd_device
object.
2024-08-28 05:26:04 +09:00