1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-06 17:18:12 +03:00
Commit Graph

7327 Commits

Author SHA1 Message Date
Luca Boccassi
398dc7d39b core: imply DeviceAllow=/dev/tpmrm0 with LoadCredentialEncrypted
If the device access policy is restricted, add implicitly access to the TPM
if at least one encrypted credential needs to be loaded.

Fixes https://github.com/systemd/systemd/issues/26042
2023-02-08 10:59:55 +00:00
Zbigniew Jędrzejewski-Szmek
7a17e41dcf test: drop whitespace after shell redirection operators
(The one case that is left unchanged is '< <(subcommand)'.)

This way, the style with no gap was already dominant. This way, the reader
immediately knows that ' < ' is a comparison operator and ' << ' is a shift.

In a few cases, replace custom EOF replacement by just EOF. There is no point
in using someting like "_EOL" unless "EOF" appears in the text.
2023-02-06 09:19:04 +01:00
Simon Brand
45ab6f2a37 man: correct path for systemd-pcrphase 2023-02-03 12:51:57 +09:00
Luca Boccassi
8310229a04 man: add page for systemd-ac-power
It is now a supported executable, so add manpage.

Fixes https://github.com/systemd/systemd/issues/26289
2023-02-01 21:56:28 +00:00
Luca Boccassi
e5cf396181
Merge pull request #26287 from medhefgo/mkosi-auto-enroll
ci: Test with secure boot enabled under mkosi
2023-02-01 21:51:04 +00:00
Zbigniew Jędrzejewski-Szmek
70c0d11f41
Merge pull request #26286 from keszybz/two-doc-updates
Two doc updates
2023-02-01 17:03:46 +01:00
Jan Janssen
1e8e7f4463 boot: Add if-safe mode for secure boot enrollment 2023-02-01 16:52:28 +01:00
Jan Janssen
6ba14371c7 man: Use sbsigntools for secure boot key generation example
This way, people do not need efitools installed to generate these as
sbsigntools has everything needed to produce signed EFI variables.
2023-02-01 16:52:28 +01:00
Zbigniew Jędrzejewski-Szmek
2bd88a2944 man: strengthen language about generator output
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=2165433.
2023-02-01 15:34:38 +01:00
Zbigniew Jędrzejewski-Szmek
e4c7b5f517 core: split system/user job timeouts and make them configurable
Config options are -Ddefault-timeout-sec= and -Ddefault-user-timeout-sec=.
Existing -Dupdate-helper-user-timeout= is renamed to -Dupdate-helper-user-timeout-sec=
for consistency. All three options take an integer value in seconds. The
renaming and type-change of the option is a small compat break, but it's just
at compile time and result in a clear error message. I also doubt that anyone was
actually using the option.

This commit separates the user manager timeouts, but keeps them unchanged at 90 s.
The timeout for the user manager is set to 4/3*user-timeout, which means that it
is still 120 s.

Fedora wants to experiment with lower timeouts, but doing this via a patch would
be annoying and more work than necessary. Let's make this easy to configure.
2023-02-01 11:52:29 +00:00
Frantisek Sumsal
9c45bfb2ac ukify: don't install ukify man page if ukify is not enabled
Checking for gnu-efi is not enough, since ukify can be explicitly
disabled.

Resolves: #26274
2023-01-31 23:57:28 +00:00
Luca Boccassi
0a5bd40a70
Merge pull request #25374 from yuwata/sleep-fixlets
sleep: several fixlets
2023-01-30 09:51:21 +00:00
Yu Watanabe
4f58b656d9 sleep: introduce SuspendEstimationSec=
Before v252, HibernateDelaySec= specifies the maximum timespan that the
system in suspend state, and the system hibernate after the timespan.

However, after 96d662fa4c, the setting is
repurposed as the default interval to measure battery charge level and
estimate the battery discharging late. And if the system has enough
battery capacity, then the system will stay in suspend state and not
hibernate even if the time passed. See issue #25269.

To keep the backward compatibility, let's introduce another setting
SuspendEstimationSec= for controlling the interval to measure
battery charge level, and make HibernateDelaySec= work as of v251.

This also drops implementation details from the man page.

