Commit Graph

84034 Commits

Author SHA1 Message Date
Jelle van der Waa
c6ebb98e3c logind: emit PropertiesChanged when lingering is enabled/disabled
Cockpit's podman plugin needs to know the lingering status so the UI can
advertise enabling `podman-restart` (which depends on lingering to
work). Currently it relies on watching `/var/lib/systemd/linger/${user}`
but that isn't a public API.

Related: #22244
2025-10-09 09:39:45 +02:00
Lennart Poettering
03936a55a1 docs: two clarifications for release process (#39246)
doc was slightly out of sync with current practice, so update it to
match
2025-10-09 09:37:23 +02:00
Justin Kromlinger
0fe45b98dd Drop machine-id OSC event field if /etc/machine-id doesn't exist
While we can safely assume that `/proc/sys/kernel/random/boot_id`
exists, the same can't be said for `/etc/machine-id` in environments
where systemd is installed, but not running. An example would be OCI
containers like with the official Arch Linux image, see [0].

Without this check the prompt would constantly output `/etc/machine-id:
no such file or directory` with the OSC events introduced in dadbb34
(v258).

[0] https://gitlab.archlinux.org/archlinux/archlinux-docker/-/issues/107
2025-10-09 09:08:13 +02:00
Lennart Poettering
b97fccf0ce man: fix description of .membership files
First, let's say "must" rather than "shall" regarding creation of these
files, because without them group memberships will not work.

Secondly, suggest placing an empty JSON object in them, rather than
making them empty, simply to avoid issues with older systems that didn't
backport d6570eafe3.

Fixes: #38943
2025-10-09 06:32:59 +02:00
Mike Yuan
fd99d9d1cb man/userdbctl: fixup version info
Follow-up for 466562c69b
2025-10-08 22:17:54 +02:00
Jelle van der Waa
56aa047237 logind: cast various calls that return errors we ignore to (void) 2025-10-08 21:54:12 +02:00
Mike Yuan
606a08b1b5 mute-console: several follow-ups (#39229) 2025-10-08 20:35:10 +02:00
Frantisek Sumsal
67111e1bd9 man: fix a missing word
Follow-up for 6d48c7cf73.
2025-10-08 18:56:36 +01:00
Antonio Alvarez Feijoo
575087d68b man/factory-reset: fix typo in EFI variable name 2025-10-08 17:02:21 +02:00
Lennart Poettering
1353564b9d update TODO 2025-10-08 12:40:04 +02:00
Lennart Poettering
9dcd4113d0 userdb: add support for looking up users or groups by uuid. (#37097)
Followon to #37024.

This implements (mostly) what was suggested there, except that only a
single UUID is accepted (modifying things to support multiple is a
relatively straightforward change from here)

I'm not really convinced this is the right approach:

* I can't really think of any cases where you'd need to query by
multiple UUIDs (I guess you might want to lookup multiple users, but in
that case why aren't there "usernames" or "uids" arrays?)
* If I specify username "foo" and UID 1234 and UID 1234 exists and has
username "bar", I get back the error `ConflictingRecordFound`
* If I specify username "foo" and UUID abcdef... and username "foo"
exists but has UUID 123456..., I get back the error
`NonMatchingRecordFound`

This makes the two ID types behave differently. 

Additionally, when querying by `uuid`, the multiplexer will always sends
`more: true`, which is fine but a little unexpected.

I do think unifying things through the `UserDBMatch` struct could make
sense, but in that case I think it would make sense to unify all query
types in that way (username, uid, uuid), identify when the filter is for
a single or multiple records, and centralise determination of conflict
vs non matching record errors.

`userdb_by_name`/`userdb_by_uid` could then become helper functions for
the simple case where no additional filtering is needed.

Thoughts? 

One other thought: Should the multiplexer just pass through all
parameters, even unknown ones, to the backend services? Even if it
doesn't know how to filter by every property, the backends might, and it
would be useful to allow them to optimise things. (I realise the
disadvantage of this, ofc, is loss of error checking)
2025-10-08 12:03:14 +02:00
Luca Boccassi
5b45dd60cf docs: document creating new CI branch for the new stable branch after a release 2025-10-08 11:00:06 +01:00
Luca Boccassi
5d946798ba docs: document uploading manpages for new dev version after release
This adds the new 'in development' section to the drop-down menu
2025-10-08 10:56:43 +01:00
Lennart Poettering
ed1c2d1541 test-varlink-idl: add all missing IDL fragments
Let's also order the output alphabetically
2025-10-08 11:31:59 +02:00
Lennart Poettering
c6fb32a944 systemd-creds: varlink null key handling (#39239)
This is split out of #38764 but makes a ton of sense on its own.
2025-10-08 10:41:43 +02:00
Mike Yuan
0294c09e5b json-util: use JSON_VARIANT_ARRAY_FOREACH where appropriate 2025-10-08 09:22:22 +02:00
Mike Yuan
6870f78dcd kernel-install: drop unneeded empty_to_root() 2025-10-08 09:22:07 +02:00
Lennart Poettering
73346e19de creds: normalize definition of "tpm2-absent" legacy key type
This is just an alias, say so and clean up the name of the enum to match
the name of the string representation.
2025-10-08 09:18:59 +02:00
Lennart Poettering
e921d6d40f creds: add explicit control on whether to allow null key decryption
The ability to encrypt/authenticate encryption with a null key was
originally just a fallback concept for cases where during early boot we
have no host key, but the local system has no TPM2. Nowadays it is used
for other stuff as well, such as pcrlock data propagation (i.e. data
that needs no protection itself and required to properly to TPM key
derivation).

Let's give better, explicit control over null key usage, i.e. let's make
it a tristate both on the systemd-creds command line and in the Varlink
IPC to control three cases:

- the default that we allow it only if SecureBoot is off
- explicitly allowed
- explicitly refused (this is new)

Ideally systemd-creds --allow-null switch would take a boolean argument
to control this as a tristate. Alas, that would be a compat break, hence
I added --refuse-null instead (which also maps to the low-level flag for
this).

This also normalizes that the null key is always called "null key" in
messages, and not sometimes "empty key" or "fallback key".
2025-10-08 09:18:28 +02:00
Lennart Poettering
76d5d38fcc test: add testcase for withKey varlink option 2025-10-08 09:18:28 +02:00
Lennart Poettering
097374f3b9 creds: allow varlink clients to choose --with-key= like on the command line 2025-10-08 09:18:28 +02:00
Lennart Poettering
a67084a55e creds: define a proper varlink type for the credential scope 2025-10-08 09:10:42 +02:00
Lennart Poettering
dfb46b906e add two new json dispatchers (#39237)
Split out of #38764. But the 2nd one at least makes sense on its own I
guess.
2025-10-07 20:58:06 +02:00
Lennart Poettering
7757de9f20 json-util: don't use assert_return()
assert_return() exists for gracefully handling programmng errors in
public APIs. But these are internal APIs, hence just use a tough
assert().
2025-10-07 18:57:28 +02:00
Lennart Poettering
b7c07f6ab4 json: add generic dispatchers for version strings 2025-10-07 18:57:01 +02:00
Lennart Poettering
a8f5ae28d8 json: add new json_dispatch_strv_path() helper 2025-10-07 18:57:01 +02:00
Mike Yuan
e4c0741bef basic/log-context: mark global vars as static 2025-10-07 15:53:45 +02:00
Zbigniew Jędrzejewski-Szmek
4a8c41f3eb licensing: update address of FSF
rpmlint complains about the old address, even though it totally
doesn't matter and nobody cares.
2025-10-07 13:00:12 +01:00
Mike Yuan
01c6565548 mute-console: don't unmute twice when not running as varlink service
This also avoids the spurious "not restoring" logs if we fail
to dispatch varlink call.
2025-10-07 13:38:21 +02:00
Mike Yuan
39305cf974 mute-console: if muting is disabled, suppress "not restoring" messages 2025-10-07 13:38:21 +02:00
Mike Yuan
a5592a2e00 mute-console: honor Context rather than arg_* 2025-10-07 13:38:21 +02:00
Mike Yuan
5f7e04dd35 mute-console: fix typo 2025-10-07 13:38:21 +02:00
Mike Yuan
3dbb2fa239 system-systemd\x2dmute\x2dconsole.slice: do not disable default deps
The only default dep for slice units is exactly what's outlined
here: Conflicts= + Before=shutdown.target. Hence just drop
custom deps.
2025-10-07 13:38:21 +02:00
Mike Yuan
60e1c11dc8 units: enable MaxConnectionsPerSource= for all our Accept=yes units (-ng)
Apply 5d1e8cd3e0 on newly-added sockets.
2025-10-07 13:38:11 +02:00
Lennart Poettering
9bb47f9ce9 bootspec: also process uki-url boot loader spec field
Let's also add support for "uki-url", which was added at the same time to
the spec as "uki".

Follow-up for: 4a94a1b83f
2025-10-06 16:12:27 +02:00
Lennart Poettering
e4201d0a0e sysctl: support reading configuration from stdin and command line arguments (#39219)
This makes systemd-sysctl support following syntax, like
systemd-sysusers and systemd-tmpfiles:
```sh
$ /usr/lib/systemd/systemd-sysctl --inline 'foo.bar=42'
$ /usr/lib/systemd/systemd-sysctl - <<EOF
foo.bar=42
EOF
```
2025-10-06 16:12:11 +02:00
Antonio Alvarez Feijoo
13abd21c9f mute-console: remove unimplemented option
```
$ build/systemd-mute-console -q
Code should not be reached at src/mute-console/mute-console.c:103, function parse_argv(). Aborting. 💥
Aborted (core dumped)
```
2025-10-06 16:11:39 +02:00
Daan De Meyer
f0a1b3c183 copilot: Tell the AI to be thorough
At least when doing a local review, asking it to be thorough results
in a lot more comments on coding style violation so let's add such an
instruction to the global instructions.
2025-10-06 20:06:03 +09:00
Daan De Meyer
f228115a69 docs: Mention newline requirement for multi-line function decl 2025-10-06 20:06:03 +09:00
Mike Yuan
03bdf74dcf timesync: several cleanups (#39220)
Prompted by the logs provided at
https://github.com/systemd/systemd/issues/36498#issuecomment-3369227155.
2025-10-06 12:16:47 +02:00
Daan De Meyer
f28fb7836f Add copilot instructions
This was generated using copilot itself with Claude Sonnet 4.5 as
the backing model.

The idea is to test this out on some PRs to see whether copilot can
provide useful PR reviews. The idea is that it'll be able to take care
of the low hanging fruit like coding style issues and such. Once we get
some feedback on how it performs, we can make more changes to this document
to get it to behave better (assuming we decide to keep using it at all).
2025-10-06 11:44:20 +02:00
Luca Boccassi
29c639887a mkosi: update debian commit reference to e50fce1d4b2a9f1bb990027de8e86603f3b42301
* e50fce1d4b Fix installation of new manpages
* 8b45d3d793 Install new files for upstream build
* a401468f75 autopkgest: install bsdutils and bsdextrautils for unit tests
* 587584577e Explicitly disable bpf-framework for stage1 builds
* 209a8475d9 systemd: recommend login package
2025-10-05 22:11:40 +01:00
Jelle van der Waa
42e543408b varlinkctl: add detailed error message when --more is needed
Instead of reporting a "Invalid exchange", tell the user the `--more`
flag is missing.

Closes: #39201
2025-10-05 22:14:50 +02:00
Yu Watanabe
2de03c8e8b test: add test cases for sysctl reading configuration from stdin or positional arguments 2025-10-06 04:55:25 +09:00
Yu Watanabe
3cc725ca6b timesync: assume link NTP servers are unchanged on error and no servers registered yet
This also silences annoying debug message when networkd is not running,
in which case sd_network_get_ntp() returns -ENOENT.
2025-10-06 04:49:53 +09:00
Yu Watanabe
a6b5e24746 timesync: drop redundant space 2025-10-06 04:49:53 +09:00
Yu Watanabe
ff7a3522df sd-bus: silence spurious debugging log message 2025-10-06 04:49:53 +09:00
Yu Watanabe
862b61a3a1 test: merge TEST-76-SYSCTL into TEST-87-AUX-UTILS-VM 2025-10-06 03:26:28 +09:00
Yu Watanabe
ef6aa2351e sysctl: add --inline option
This maybe useful to apply a simple configuration without creating conf
file.
2025-10-06 03:17:23 +09:00
Yu Watanabe
483de0e76b sysctl: port parse_file() over conf_file_read()
Then, systemd-sysctl can also support stdin and relative paths, like
systemd-sysusers and systemd-tmpfiles do.
2025-10-06 03:05:59 +09:00