Commit Graph

78961 Commits

Author SHA1 Message Date
Yu Watanabe
f3cbd4da12 udev-dump: voidify one function call
Fixes CID#1590377.
2025-01-23 01:50:13 +09:00
Daan De Meyer
d3d501e949 test: Make sure we run lcov from the meson source directory
In ac75c51927, we accidentally changed
the working directory that the tools executed in the wrapper script
are invoked in. This broke our invocations of lcov. Let's explicitly
run those in the meson source directory again to fix the coverage
workflow.
2025-01-23 01:32:37 +09:00
Léane GRASSER
e8908d2fc1 po: Translated using Weblate (French)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2025-01-22 23:43:34 +09:00
Yu Watanabe
e887b3006c networkd-test: unconditionally stop previous invocation of networkd before starting new one
When networkd is already running, creating some .network files and
friends and starting networkd does not take any effect. Let's always
restart networkd when we want to start a new invocation.
2025-01-22 10:29:59 +00:00
Lennart Poettering
8946dabaa3 mountpoint-util: several tweaks for fd_is_mount_point(), drop support for kernels without /proc/pid/fdinfo/ (#36093) 2025-01-22 09:37:25 +01:00
Mike Yuan
6cab0df904 mountpoint-util: port path_is_mount_point() to chase_and_open_parent() 2025-01-22 01:37:32 +01:00
Mike Yuan
7ce2c1bb5f mountpoint-util: rename fd_is_mount_point() to is_mount_point_at()
fd_* functions in our codebase usually mean fd-specific operations,
while this one actually takes openat()-style params. Rename it
accordingly hence.
2025-01-22 01:37:31 +01:00
Mike Yuan
e2f97c790e mountpoint-util: some tweaks for fd_is_mount_point()
- Drop fstat() fallback path now that we assume fdinfo
  is available
- Use at_flags_normalize_nofollow()
- Accept empty path the same way as NULL
- Accept fd being AT_FDCWD and filename being "."
2025-01-22 01:37:09 +01:00
Mike Yuan
e5a3127339 mountpoint-util: our baseline includes fdinfo and mnt_id now 2025-01-22 01:12:55 +01:00
Mike Yuan
229429a799 mountpoint-util: check >= 0 for success 2025-01-22 01:12:54 +01:00
Mike Yuan
c3b7f0240f mountpoint-util: update comment in is_name_to_handle_at_fatal_error()
We can now assume name_to_handle_at() syscall is available,
however the underlying fs can still lack support for it.
2025-01-22 01:12:10 +01:00
Mike Yuan
6981203f3a fs-util: introduce at_flags_normalize_nofollow() helper 2025-01-22 00:52:34 +01:00
Lennart Poettering
eab9b9b4ea update TODO 2025-01-21 23:06:55 +01:00
Lennart Poettering
bd9553d677 varlink: fix error name
The documentation and code agree on the same name, since always, but
when I put together the IDL I made a mistake and insert a "Not" that
wasn't supposed to be there.

Let's correct that.
2025-01-21 23:01:31 +01:00
Lennart Poettering
dc5af20b0c tree-wide: always include our own headers with "" rather than <>
We got this almost always right. Fix this for a few outliers.
2025-01-21 17:05:36 +00:00
Daan De Meyer
d641a1f8f7 mkosi: Various tools tree fixes (#36059) 2025-01-21 15:17:36 +01:00
Daan De Meyer
c0165676e9 TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM
On CentOS Stream 9/10 booting mkosi qemu with --firmware=linux doesn't
add the virtual TPM to the virtual machine which means TEST-74-AUX-UTILS.run.sh
fails because it requires a TPM.

Let's move the systemd-pcrlock logic that requires a TPM to
TEST-70-TPM.pcrlock to avoid the problem.
2025-01-21 13:48:13 +01:00
Lennart Poettering
3c58ce6bae user-record/home: add concept of alias names for accounts (#36041) 2025-01-21 12:57:52 +01:00
Daan De Meyer
34da8dd345 test: Look for qemu in /usr/libexec/qemu-kvm as well
On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use
that if it's available.
2025-01-21 12:29:56 +01:00
Daan De Meyer
cb13d6b44f mkosi: Run more commands as root
zypper has some new rather questionable userspace level permission
checking that blows ups completely when operating as root on an
cache directory owned by a non-root user, so let's build the tools
tree and set up meson as root to avoid the issue.

(https://github.com/openSUSE/libzypp/issues/603)

Also drop a leftover debug message from coverage.yml while we're at
it.
2025-01-21 10:59:01 +01:00
Daan De Meyer
26025dba3e mkosi: Don't set -O ^orphan_file in centos stream 9 tools tree 2025-01-21 10:57:29 +01:00
Daan De Meyer
7a75a6f70f mkosi: lcov and shellcheck are not in EPEL 10
Let's drop these from CentOS Stream tools trees as they are not in
EPEL 10 yet.
2025-01-21 10:57:29 +01:00
Daan De Meyer
7645139bd7 mkosi: Use a bigger variety of tools tree distributions
Let's add more coverage for building with tools trees by building
each image with a tools tree of the same distribution and release.

Because not every tools tree distribution has a newer meson yet, we
only use --max-lines= when meson actually knows the option.
2025-01-21 10:57:29 +01:00
Daan De Meyer
685666afd8 mkosi: Update to latest 2025-01-21 10:57:27 +01:00
Lennart Poettering
3d3f27cd9a update TODO 2025-01-21 09:59:16 +01:00
Lennart Poettering
853e9b754a test: add test for homed alias and realm user resolution 2025-01-21 09:59:13 +01:00
Lennart Poettering
5cd7b455e0 homectl: add support for creating users with alias names 2025-01-21 09:59:09 +01:00
Lennart Poettering
40fd0e0423 homed: support user record aliases 2025-01-21 09:59:05 +01:00
Lennart Poettering
a642f9d2d3 pam_systemd_home: support login with alias names + user names with realms
This in particular makes sure that we normalize the user name and update
it in the PAM session, once we acquire it. This means that if you have a
user with name "a" and alias "b", and the user logs in as "b" they end
up properly with "a" as user name set, as intended by the PAM gods.

Moreover, if you have a user "c" in a ralm "d", they may log in by
specifying "c" or "c@d", with equivalent results.
2025-01-21 09:59:02 +01:00
Lennart Poettering
1fb53bb561 pam_systemd_home: use right field name in error message 2025-01-21 09:58:58 +01:00
Lennart Poettering
e2e1f38f5a user-record: add support for alias user names to user record 2025-01-21 09:58:50 +01:00
Lennart Poettering
8aacf0fee1 user-record: add helper that checks if a provided user name matches a record
This ensures that user names can be specified either in the regular
short syntax or with a realm appended, and both are accepted. (The
latter of course only if the record actually defines a realm)
2025-01-21 09:58:29 +01:00
Lennart Poettering
30de569174 pam: minor coding style tweaks 2025-01-21 09:58:26 +01:00
Lennart Poettering
5072f4268b strv: add strv_equal_ignore_order() helper 2025-01-21 09:56:53 +01:00
Yu Watanabe
e7e707f058 networkd-test.py: generate debugging logs of networkd 2025-01-21 09:48:17 +01:00
Luca Boccassi
606c5e7580 ukify: add --policy-digest option
Uses the newly added policy-digest verb of systemd-measure, for the same
purpose: build a UKI and get digests for the .pcrsig section out, so
that they can be offline signed and reattached
2025-01-21 09:19:49 +01:00
Luca Boccassi
175cb87a1c measure: add policy-digest verb
When doing offline signing we need to know the exact payload
to sign, and the 'calculate' verb doesn't really show that, it
shows the PCR values. But what we sign is the hash of the policy.
So add a new verb that outputs the json payload that goes in the
.pcrsig section, without the .sig object, so that we can take them
and give the .pol object to an offline and asynchronous signing
service, such as SUSE's Open Build Service, and then add the .sig
object to the json and attach it to a UKI.
2025-01-21 00:07:58 +00:00
Mike Yuan
9bfc13e93a pidfd: cache our own pidfd inode id, and use it at various places (#36060)
This is split out of and preparation for #35224, but makes a ton of
sense on its own
2025-01-21 00:16:12 +01:00
Luca Boccassi
f6a04dc149 ukify: print debug/progress messages to stderr and pass through --json to systemd-measure (#36081) 2025-01-20 21:34:59 +00:00
Lennart Poettering
169b0d4eb0 udev: allow to enable trace logging in systemd-udevd (#36070)
split out of #35968.
2025-01-20 22:02:13 +01:00
Lennart Poettering
b2b7c54c17 update TODO 2025-01-20 21:51:40 +01:00
Lennart Poettering
243f7ea3ed notify: add support for MANAGERPIDFDID 2025-01-20 21:51:40 +01:00
Lennart Poettering
7933e971ce pid1: pass pidfdids to invoked services in $MAINPIDFDID and $MANAGERPIDFDID 2025-01-20 21:51:40 +01:00
Lennart Poettering
36a2be13c4 random-util: include pidfdid in fallback RNG buffer
This doesn't make the RNG cryptographic strength, but if we have it
easily accessible, why not include the pidfd id. It is after all not
vulnerable to reuse.
2025-01-20 21:51:40 +01:00
Lennart Poettering
4ace93da8c pidref: now that we have the cached pidfdid of our own process, use it
Note that this drops a lot of "const" qualifiers on PidRef arguments.
That's because pidref_is_self() suddenly might end changing the PidRef
because it acquires the pidfd ID.

We had this previously already with pidfd_equal(), but this amplifies
the problem.

I guess we C's "const" doesn't really work for stuff that contains
caches, that is just conceptually constant, but not actually.
2025-01-20 21:51:40 +01:00
Lennart Poettering
afede53ae9 pidfd-util: add helper for getting our own pidfdid
let's start caching our own pidfd id, since it's somewhat involved to
get but a much better identifier for things than the classic PID is.
2025-01-20 21:51:29 +01:00
Lennart Poettering
5dc9d5b4ea pidfd-util: dont open a new pidfd unnecessarily in pidfd_check_pidfs() 2025-01-20 21:49:38 +01:00
Lennart Poettering
81cf3dc466 build: fail the build if we accidentally drop a "const" qualifier on a parameter
let's be strict here, our codebase allows it.
2025-01-20 21:44:23 +01:00
Lennart Poettering
c66a7ca6e5 machine-id-setup: move code to use chase() (#35979)
I just wanted to switch the machine id setup code to use chase() or its
changes, given it supports --root=/--image= operation. That turned out
to be a rabbit hole, and became much bigger...
2025-01-20 21:18:24 +01:00
Lennart Poettering
52e2033ebc cryptsetup and friends: use dispatch_verb() (#36072) 2025-01-20 21:17:01 +01:00