Fixes #25269.
2023-01-27 20:52:12 +00:00
Peter Cai
820c66dcfc docs: Update crypt{enroll,setup} limitations regarding FIDO2 2023-01-26 09:33:24 -05:00
Antonio Alvarez Feijoo
d8c5bd048c
man: add missing --unlock-fido2-device to systemd-cryptenroll 2023-01-25 11:58:19 +01:00
Luca Boccassi
1d62f3a7a1
Merge pull request #26184 from keszybz/cleanups
Various fixups to recent commits
2023-01-24 23:07:05 +00:00
Lennart Poettering
98a1353014 man: clarify that MESSAGE= should not appear more than once in the same journal entry
One would think this was clear already, but apparently it's not clear
enough, hence let's be more explicit.

Fixes: #26175
2023-01-24 19:29:06 +01:00
Zbigniew Jędrzejewski-Szmek
8072c9c8b0 man/bootctl: add missing markup
Fixup for 53c368d71b.
2023-01-24 19:14:27 +01:00
Lennart Poettering
edfb4a474e
Merge pull request #26152 from systemd/revert-26143-issue-26142
Revert "Resolves #26142 - Fix list of supported personalities"
2023-01-24 18:14:05 +01:00
Lennart Poettering
4c8ca41fa5 man: extend Personality= docs a bit
Let's make clear personalities are supported on ARM (as per
https://github.com/systemd/systemd/pull/26152#issuecomment-1400321944).

Also, clarify that on many archs this functionality is pretty pointless,
i.e. where only a single native arch was ever known.
2023-01-24 16:08:09 +01:00
Lennart Poettering
793fc32169 Revert "Resolves #26142 - Fix list of supported personalities"
This reverts commit fdbbb5ffc0.
2023-01-24 15:53:30 +01:00
Lennart Poettering
b563d5ce6f hostnamed: expose support end timestamp as property on the bus 2023-01-24 15:32:43 +01:00
Daan De Meyer
df005f1e08 repart: Mention broken XFS protofile format 2023-01-24 12:19:48 +00:00
Mike Yuan
c2434a61f2 machinectl: add --now to start/stop containers when enabling/disabling
Closes #26154
2023-01-24 11:09:03 +00:00
Дамјан Георгиевски
425e293427 man: fix explanation for Credential= match in .link files
.link files are handled by systemd-udevd, not by systemd-networkd,
so fix the man page to say that the Credential= match uses credentials set
on the systemd-udevd.service
2023-01-24 10:22:00 +01:00
Dmitry V. Levin
5c7a4f21dd docs, man: consistently use comma after "For example" 2023-01-23 22:52:34 +00:00
Zbigniew Jędrzejewski-Szmek
d4fc020996
Merge pull request #26153 from DaanDeMeyer/repart-remove-userns
mkfs-util: Remove user namespace owner => root mapping
2023-01-23 21:46:55 +01:00
Daan De Meyer
cd53cc149e repart: Add note about UIDs/GIDs of copied files and directories 2023-01-23 16:43:58 +01:00
Luca Boccassi
e24652ac2e
Merge pull request #26146 from keszybz/two-man-page-tweaks
Two man page tweaks
2023-01-22 20:14:33 +00:00
Steve Ramage
fdbbb5ffc0 Resolves #26142 - Fix list of supported personalities 2023-01-22 18:57:12 +01:00
Zbigniew Jędrzejewski-Szmek
066991f9fe man/sd_notify: fix indentation in sample programs
Whether we use a newline at the beginning of <programlisting> or not doesn't
seem to have any effect. So let's use the newline in multi-line examples; it is
easier to get the indentation right this way.
2023-01-22 17:55:34 +01:00
Zbigniew Jędrzejewski-Szmek
a9ba6f8a88 man: minor corrections
Two issues that were missed in 8b9f092112.
2023-01-22 17:55:34 +01:00
David Tardon
7100653885 sd-path: export env. generators paths 2023-01-21 11:27:40 +00:00
Lennart Poettering
eab7061898 bootctl: split out boot loader spec + boot loader interface commands in --help text
grub (at least on fedora) nowadays implements the boot loader spec, but
not the boot loader interface. Hence let's split out the commands
specific to each in two groups in the --help text. This way the first
group just covers boot lodaer spec stuff (i.e. stuff on disk in the
ESP/XBOOTLDR partition). And the other covers talking to the boot loader
via EFI var.
2023-01-20 18:42:25 +01:00
Lennart Poettering
1e7d6cc072 bootctl: change section title for kernel image commands
Let's call them kernel *images*, not just *kernels*.
2023-01-20 18:30:06 +01:00
Lennart Poettering
fba1033151
Merge pull request #26114 from bluca/sd_login_pidfd
sd-login: add sd_pidfd_* APIs
2023-01-20 17:28:13 +01:00
Luca Boccassi
da20baaecc sd-login: add sd_pidfd_* APIs
Same as the sd_pid_* counterparts, but take a pid file descriptor instead of
a pid, so that the callers can be sure that the returned values are really
about the process they asked for, and not about a recycled PID.
2023-01-20 12:18:05 +00:00
Yu Watanabe
d09df6b94e tree-wide: fix typo 2023-01-20 15:32:16 +09:00
Jelle van der Waa
ad8858c1f7 hostnamed: expose FirmwareDate as timestamp in dbus
Offer the firmware date as an epoch instead of the literal DMI string.

