1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-27 10:25:37 +03:00
Commit Graph

65426 Commits

Author SHA1 Message Date
Nick Rosbrook
c5ea147104 tree-wide: fix typos of "boottime"/"BOOTTIME" 2023-06-09 21:59:36 +02:00
Luca Boccassi
1d6f1e2fa1 serialize: add deserialize_strv helper 2023-06-09 00:49:19 +01:00
Luca Boccassi
71588cb6ad test-execute: add unit tests for *DirectorySymlink= 2023-06-08 23:11:42 +01:00
Lennart Poettering
986a514bab xdg-autostart-generator: extend start timeout
The current start + stop timeouts for xdg autostart files are *very*
short with 5s. On a busy system this might be too easy to hit even in
unintended case.

Apparently, the intention here was to cut the shutdown logic short.
(https://github.com/systemd/systemd/issues/27919#issuecomment-1580576178)
Let's hence stick to the very short timeout for that (under the
assumption that apps are written in a safe enough style to not lose data
if killed too early). But for starting XGD autostrat services, use our
regular timeouts.

See: #27919
2023-06-08 22:52:42 +01:00
Jan Janssen
7da9db535c boot: Fix memory leak 2023-06-08 20:41:16 +01:00
Luca Boccassi
4021e9e3e9
Merge pull request #26059 from DaanDeMeyer/cred-glob
creds: Add ImportCredential=
2023-06-08 20:40:37 +01:00
Luca Boccassi
d45ed5bf25
Merge pull request #26848 from yuwata/kernel-install
kernel-install: rewrite in C
2023-06-08 20:23:10 +01:00
Alfred Klomp
a2160ba061 integritysetup: support mode=(journal|bitmap|direct)
Add a parameter to the integritytab file to set the mode in which to
open the integrity volume. The mode can be journaled (the default),
bitmap without a journal, or direct mode without a journal or a bitmap.

This change removes the `no-journal' option because it is redundant,
being replaced with `mode=direct'.

