]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
5 months agomeson: also disable -Wmaybe-uninitialized when -Ofast is specified 37638/head
Yu Watanabe [Tue, 27 May 2025 20:43:48 +0000 (05:43 +0900)] 
meson: also disable -Wmaybe-uninitialized when -Ofast is specified

At least with GCC-14, -Ofast produces many false-positive warnings.
```
$ gcc --version
gcc (GCC) 14.2.1 20250110 (Red Hat 14.2.1-7)
```

5 months agomeson: check -ffinite-math-only in more detail
Yu Watanabe [Tue, 27 May 2025 20:39:37 +0000 (05:39 +0900)] 
meson: check -ffinite-math-only in more detail

Even if -fno-finite-math-only is specified, -ffinite-math-only,
-ffast-math, or -Ofast may be also specified after that. In that case,
-fno-finite-math-only has no effect, and test-json will fail.

Replaces #37603.

5 months agotimedate: print better errors when systemd-timesyncd.service unavailable
Nick Rosbrook [Fri, 23 May 2025 21:10:02 +0000 (17:10 -0400)] 
timedate: print better errors when systemd-timesyncd.service unavailable

If the error is a common bus error indicating the service is not
available, print a more user-friendly message indicating so.

5 months agoshared: add optional error parameter in bus_print_all_properties()
Nick Rosbrook [Tue, 27 May 2025 15:58:29 +0000 (11:58 -0400)] 
shared: add optional error parameter in bus_print_all_properties()

While here, remove the unused found_properties parameter.

This is preparation for another commit.

