Commit Graph

84043 Commits

Author SHA1 Message Date
Frantisek Sumsal
4d8e8d44ab mkosi: install test dependencies for EnterNamespace= test
The test for the EnterNamespace= feature [0] has been both broken and
disabled since the migration to the mkosi framework, as it's missing the
libdw.pc file for pkg-config, so the test is skipped completely, and
it's also missing gcc to actually build the test binary.

[0] Part of TEST-87-AUX-UTILS-VM.coredump.sh
2025-10-11 22:37:33 +02:00
Frantisek Sumsal
cfb604f8f7 test: exclude test-stacktrace(-not)?-symbolized from the coredump check
As they are expected coredumps from the EnterNamespace= feature test.
2025-10-11 22:37:33 +02:00
Frantisek Sumsal
937f609b41 test: build the crashing test binary outside of the test
So we don't have to pull in gcc and other stuff into it.

Also, make the test itself a bit more robust and debug-able.
2025-10-11 22:37:33 +02:00
Antonio Alvarez Feijoo
a35780d5d0 creds: fix return type from normalize_separator()
Follow-up for 097374f3b9
2025-10-09 12:09:06 +01:00
Lennart Poettering
bdcfd54b1a hwdb.d/70-mouse.hwdb: Add Nulea M501 trackball flags for USB Dongle + Bluetooth (#39241)
Adds an entry for the Nulea M501 trackball in both USB and Bluetooth
mode, such that it is correctly recognised as a trackball.

Note added to flag a potential issue arise with other mouse using the
same dongle w/ generic name.

Initially noted in #39230
2025-10-09 09:40:41 +02:00
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
helpvisa
b12cd57f6d remove bonus line 2025-10-08 07:18:48 -04: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
Daniel Brackenbury
2dc0e6cd73 remove extra space from new hwdb.d/70-mouse.hwdb entries to fix failing test 2025-10-07 18:55:57 -04:00
Daniel Brackenbury
6dfbaa8063 add comment to 70-mouse.hwdb regarding generic name for Nulea M501 USB dongle 2025-10-07 18:04:56 -04:00
Daniel Brackenbury
9dde7d9ae8 Add Nulea M501 trackball to hwdb 2025-10-07 18:00:57 -04: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