Supercedes commit bcc1ee56c, from a week ago, which implemented
`no-journal'.

Resolves #27587
2023-06-08 20:21:59 +01:00
Philip Withnall
e6d712430b man/os-release: Add VENDOR_NAME= and VENDOR_URL= keys to os-release
These will be used in UIs to refer to the company or organization which
produces the OS separately from referring to the OS itself.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>

Fixes: #27777
2023-06-08 18:54:56 +01:00
Lennart Poettering
3122f4d752 man: document that "systemctl mask" doesn't work for units whose file is in /etc
Fixes: #27965
2023-06-08 18:53:01 +01:00
Luca Boccassi
ccc14f0812
Merge pull request #27712 from ddstreet/tpm2_simplify_srk
Tpm2 simplify srk
2023-06-08 18:52:31 +01:00
Mike Yuan
2221aaff0f ac-power: fix a typo 2023-06-08 16:44:15 +02:00
Lennart Poettering
dbbf0618d0 man: reference naming of triggered services of timer unit
Fixes: #27116
2023-06-08 14:54:30 +02:00
Lennart Poettering
e6cac8b540
Merge pull request #27968 from poettering/may-gc-tweaks
pid1: some minor GC logic tweaks
2023-06-08 14:54:09 +02:00
Mike Yuan
842248b05e
Merge pull request #27961 from poettering/journalctl-user-unit-man-fix
journalctl: fix --user when invoked by system users
2023-06-08 20:19:07 +08:00
Daan De Meyer
1ab6ae1957 units: Use ImportCredential= where applicable 2023-06-08 14:09:36 +02:00
Daan De Meyer
bbfb25f4b9 creds: Add ImportCredential=
ImportCredential= takes a credential name and searches for a matching
credential in all the credential stores we know about it. It supports
globs which are expanded so that all matching credentials are loaded.
2023-06-08 14:09:18 +02:00
Dan Streetman
f4f5b3a9de tpm2: add tpm2_get_legacy_template() and tpm2_get_srk_template()
Add functions to get either the 'legacy' or standard SRK template, for RSA or
ECC. The 'legacy' templates are those used with earlier code, where a transient
key was created to use for tpm sealing; the standard SRK is the persistent
shared key as defined in TCG guidance docs.

This also replaces tpm2_get_primary_template() with the new functions; that
function's use of flags is confusing and unnecessary.
2023-06-08 06:08:04 -04:00
Dan Streetman
98d6a80942 tpm2: add tpm2_read_public() 2023-06-08 06:08:04 -04:00
Dan Streetman
c8a8524031 tpm2: add tpm2_get_capability_handle(), tpm2_esys_handle_from_tpm_handle()
Add tpm2_get_capability_handle() to query if a "TPM handle" (meaning, a
location/address in TPM storage) is populated in the TPM, and
tpm2_get_capability_handles() to query for a specific number of handles.

Add tpm2_esys_handle_from_tpm_handle() to create an "esys handle" (an opaque
reference for use with the TPM EAPI that represents a TPM handle address) for an
existing TPM handle.

Since the TPM handle already exists in the TPM, this also also requires
updating the cleanup code for Tpm2Handle objects to close the object (free its
resources only from the EAPI code, but leave the handle in the TPM) instead of
flush the object (which frees its EAPI resources and removes it from the TPM).
2023-06-08 06:08:03 -04:00
Daan De Meyer
96df2bd84b execute: Make credential_search_path() more flexible
Let's also allow looking up only the encrypted credential search
path.
2023-06-08 11:45:24 +02:00
Lennart Poettering
af05bb9717 core: do not GC units/jobs that are in the D-Bus queue
Let's make sure that D-Bus messages are always sent out when pending,
before we might GC a unit/job.

This is kinda a follow-up for 8db998981a,
and a similar logic really applies: GC should only be done if we
processed everything else, generated evertyhing else and really don't
need it anymore.
2023-06-08 11:16:26 +02:00
Lennart Poettering
935f80428f unit: don't gc unit in oom queue
This is a follow-up for 8db998981a, and
follows a similar logic: a pending OOM event really trumps everything:
we should not GC a unit while it is pending.
2023-06-08 11:15:40 +02:00
Lennart Poettering
438874cb10 man: document how calendar times catch up after system suspend/hibernation
Fixes: #26166
2023-06-08 10:07:29 +01:00
Lennart Poettering
29de4eba1c update TODO 2023-06-08 09:55:18 +02:00
Lennart Poettering
cad8fa471b man: document that journalctl --user requires Storage=persistent
Fixes: #25061
2023-06-08 09:33:02 +02:00
Lennart Poettering
97c621b72d sd-journal: when SD_JOURNAL_CURRENT_USER is set, and called from system UID, imply SD_JOURNAL_SYSTEM
Fixes: #26742 #23679
2023-06-08 09:33:02 +02:00
Lennart Poettering
115d5145a2 journald: move uid_for_system_journal() to uid-alloc-range.h
Let's move this helper call from journald specific code to src/basic/,
so that we can use it from sd-journal.

While we are at it, slightly extend it to also cover container uids,
which are also routed to the system journal now.

This places the call in uid-alloc-range.[ch] which contains similar
functions that match UID ranges for specific purposes.
2023-06-08 09:32:04 +02:00
Lennart Poettering
8a8b4a8784 shared: move uid-alloc-range.[ch] from src/shared/ → src/basic/
This way we can use it in libsystemd
2023-06-08 09:32:04 +02:00
Lennart Poettering
e754af353c man: suffix --unit with an equal sign, since it expects an argument
As per our usual syntax in the docs.
2023-06-08 09:32:03 +02:00
Dan Streetman
1dc8f51841 tpm2: replace _cleanup_tpm2_* macros with _cleanup_()
Remove _cleanup_tpm2_context_ and _cleanup_tpm2_handle_ macros, replacing their
use with _cleanup_(tpm2_context_unrefp) and _cleanup_(tpm2_handle_freep),
respectively.
2023-06-08 01:09:08 +02:00
Lennart Poettering
50ff4753ec man: drop documentation of internal lookup flags
This removes documentation of SD_RESOLVED_REQUIRE_PRIMARY and
SD_RESOLVED_CLAMP_TTL, which are internal flags, and not usable from
outside of resolved. They are refused by D-Bus APIs, for a reason.

Various other fixes/clean-ups of the relevant docs (including reordering
of the flags docs by "grouping" rather than bit values).

Fixes: #26619
2023-06-07 23:32:03 +01:00
Luca Boccassi
bd65ee34ae
Merge pull request #27958 from mrc0mmand/test-functions-tweaks
test: a couple of assorted test-functions tweaks
2023-06-07 21:54:01 +01:00
David Tardon
f71b55b510 pam_systemd_home: suppress LOG_DEBUG msgs if debugging is off
This is a "sequel" to commit 2675747f3c .

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2210770
2023-06-07 21:53:05 +01:00
Lennart Poettering
615d795d9a preset: enable systemd-networkd-wait-online.service by default
As #25459 points out our default preset is contradictory. Let's fix
that.

This enables systemd-networkd-wait-online.service, as we enable
systemd-networkd.service which enables that anyway.

This is safe since network-online.target should not be pulled in by
default.

Fixes: #25459
2023-06-07 21:51:37 +01:00
Daan De Meyer
01af975d0c
Merge pull request #27960 from DaanDeMeyer/update-mkosi
mkosi: Update to latest
2023-06-07 16:37:02 +02:00
Frantisek Sumsal
8e81885531 test: wrap agetty & getfacl when running with sanitizers
The list is getting slightly ridiculous.
2023-06-07 16:26:21 +02:00
Zbigniew Jędrzejewski-Szmek
26978ac7c3 meson: stop using nested lists for sources
meson itself flattens the list when it is used in "sources:" field, but it
makes our own processing more complicated. I find it also a bit confusing.
2023-06-07 16:15:51 +02:00
Daan De Meyer
9f89c2d420 mkosi: Update to latest
mkosi's match syntax was changed so we update our config files to
use the new match syntax which mimicks the systemd condition syntax.
2023-06-07 15:59:03 +02:00
Frantisek Sumsal
93b896e90e test: drop $SKIP_INITRD
It's pointless nowadays, since we always need an initrd for the test VMs
as we require modules that are usually not compiled in the kernel.
2023-06-07 15:23:36 +02:00
Frantisek Sumsal
25bc469727 test: rebuild the ldconfig cache after changing its configuration
Follow-up to ba79e8c2cc.
2023-06-07 15:19:44 +02:00
Lennart Poettering
9e7e9c72c4 man: mention that OnCalendar= combines well with systemd-time-wait-sync.service
Fixes: #23440
2023-06-07 14:16:21 +01:00
Cyril Roelandt
3c6fefd879 Fix zsh completion for "localectl set-locale"
When running:

    $ localectl set-locale LC_MESSAGES=<TAB>

One is prompted with a list of locale fields instead of the list of
valid locales. This is because by calling "compset -P1 '*='", we modify
the $PREFIX special parameter before testing whether it contains an
equal sign. Therefore

    if [[ -prefix 1 *\= ]]

is always false, and we always suggest a list of locale fields to the
user.

Fixes: #27955
2023-06-07 13:54:12 +01:00
Balló György
0fb19b9469 kbd-model-map: change the order of Hungarian keymaps
This changes the console layout from 'hu101' to 'hu' when the user calls 'localectl set-x11-keymap hu', because 'hu' is the expected layout instead of 'hu101' for most users.
2023-06-07 14:16:44 +02:00
Daan De Meyer
d418c5c926
Merge pull request #27629 from ddstreet/tpm2_verify_sym_params
Tpm2 verify sym params
2023-06-07 13:48:54 +02:00
Zbigniew Jędrzejewski-Szmek
00df55e360
Merge pull request #27882 from DaanDeMeyer/repart-truncate
copy: Add COPY_TRUNCATE
2023-06-07 13:32:11 +02:00
Lennart Poettering
d9a5574093 resolved: add comment clarifying why we decompress DNS names when parsing SRV
Fixes: #22838
2023-06-07 13:30:22 +02:00
Lennart Poettering
bef84b81a4 man: document which IP ports resolved listens on, and what for
Fixes: #23045
2023-06-07 13:27:12 +02:00
Zbigniew Jędrzejewski-Szmek
d1579f0b70
Merge pull request #27885 from DaanDeMeyer/please-dont-make-me-write-more-openat-helpers
Add more openat like helper functions
2023-06-07 13:25:33 +02:00
Michal Sekletar
159f1b7857 pam: add call to pam_umask
Setting umask for user sessions via UMASK setting in /etc/login.defs is
a well-known feature. Let's make sure that user manager also runs with
this umask value.

Follow-up for 5e37d1930b.
2023-06-07 10:51:45 +02:00