Closes #25679
2023-01-19 21:57:06 +01:00
Luca Boccassi
0bdf70f3fa
Merge pull request #26103 from lnussel/bootctl
bootctl: unlink and cleanup functions
2023-01-19 20:21:52 +00:00
edupont
76b4d355e1 Fix typo in parameter name 2023-01-19 23:11:36 +09:00
Ludwig Nussel
8702496bfb bootctl: unlink and cleanup functions
The unlink command removes an entry from the ESP including
referenced files that are not referenced in other entries. That is
useful eg to have multiple entries that use the same kernel with
different options.

The cleanup command removes all files that are not referenced by any
entry.
2023-01-19 14:24:43 +01:00
Luca Boccassi
f2af682cd6 man: note that cgroup-based sandboxing is not bypassed by '+'
DeviceAllow= and others are applied to the whole cgroup via bpf, so
using '+' on an Exec line will not bypass them. Explain this in the
manpage.

Fixes https://github.com/systemd/systemd/issues/26035
2023-01-18 17:59:43 +00:00
Lennart Poettering
db5310cfc1
Merge pull request #25790 from joshua-zivkovic/JZ/plotjson-main
systemd-analyze: Add JSON and table output to systemd-analyze's plot
2023-01-18 18:11:12 +01:00
Lennart Poettering
a56182ddac
Merge pull request #26082 from kraxel/uki
bootctl: add is-uki command
2023-01-18 18:10:30 +01:00
joshuazivkovic
dc57a3387b systemd-analyze: Update man/systemd-analyze.xml with Plot JSON and table 2023-01-18 14:33:08 +00:00
Gerd Hoffmann
a05255981b bootctl: add kernel-inspect command
Takes a kernel image as argument. Prints details about the kernel.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2023-01-18 14:32:14 +01:00
Gerd Hoffmann
53c368d71b bootctl: add kernel-identity command
The command takes a kernel as argument and checks what kind of kernel
the image is.  Returns one of uki, pe or unknown.
2023-01-18 14:32:14 +01:00
Luca Boccassi
e0e7bc8223 core: add GetUnitByPIDFD method and use it in systemctl
A pid can be recycled, but a pidfd is pinned. Add a new method that is safer
as it takes a pidfd as input.
Return not only the D-Bus object path, but also the unit id and the last
recorded invocation id, as they are both useful (especially the id, as
converting from a path object to a unit id from a script requires another
round-trip via D-Bus).

Note that the manager still tracks processes by pid, so theorethically this
is not fully error-proof, but on the other hand the method response is
synchronous and the manager is single-threaded, so once a call is being
processed the unit database will not change anyway. Once the manager
switches to use pidfds everywhere, this can be further hardened.
2023-01-18 10:58:46 +01:00
Daan De Meyer
d3d308538e
Merge pull request #26044 from DaanDeMeyer/repart-sector-size
repart: Allow configuring sector size
2023-01-18 09:54:50 +01:00