5 months agocgroup-util: minor cleanups (#37630)
Yu Watanabe [Tue, 27 May 2025 17:19:21 +0000 (02:19 +0900)] 
cgroup-util: minor cleanups (#37630)

5 months agomkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2...
Daan De Meyer [Tue, 27 May 2025 16:31:48 +0000 (18:31 +0200)] 
mkosi: update mkosi commit reference to 5e739ef1ed02a4f3b6ae64e50a8ee186cbcb21c2 (#37632)

5e739ef1ed mkosi-initrd: Optionally match t64 suffix for tss2
libraries
*   ec70393077 Merge pull request https://github.com/systemd/mkosi/pull/3742 from DaanDeMeyer/man
|\
| * 94cc136fbe mkosi-tools: Install man tool and pages as part of misc
profile
| * eda2ed533d Enforce C.UTF-8 locale for all commands we run
* | 9821e9a3e3 sandbox: Support using mkosi-sandbox as a library
* | 4145382edf Serialize pid in state and check if still exists on load
* |   3d119cba07 Merge pull request https://github.com/systemd/mkosi/pull/3736 from DaanDeMeyer/rpm-gpgkey
|\ \
| |/
|/|
| * 0a5d87b7bb Only pick up /etc/pki/tls and /etc/pki/ca-trust as
certificate dirs
| * c30eee187f Look for rpm gpg keys from inside the sandbox
|/
ef2842dfea Fix version bump check if image version was passed on CLI
12b6251153 apt: Install apt sources if apt was installed via base tree
a0b4e1af9a Make sure git doesn't fail when running as root
585a47705d repart: use --append-fstab=auto if available
cec6ae1dda sandbox: handle case where dev node for tty doesn't exist
a60dade823 initrd: shadow-utils removal is only necessary on old
Fedora
ca11acbd5b Use SPDX identifier instead of file path for license in
pyproject.toml
4d031bc57d Revert license-files property
*   c80dd09008 Merge pull request https://github.com/systemd/mkosi/pull/3722 from behrmann/versiontweaks
|\
| * c76e5dc4bc make version test more readable
| * 90ba99dde1 version: add __repr__ to GenericVersion
|/
dd794ec832 Fix licenses path in pyproject.toml
*   7eeb749840 Merge pull request https://github.com/systemd/mkosi/pull/3702 from aafeijoo-suse/initrd-kmp
|\
| * 565b905aa1 mkosi-initrd: handle symlinks under weak-updates
| * a83ccc10c7 mkosi-initrd: perform basic checks on the kernel dir
before calling mkosi
| * 73cad79c9e mkosi-initrd: --kernel-modules-include ->
--kernel-modules
bac76904c3 build(deps): bump github/codeql-action from 3.28.13 to
3.28.16
44161624a2 Supress ssh unit generation if sshd is not present
b8758dac28 Partially revert 640000a861e9cd9a3807e4158e110a098c74d078
6f11937dc6 Don't use default value if optional settings are set to
none
640000a861 Use a default tools tree by default if mkosi.tools.conf
exists
63d91cc285 mkosi: Override misconfigured gitconfig HTTP/HTTPS proxy
with ProxyUrl
a859b5eb13 Make sure we create the default workspace directory as well

5 months agotest: fix test_qdisc_tbf regex with iproute2 v6.15
Luca Boccassi [Tue, 27 May 2025 13:56:32 +0000 (14:56 +0100)] 
test: fix test_qdisc_tbf regex with iproute2 v6.15

iproute2 v6.15 fixed some rounding errors in the reported stats:

https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=d947f365602b30657d1b797e7464000d0ab88d5a

so the current regex doesn't work anymore. Fix it to check for both
old and new values.

systemd-networkd-tests.py[523]: FAIL: test_qdisc_tbf (__main__.NetworkdTCTests.test_qdisc_tbf)
systemd-networkd-tests.py[523]: ----------------------------------------------------------------------
systemd-networkd-tests.py[523]: Traceback (most recent call last):
systemd-networkd-tests.py[523]:   File "/usr/lib/systemd/tests/testdata/test-network/systemd-networkd-tests.py", line 5402, in test_qdisc_tbf
systemd-networkd-tests.py[523]:     self.assertRegex(output, 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms')
systemd-networkd-tests.py[523]:     ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
systemd-networkd-tests.py[523]: AssertionError: Regex didn't match: 'rate 1Gbit burst 5000b peakrate 100Gbit minburst 987500b lat 70(.0)?ms' not found in 'qdisc tbf 35: root refcnt 2 rate 1Gbit burst 5000b peakrate 100Gbit minburst 999200b lat 70ms \nqdisc pfifo 37: parent 35: limit 100000p'

5 months agobpf-program: check if a trivial BPF program can be created and loaded
Yu Watanabe [Fri, 23 May 2025 17:38:46 +0000 (02:38 +0900)] 
bpf-program: check if a trivial BPF program can be created and loaded

Re-introduce the check dropped by
ec3c5cfac74e8361a3b0153cc9e8cfdbbcbde0c6,
ad446c8ceb97c03971f06fd43e97720afe33be5a.

For some reasons, if we are running on LXC, even if bpf_program_supported()
returned true, but bpf_program_load_kernel() failed:
```
Attaching device control BPF program to cgroup /system.slice/test-bpf-devices-875b406d56ac7bc3.scope/186c411f6e991777 failed: Operation not permitted
src/test/test-bpf-devices.c:31: Assertion failed: Expected "r" to succeed, but got error: Operation not permitted
```

5 months agoin-addr-util: use s6_addr* macros everywhere
Jan Vaclav [Tue, 27 May 2025 07:55:50 +0000 (09:55 +0200)] 
in-addr-util: use s6_addr* macros everywhere

Currently, the code in in-addr-util.c uses a mix of accessing the
in6_u members directly, as well as using the s6_addr* macros.
Let's unify it so that the s6_addr macros are used everwhere.

5 months agocgroup-util: assert on attribute for cg_{get,set}_attribute() 37630/head
Mike Yuan [Tue, 27 May 2025 12:25:12 +0000 (14:25 +0200)] 
cgroup-util: assert on attribute for cg_{get,set}_attribute()

It makes zero sense to ever perform IO operations on cgroup dirs.

5 months agocgroup-util: make cg_get_attribute_as_bool() return 0/1 directly
Mike Yuan [Tue, 27 May 2025 12:19:41 +0000 (14:19 +0200)] 
cgroup-util: make cg_get_attribute_as_bool() return 0/1 directly

As with getenv_bool() and getxattr_at_bool(), to match
our usual style.

5 months agocgroup-util: rename cg_get_xattr_malloc -> cg_get_xattr
Mike Yuan [Tue, 27 May 2025 12:15:11 +0000 (14:15 +0200)] 
cgroup-util: rename cg_get_xattr_malloc -> cg_get_xattr

This is not a trivial wrapper around user-created-buffer-based
syscall, so do not use _malloc suffix. Most of our functions
return an internally allocated buffer and this one's not special.

5 months agobasic,shared: mark eligible functions with _pure_/_const_ (#37623)
Daan De Meyer [Tue, 27 May 2025 12:24:30 +0000 (14:24 +0200)] 
basic,shared: mark eligible functions with _pure_/_const_ (#37623)

5 months agorepart: Copy fs-verity status for CopyFiles= (#35401)
Zbigniew Jędrzejewski-Szmek [Tue, 27 May 2025 12:01:05 +0000 (14:01 +0200)] 
repart: Copy fs-verity status for CopyFiles= (#35401)

When populating a filesytem with CopyFiles=, we first copy the files to
a temporary directory. Make sure we use the (new) COPY_FS_VERITY flag
when doing that copy so that the `mkfs` that we invoke can see the files
with fs-verity enabled.

Closes #35352

5 months agocore: introduce io.systemd.Unit.List (first PR) (#37432)
Daan De Meyer [Tue, 27 May 2025 10:42:11 +0000 (12:42 +0200)] 
core: introduce io.systemd.Unit.List (first PR) (#37432)

5 months agomountfsd: add ability to create dir owned by foreign UID range in unpriv $HOME (...
Lennart Poettering [Tue, 27 May 2025 10:20:05 +0000 (12:20 +0200)] 
mountfsd: add ability to create dir owned by foreign UID range in unpriv $HOME (#37616)

5 months agoAssorted systemd-machined fixes (#37622)
Lennart Poettering [Tue, 27 May 2025 10:19:46 +0000 (12:19 +0200)] 
Assorted systemd-machined fixes (#37622)

5 months agoci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl ... 37616/head
Lennart Poettering [Mon, 26 May 2025 11:46:21 +0000 (13:46 +0200)] 
ci: add test case for io.systemd.MountFileSystem.MakeDirectory() and varlinkctl --push-fd=

5 months agovarlinkctl: optionally push fds to server
Lennart Poettering [Mon, 26 May 2025 11:19:14 +0000 (13:19 +0200)] 
varlinkctl: optionally push fds to server

5 months agomountfsd: add call for creating a foreign UID owned dir in dir owned by caller
Lennart Poettering [Mon, 26 May 2025 10:16:43 +0000 (12:16 +0200)] 
mountfsd: add call for creating a foreign UID owned dir in dir owned by caller

In order to fully support unpriv containers placed in directories owned
by the foreign UID range, below some unpriv user $HOME, we need to away
to actually create these hierarchies in the first place.

Let's add a method call for that. It takes a dir fd, then validates that
its ownership matches the client's identity, and then creates a subdir,
chown()ing it to the foreign UID range. It then returns an fd to the
result.

The result could then be passed to MountDirectory() in order to get a
mount which can then be populated by some code running in a dynamic
userns.

5 months agosd-json: add json_dispatch_const_filename()
Lennart Poettering [Mon, 26 May 2025 10:15:27 +0000 (12:15 +0200)] 
sd-json: add json_dispatch_const_filename()

json_dispatch_const_filename() is to json_dispatch_filename() what json_dispatch_const_path() is to json_dispatch_path().

5 months agomachine: fix log message, doesn't have to be scope unit, can by any 37622/head
Lennart Poettering [Mon, 19 May 2025 11:26:07 +0000 (13:26 +0200)] 
machine: fix log message, doesn't have to be scope unit, can by any

5 months agomachine: rework machine_gc()
Lennart Poettering [Mon, 19 May 2025 11:24:14 +0000 (13:24 +0200)] 
machine: rework machine_gc()

Let's check the leader alive state, and let's log about dbus errors.
This mimics (but is not quite identical to) what we do these days in
logind for GC'ing user sessions.

5 months agomachine: shorten code
Lennart Poettering [Mon, 19 May 2025 09:12:35 +0000 (11:12 +0200)] 
machine: shorten code

5 months agomachine: as safety precaution also check parsed machine name
Lennart Poettering [Mon, 19 May 2025 09:12:14 +0000 (11:12 +0200)] 
machine: as safety precaution also check parsed machine name

5 months agomachine: also save/restore vsock CID properly
Lennart Poettering [Mon, 19 May 2025 09:19:33 +0000 (11:19 +0200)] 
machine: also save/restore vsock CID properly

5 months agomachine: modernizations of serializing/deserializing netif data
Lennart Poettering [Mon, 19 May 2025 09:19:17 +0000 (11:19 +0200)] 
machine: modernizations of serializing/deserializing netif data

5 months agomachine: save/restore machine leader pidfdid
Lennart Poettering [Mon, 19 May 2025 09:08:52 +0000 (11:08 +0200)] 
machine: save/restore machine leader pidfdid

5 months agomachine: use the correct escaping calls for machine metadata
Lennart Poettering [Mon, 19 May 2025 09:07:53 +0000 (11:07 +0200)] 
machine: use the correct escaping calls for machine metadata

5 months agomachine: properly remove unit name symlink on removal
Lennart Poettering [Mon, 19 May 2025 09:05:51 +0000 (11:05 +0200)] 
machine: properly remove unit name symlink on removal

5 months agomachine: port machined state files to fopen_tmpfile_linkable()
Lennart Poettering [Mon, 19 May 2025 08:58:16 +0000 (10:58 +0200)] 
machine: port machined state files to fopen_tmpfile_linkable()

Similar to the erlier commit for logind, switch to a more modern way to
write the state files.

5 months agomachine: insist in a valid root directory
Lennart Poettering [Thu, 15 May 2025 10:25:47 +0000 (12:25 +0200)] 
machine: insist in a valid root directory

5 months agologind,machined: expose bus properties for leader PID fd ids, too
Lennart Poettering [Mon, 19 May 2025 15:57:08 +0000 (17:57 +0200)] 
logind,machined: expose bus properties for leader PID fd ids, too

5 months agocore: break line after sd_json_buildo( in varlink-manager.c 37432/head
Ivan Kruglov [Mon, 26 May 2025 14:56:29 +0000 (07:56 -0700)] 
core: break line after sd_json_buildo( in varlink-manager.c

5 months agotest: simple tests for io.systemd.Unit varlink interface
Ivan Kruglov [Mon, 26 May 2025 10:14:28 +0000 (03:14 -0700)] 
test: simple tests for io.systemd.Unit varlink interface

5 months agotest: quote entire path to socket in io.systemd.Manager tests
Ivan Kruglov [Mon, 26 May 2025 10:13:55 +0000 (03:13 -0700)] 
test: quote entire path to socket in io.systemd.Manager tests

5 months agocore: add basic lookup by name/pidref in io.systemd.Unit.List
Ivan Kruglov [Thu, 15 May 2025 10:04:28 +0000 (03:04 -0700)] 
core: add basic lookup by name/pidref in io.systemd.Unit.List

5 months agojson: add unit tests for json_dispatch_const_unit_name()
Ivan Kruglov [Mon, 26 May 2025 10:02:59 +0000 (03:02 -0700)] 
json: add unit tests for json_dispatch_const_unit_name()

5 months agojson: json_dispatch_const_unit_name()
Ivan Kruglov [Fri, 23 May 2025 13:57:02 +0000 (06:57 -0700)] 
json: json_dispatch_const_unit_name()

5 months agocore: Unit Runtime in io.systemd.Unit.List method
Ivan Kruglov [Tue, 13 May 2025 18:40:49 +0000 (11:40 -0700)] 
core: Unit Runtime in io.systemd.Unit.List method

5 months agocore: skeleton for io.system.Unit interface and io.systemd.Unit.List method
Ivan Kruglov [Fri, 15 Nov 2024 08:50:28 +0000 (09:50 +0100)] 
core: skeleton for io.system.Unit interface and io.systemd.Unit.List method

5 months agorepart: add 'fsverity' flag for CopyFiles= lines 35401/head
Allison Karlitskaya [Mon, 2 Dec 2024 09:50:02 +0000 (10:50 +0100)] 
repart: add 'fsverity' flag for CopyFiles= lines

We currently pass the CopyFlags that we use to populate the temporary
directory in the form of a constant at each of the copy_tree_at() call
sites.  De-duplicate that and move it into the `CopyFilesLine` struct,
initializing it from the parser.

Add our first non-constant flag: `fsverity=`.  This can be set to `off`
(the default) or `copy`, in which case we copy the fs-verity state from
the source files.

This arrangement is amenable to the introduction of more flags to
`CopyFiles=` lines, if we want to add them in the future.

Update the `repart.d(5)` manpage.

Closes #35352

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
5 months agorepart: Collect CopyFiles= lines into structs
Allison Karlitskaya [Mon, 2 Dec 2024 09:46:46 +0000 (10:46 +0100)] 
repart: Collect CopyFiles= lines into structs

We currently convert the source:target pairs of the `CopyFiles=` lines
in `repart.d` files into a pairwise strv.  This works great if the only
thing that can be specified is a source and a target, but we're about to
add a flags field.

Let's start by making this a bit more explicit: we now turn each
`CopyFiles=` line into a `CopyFilesLine` struct.  We keep an array of
those in the `Partition` now, instead of the strv.

So far this is a whole lot of added complexity for nothing, but it's
necessary for the next step.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
5 months agomkfs-util: add fsverity option to make_filesystem()
Allison Karlitskaya [Mon, 2 Dec 2024 20:00:47 +0000 (21:00 +0100)] 
mkfs-util: add fsverity option to make_filesystem()

Add an fsverity flag to MkfsFlags and use it to pass the `-O verity`
option when creating an ext4 or f2fs filesystem: they share the same
argument for this.

The only other filesystem that currently supports fs-verity is btrfs and
it doesn't require a flag to be enabled when creating the filesystem.

Nothing uses this yet.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
5 months agomkfs-util: turn quiet/discard to a flags field
Allison Karlitskaya [Tue, 3 Dec 2024 08:21:16 +0000 (09:21 +0100)] 
mkfs-util: turn quiet/discard to a flags field

Add a new `MakeFilesystemFlags` enum and use it to replace the existing
`quiet` and `discard` booleans on `make_filesystem()`.

Update the callers.  While we're doing that, consolidate some duplicated
logic in systemd-repart.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
5 months agomkfs-util: rename a local variable
Allison Karlitskaya [Wed, 19 Mar 2025 14:44:51 +0000 (15:44 +0100)] 
mkfs-util: rename a local variable

Change 'flags' to 'fork_flags' in preparation for using 'flags' as an
argument in the next commit.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
5 months agotest: add a testcase for copy_tree() and fs-verity
Allison Karlitskaya [Mon, 26 May 2025 11:02:33 +0000 (13:02 +0200)] 
test: add a testcase for copy_tree() and fs-verity

5 months agocopy: add support for copying fs-verity status
Allison Karlitskaya [Thu, 28 Nov 2024 13:06:34 +0000 (14:06 +0100)] 
copy: add support for copying fs-verity status

Add a new member to CopyFlags to request copying of fs-verity status.

If copying of fs-verity is requested then we query the descriptor from
each regular file.  If it has one, we use it to setup fs-verity on the
destination, using the same parameters.

Signatures don't seem to be a particularly well-loved (or used) feature
of fs-verity and we don't bother to query them here.  Support for that
could be added later, if desired.

This change means that, with the correct combination of flags, we might
end up calling `fsync()` on a read-only file descriptor.  This is
permitted by POSIX and supported on Linux.

Nothing uses this yet.

Signed-off-by: Allison Karlitskaya <allison.karlitskaya@redhat.com>
5 months agofs-util: prefer linkat(AT_EMPTY_PATH) over /proc/self/fd/ shenanigans
Mike Yuan [Tue, 27 May 2025 00:10:07 +0000 (02:10 +0200)] 
fs-util: prefer linkat(AT_EMPTY_PATH) over /proc/self/fd/ shenanigans

The permission check got relaxed in kernel v6.10, so let's
switch the fallback order around.

This also effectively reverts 94d94f0c0a7d28816c815dc9770cc659769fe980,
as I just realized that link_fd() involves multiple paths and
we can't tell which one tripped ENOENT...

5 months agocgroup-util: drop handcrafted cg_is_empty(), always check cgroup.events populated...
Yu Watanabe [Tue, 27 May 2025 01:41:56 +0000 (10:41 +0900)] 
cgroup-util: drop handcrafted cg_is_empty(), always check cgroup.events populated field (#37624)

5 months agohomed: generate proper error if we cannot create mountpoint for homedir
Lennart Poettering [Fri, 23 May 2025 10:15:45 +0000 (12:15 +0200)] 
homed: generate proper error if we cannot create mountpoint for homedir

Let's make this easier to debug. (When this failed for me due to disk
full it took me a bit to figure out what was going on.)

5 months agoudevadm-info: update error messages (#37619)
Yu Watanabe [Tue, 27 May 2025 01:08:24 +0000 (10:08 +0900)] 
udevadm-info: update error messages (#37619)

5 months agocgroup-util: remove now unused cg_read_event() 37624/head
Mike Yuan [Mon, 26 May 2025 20:32:12 +0000 (22:32 +0200)] 
cgroup-util: remove now unused cg_read_event()

cg_get_keyed_attribute() is a more generic version of this,
and cg_is_empty_recursive() was the only user of this function,
which got converted in the previous commit.

5 months agocgroup-util: drop handcrafted cg_is_empty(), always check cgroup.events populated...
Mike Yuan [Mon, 26 May 2025 20:27:26 +0000 (22:27 +0200)] 
cgroup-util: drop handcrafted cg_is_empty(), always check cgroup.events populated field

This effectively renames cg_is_empty_recursive() to cg_is_empty().
Note that all existing code calls the former and not the latter,
hence with cgv1 support being dropped it's trivial to consult
cgroup.events directly for populated state everywhere.

Additionally, use more generic cg_get_keyed_attribute() helper
rather than cg_read_event().

5 months agosrc/core/manager.c: log preset activity on first boot
Dusty Mabe [Fri, 23 May 2025 13:18:12 +0000 (09:18 -0400)] 
src/core/manager.c: log preset activity on first boot

This gives us a little more information about what units were enabled
or disabled on that first boot and will be useful for OS developers
tracking down the source of unit state.

An example with this enabled looks like:

```
NET: Registered PF_VSOCK protocol family
systemd[1]: Applying preset policy.
systemd[1]: Unit /etc/systemd/system/dnsmasq.service is masked, ignoring.
systemd[1]: Unit /etc/systemd/system/systemd-repart.service is masked, ignoring.
systemd[1]: Removed '/etc/systemd/system/sockets.target.wants/systemd-resolved-monitor.socket'.
systemd[1]: Removed '/etc/systemd/system/sockets.target.wants/systemd-resolved-varlink.socket'.
systemd[1]: Created symlink '/etc/systemd/system/multi-user.target.wants/var-mnt-workdir.mount' → '/etc/systemd/system/var-mnt-workdir.mount'.
systemd[1]: Created symlink '/etc/systemd/system/multi-user.target.wants/var-mnt-workdir\x2dtmp.mount' → '/etc/systemd/system/var-mnt-workdir\x2dtmp.mount'.
systemd[1]: Created symlink '/etc/systemd/system/afterburn-sshkeys.target.requires/afterburn-sshkeys@core.service' → '/usr/lib/systemd/system/afterburn-sshkeys@.service'.
systemd[1]: Created symlink '/etc/systemd/system/sockets.target.wants/systemd-resolved-varlink.socket' → '/usr/lib/systemd/system/systemd-resolved-varlink.socket'.
systemd[1]: Created symlink '/etc/systemd/system/sockets.target.wants/systemd-resolved-monitor.socket' → '/usr/lib/systemd/system/systemd-resolved-monitor.socket'.
systemd[1]: Populated /etc with preset unit settings.
```

Considering it only happens on first boot and not on every boot I think
the extra information is worth the extra verbosity in the logs just for
that boot.

5 months agopolkit: reword 'Interactive authentication required' error
Lennart Poettering [Fri, 23 May 2025 20:05:15 +0000 (22:05 +0200)] 
polkit: reword 'Interactive authentication required' error

I guess the current wording of "Interactive authentication required." is
hard to grok for many users. Let's try to reword this, and say
explicitly:

1. That this is a form of "access denied" error
2. That interactive auth could remedy this
3. But that the client disabled interactive auth

I think these are the three primary elements the error msg needs to
convey. I tried to distill this in a short error string with this.

Fixes: #2081
5 months agocore/cgroup: CGRuntime.cgroup_path indicates whether the cg is still alive
Mike Yuan [Mon, 26 May 2025 20:46:17 +0000 (22:46 +0200)] 
core/cgroup: CGRuntime.cgroup_path indicates whether the cg is still alive

so drop redundant checks in attr getters. Memory and IO accounting
functions already follow this pattern.

5 months agovarlinkctl: if returned error is an errno, print it as one in log message
Lennart Poettering [Mon, 26 May 2025 11:19:43 +0000 (13:19 +0200)] 
varlinkctl: if returned error is an errno, print it as one in log message

5 months agohwdb: make Saitek PLC Pro Flight Rudder Pedals a joystick (#37601)
tuxmainy [Mon, 26 May 2025 20:50:04 +0000 (20:50 +0000)] 
hwdb: make Saitek PLC Pro Flight Rudder Pedals a joystick (#37601)

Fuzzy logic on joystick vs. advanced keyboard detection thinks the
rudders are a keyboard. Adding this forces udev to use this device as
joystick.

```
# udevadm info /dev/input/by-id/usb-Saitek_Saitek_Pro_Flight_Rudder_Pedals-event-joystick
P: /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:06A3:0763.000D/input/input22/event3
M: event3
R: 3
U: input
D: c 13:67
N: input/event3
L: 0
S: input/by-id/usb-Saitek_Saitek_Pro_Flight_Rudder_Pedals-event-joystick
S: input/by-path/pci-0000:00:14.0-usbv2-0:3:1.0-event-joystick
S: input/by-path/pci-0000:00:14.0-usb-0:3:1.0-event-joystick
E: DEVPATH=/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/0003:06A3:0763.000D/input/input22/event3
E: DEVNAME=/dev/input/event3
E: MAJOR=13
E: MINOR=67
E: SUBSYSTEM=input
E: USEC_INITIALIZED=10981053700
E: ID_INPUT=1
E: ID_INPUT_JOYSTICK=1
E: ID_BUS=usb
E: ID_MODEL=Saitek_Pro_Flight_Rudder_Pedals
E: ID_MODEL_ENC=Saitek\x20Pro\x20Flight\x20Rudder\x20Pedals
E: ID_MODEL_ID=0763
E: ID_SERIAL=Saitek_Saitek_Pro_Flight_Rudder_Pedals
E: ID_VENDOR=Saitek
E: ID_VENDOR_ENC=Saitek
E: ID_VENDOR_ID=06a3
E: ID_REVISION=0101
E: ID_TYPE=hid
E: ID_USB_MODEL=Saitek_Pro_Flight_Rudder_Pedals
E: ID_USB_MODEL_ENC=Saitek\x20Pro\x20Flight\x20Rudder\x20Pedals
E: ID_USB_MODEL_ID=0763
E: ID_USB_SERIAL=Saitek_Saitek_Pro_Flight_Rudder_Pedals
E: ID_USB_VENDOR=Saitek
E: ID_USB_VENDOR_ENC=Saitek
E: ID_USB_VENDOR_ID=06a3
E: ID_USB_REVISION=0101
E: ID_USB_TYPE=hid
E: ID_USB_INTERFACES=:030000:
E: ID_USB_INTERFACE_NUM=00
E: ID_USB_DRIVER=usbhid
E: ID_PATH_WITH_USB_REVISION=pci-0000:00:14.0-usbv2-0:3:1.0
E: ID_PATH=pci-0000:00:14.0-usb-0:3:1.0
E: ID_PATH_TAG=pci-0000_00_14_0-usb-0_3_1_0
E: ID_FOR_SEAT=input-pci-0000_00_14_0-usb-0_3_1_0
E: LIBINPUT_DEVICE_GROUP=3/6a3/763:usb-0000:00:14.0-3
E: DEVLINKS=/dev/input/by-id/usb-Saitek_Saitek_Pro_Flight_Rudder_Pedals-event-joystick /dev/input/by-path/pci-0000:00:14.0-usbv2-0:3:1.0-event-joystick /dev/input/by-path/pci-0000:00:14.>
E: TAGS=:seat:uaccess:
E: CURRENT_TAGS=:seat:uaccess:
```

```
# lsusb |fgrep Sait
Bus 001 Device 013: ID 06a3:0763 Saitek PLC Pro Flight Rudder Pedals
```

Closes #34642.

5 months agotree-wide: Handle EINVAL as not supported for chattr_xxx()
Daan De Meyer [Mon, 26 May 2025 14:11:06 +0000 (16:11 +0200)] 
tree-wide: Handle EINVAL as not supported for chattr_xxx()

F2FS returns EINVAL from FS_IOC_SETFLAGS when trying to set
FS_NOCOW_FL. Let's handle this by treating EINVAL as not supported.
While we're at it, make sure we use ERRNO_IS_IOCTL_NOT_SUPPORTED()
across the tree instead of ERRNO_IS_NOT_SUPPORTED() when calling any
of the chattr_xxx() functions.

Fixes #37593

5 months agosocket-util: Move getsockopt_int() to implementation file
Daan De Meyer [Mon, 26 May 2025 14:20:16 +0000 (16:20 +0200)] 
socket-util: Move getsockopt_int() to implementation file

And switch back to negative_errno() at the same time.

5 months agosd-bus: mark two functions as pure 37623/head
Mike Yuan [Mon, 26 May 2025 18:37:48 +0000 (20:37 +0200)] 
sd-bus: mark two functions as pure

5 months agobasic,shared: mark eligible functions with _pure_/_const_
Mike Yuan [Mon, 26 May 2025 18:04:54 +0000 (20:04 +0200)] 
basic,shared: mark eligible functions with _pure_/_const_

Following the recent witch hunt done to static inline functions
I figure we should at least give the compiler some more hint
on optimizations.

5 months agoshared/bitmap: minor modernizations
Mike Yuan [Mon, 26 May 2025 18:01:17 +0000 (20:01 +0200)] 
shared/bitmap: minor modernizations

5 months agoerrno-list: errno_from_name() is pure but not const
Mike Yuan [Mon, 26 May 2025 18:19:59 +0000 (20:19 +0200)] 
errno-list: errno_from_name() is pure but not const

Follow-up for 0c15577abe013e07dba47d5aac126a63ab2dfd33

5 months agofd-util: group close_fd_ptr() with fd funcs, not FILE/DIR stream ones
Mike Yuan [Mon, 26 May 2025 17:24:10 +0000 (19:24 +0200)] 
fd-util: group close_fd_ptr() with fd funcs, not FILE/DIR stream ones

5 months agomachinectl: fix indentation of status output field
Lennart Poettering [Fri, 23 May 2025 13:32:35 +0000 (15:32 +0200)] 
machinectl: fix indentation of status output field

One field is differently aligned then the others in the "status" output.
Fix that.

5 months agoudevadm-info: make the error messages slightly more consistent 37619/head
Frantisek Sumsal [Mon, 26 May 2025 14:52:33 +0000 (16:52 +0200)] 
udevadm-info: make the error messages slightly more consistent

At least across the udevadm-info.c file. No functional changes.

5 months agoudevadm-info: print the original input on error
Frantisek Sumsal [Mon, 26 May 2025 14:44:13 +0000 (16:44 +0200)] 
udevadm-info: print the original input on error

Print the original input value on error instead of the consumed string
(which will be empty).

Previously:
$ udevadm info /dev/block/251:0 -e --attr-match='foo=\'
Failed to parse key/value pair : Invalid argument
$ udevadm info /dev/block/251:0 -e --attr-match='foo'
Missing '=' in key/value pair (null).

Now:
$ build/udevadm info /dev/block/251:0 -e --attr-match='foo=\'
Failed to parse key/value pair foo=\: Invalid argument

(The second scenario can't be hit anymore since
d89b3004da54228eb5ab2f3326a773a6e97924b9 due to an extra check before
calling parse_key_value_argument().)

5 months agoupdate TODO
Lennart Poettering [Mon, 26 May 2025 11:46:10 +0000 (13:46 +0200)] 
update TODO

5 months agounits: enable watchdog notifications for vmspawn
Lennart Poettering [Fri, 23 May 2025 13:45:00 +0000 (15:45 +0200)] 
units: enable watchdog notifications for vmspawn

nspawn supports it and enables it. Let's do this for vmspawn too. It
already supports it in code. Let's make it also work in the unit file.

5 months agotree-wide: Clean up more includes
Daan De Meyer [Fri, 23 May 2025 10:15:45 +0000 (12:15 +0200)] 
tree-wide: Clean up more includes

5 months agobasic + fundamental: Clean up includes (#37595)
Daan De Meyer [Mon, 26 May 2025 07:15:30 +0000 (09:15 +0200)] 
basic + fundamental: Clean up includes (#37595)

5 months agobasic + fundamental: Clean up includes 37595/head
Daan De Meyer [Thu, 22 May 2025 14:08:26 +0000 (16:08 +0200)] 
basic + fundamental: Clean up includes

Split out of #37344.

5 months agologin-util: Mark session_id_valid() as pure
Daan De Meyer [Sun, 25 May 2025 08:05:47 +0000 (10:05 +0200)] 
login-util: Mark session_id_valid() as pure

5 months agobasic: Move userns_supported() to namespace-util.h
Daan De Meyer [Sun, 25 May 2025 08:00:54 +0000 (10:00 +0200)] 
basic: Move userns_supported() to namespace-util.h

5 months agostrv: Drop unnecessary macros
Daan De Meyer [Sun, 25 May 2025 07:58:09 +0000 (09:58 +0200)] 
strv: Drop unnecessary macros

5 months agobasic: Move LogRatelimit struct to log-ratelimit.h as well
Daan De Meyer [Sun, 25 May 2025 06:28:13 +0000 (08:28 +0200)] 
basic: Move LogRatelimit struct to log-ratelimit.h as well

5 months agodocs: add man pages for sd_device_enumerator_[new,ref,unref,unrefp] (#37586)
Shubhendra Kushwaha [Sat, 24 May 2025 20:01:27 +0000 (01:31 +0530)] 
docs: add man pages for sd_device_enumerator_[new,ref,unref,unrefp] (#37586)

For #20929.

5 months agoVarious cleanups (#37597)
Daan De Meyer [Sat, 24 May 2025 19:48:04 +0000 (21:48 +0200)] 
Various cleanups (#37597)

5 months agoTwo follow ups for #37591 (#37594)
Yu Watanabe [Sat, 24 May 2025 19:22:42 +0000 (04:22 +0900)] 
Two follow ups for #37591 (#37594)

5 months agoclangd: Enable UnusedIncludes feature again 37597/head
Daan De Meyer [Fri, 23 May 2025 11:54:46 +0000 (13:54 +0200)] 
clangd: Enable UnusedIncludes feature again

Now that the entire free doesn't trigger any clang unused include
violations anymore, let's re-enable the clangd option as it's much
more useful now that the tree is clean.

5 months agoclang-tidy: Skip public headers
Daan De Meyer [Fri, 23 May 2025 11:03:57 +0000 (13:03 +0200)] 
clang-tidy: Skip public headers

We're very limited in our ability to change these due to backwards
compat, so let's skip them from analysis since we won't be able to
fix the errors anyway.

5 months agoci: Setup clang-tidy meson env with extra options
Daan De Meyer [Wed, 21 May 2025 10:55:35 +0000 (12:55 +0200)] 
ci: Setup clang-tidy meson env with extra options

We want the relevant code to be compiled so that it can be analyzed
by clang-tidy.

5 months agocore: Add missing bpf-dlopen.h includes to bpf skeleton headers
Daan De Meyer [Fri, 23 May 2025 11:36:55 +0000 (13:36 +0200)] 
core: Add missing bpf-dlopen.h includes to bpf skeleton headers

5 months agofundamental: Move declaration of free() to macro-fundamental.h
Daan De Meyer [Fri, 23 May 2025 11:32:52 +0000 (13:32 +0200)] 
fundamental: Move declaration of free() to macro-fundamental.h

Let's put it together with the macro that needs it (mfree()). Also,
get rid of the unnecessary <stdlib.h> include in iovec-util-fundamental.h.

5 months agogenerate-sym-test: Only include required headers
Daan De Meyer [Fri, 23 May 2025 09:27:31 +0000 (11:27 +0200)] 
generate-sym-test: Only include required headers

If we don't use any symbols from a header, let's not include it.

5 months agonetlink-internal: Make message_get_serial() static inline again 37594/head
Daan De Meyer [Sat, 24 May 2025 18:44:32 +0000 (20:44 +0200)] 
netlink-internal: Make message_get_serial() static inline again

There was no need to move this function to the implementation file,
so let's make it static inline again.

Follow up for #37591.

5 months agoforward: Move ChaseFlags forward declaration to forward.h
Daan De Meyer [Sat, 24 May 2025 18:44:12 +0000 (20:44 +0200)] 
forward: Move ChaseFlags forward declaration to forward.h

5 months agolibsystemd: Clean up includes
Daan De Meyer [Thu, 22 May 2025 09:27:45 +0000 (11:27 +0200)] 
libsystemd: Clean up includes

For libsystemd's headers, the changes made depend on whether the
header is installed or not. For installed headers, the only change
made is that commonly included headers were moved to _sd-common.h.
For these headers, there should be no noticeable change in behavior
when including them. For non-installed headers, includes were replaced
with forward declarations where possible as usual.

Split out of #37344.

5 months agobasic: Move ratelimit logging functions to log-ratelimit.h
Daan De Meyer [Sat, 24 May 2025 17:55:42 +0000 (19:55 +0200)] 
basic: Move ratelimit logging functions to log-ratelimit.h

5 months agoshared: Followups for #37575
Daan De Meyer [Sat, 24 May 2025 17:49:08 +0000 (19:49 +0200)] 
shared: Followups for #37575

5 months agolibudev: Clean up includes
Daan De Meyer [Thu, 22 May 2025 09:19:15 +0000 (11:19 +0200)] 
libudev: Clean up includes

Split out of #37344.

5 months agoBugprone argument comment 7 (#37556)
Yu Watanabe [Sat, 24 May 2025 16:53:13 +0000 (01:53 +0900)] 
Bugprone argument comment 7 (#37556)

Follow up from https://github.com/systemd/systemd/pull/37507

5 months agotreewide: correct argument name to user_icon / askpw_icon 37556/head
Jelle van der Waa [Thu, 22 May 2025 08:43:55 +0000 (10:43 +0200)] 
treewide: correct argument name to user_icon / askpw_icon

5 months agokillall: correct argument comment
Jelle van der Waa [Wed, 21 May 2025 18:49:19 +0000 (20:49 +0200)] 
killall: correct argument comment

5 months agovalidatefs: correct argument comments
Jelle van der Waa [Wed, 21 May 2025 18:44:59 +0000 (20:44 +0200)] 
validatefs: correct argument comments

These functions come from util-linux and can't be renamed.

5 months agosd-bus: rename 'add_callback' -> 'install_callback'
Jelle van der Waa [Wed, 21 May 2025 18:34:03 +0000 (20:34 +0200)] 
sd-bus: rename 'add_callback' -> 'install_callback'

Throughout the whole codebase it is called install_callback.

5 months agotpm2-util: rename 'policy' -> 'pcrlock_policy'
Jelle van der Waa [Wed, 21 May 2025 18:22:10 +0000 (20:22 +0200)] 
tpm2-util: rename 'policy' -> 'pcrlock_policy'

Follow the used argument comment naming.

5 months agocreds-util: correct argument comment
Jelle van der Waa [Wed, 21 May 2025 18:19:12 +0000 (20:19 +0200)] 
creds-util: correct argument comment