Commit Graph

82117 Commits

Author SHA1 Message Date
Luca Boccassi
abe149d669 add parameter to specify hash alg used for PKCS#1 signature in PKCS#7 creation (#37794)
The pkcs7_new() function currently uses the hash algorithm from the X509
certificate's signature, but the content signature may use a different
hash algorithm. This adds a parameter to allow specifying what hash
algorithm the content signature generation used.
2025-06-10 23:07:26 +01:00
Yu Watanabe
5814acca9a resolve: exit from loop for transactions when transactions has been regenerated
Fixes #37458.
2025-06-10 17:30:03 +01:00
Dan Streetman
db83bd7e36 test: update keyutil test to verify new pkcs7 --hash-algorithm param 2025-06-10 08:46:36 -04:00
Dan Streetman
103fa98f84 keyutil: add parameter to specify hash algorithm used for PKCS#1 signature 2025-06-10 08:45:31 -04:00
Dan Streetman
768a297c42 openssl: add hash_algorithm parameter to pkcs7_new()
The pkcs7_new() function currently uses the hash algorithm from the X509
certificate's signature, but the content signature may use a different hash
algorithm. This adds a parameter to allow specifying what hash algorithm the
content signature generation used.
2025-06-10 08:44:51 -04:00
Lennart Poettering
d83ceacc7e tree-wide: say in log message that we ignore error conditions of certain sockopts
Follow our usual style on this.

Follow-up for: #37793
2025-06-10 16:34:51 +09:00
Yu Watanabe
75f8298770 Two coding style fixlets (#37799) 2025-06-10 15:28:51 +09:00
Dai MIKURUBE
a993828547 doc: explicitly mention the license of libudev in LICENSES/README.md (#37792) 2025-06-10 14:46:18 +09:00
Craig McLure
89c8d8bdd1 hwdb: Added Beacn and TC-Helicon Audio controllers (#37798)
This adds the TC-Helicon and Beacn audio devices as AV production hardware,
so that user-space can communicate with them and monitor their inputs.
2025-06-10 13:52:18 +09:00
Yu Watanabe
bdf42d9fd4 sysusers: always initialize ret_xyz when write_temporary_xyz() succeed
No functional change. Just for following our coding style.
2025-06-10 12:57:01 +09:00
Yu Watanabe
58bb08be6d dirent-util: follow our coding style 2025-06-10 12:57:01 +09:00
Américo Monteiro
be87572505 po: Translated using Weblate (Portuguese)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Américo Monteiro <a_monteiro@gmx.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt/
Translation: systemd/main
2025-06-09 23:13:01 +01:00
Luca Boccassi
bb887cf22e socket: downgrade not-supported logging for SO_PASSSEC
Kernel 6.16 started returning EOPNOTSUPP when a required kconfig
is disabled. Downgrade to debug level in that case.

Fixes https://github.com/systemd/systemd/issues/37783
2025-06-09 21:51:39 +02:00
Zbigniew Jędrzejewski-Szmek
d9af093daf meson: drop -Wno-typedef-redefinition for clang
It was added in 1a40a3393e for autotools,
sadly with no explanation, and forward-ported to meson in
5c23128dab. Things seems to work fine without
it now so drop it.

Tested with clang-20.1.5-1.fc43.x86_64.
2025-06-09 20:04:06 +01:00
Mike Yuan
0e9667fd9a basic/forward: replace tab with space 2025-06-09 20:39:23 +02:00
Américo Monteiro
03a961239f po: Translated using Weblate (Portuguese)
Currently translated at 91.8% (236 of 257 strings)

Co-authored-by: Américo Monteiro <a_monteiro@gmx.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/pt/
Translation: systemd/main
2025-06-10 03:05:02 +09:00
Yu Watanabe
4081e072ee Several follow-ups for recent header cleanups (#37785) 2025-06-10 01:01:05 +09:00
Yu Watanabe
169d270e81 meson: update generating lists
- config.h is not necessary when generating lists, hence drop it.
- linux/audit.h and libaudit.h are included by missing_audit.h,
  hence not necessary to include them explicitly.
2025-06-09 16:29:49 +01:00
Antonio Alvarez Feijoo
e16769b8c0 ptyfwd: use hostname argument in pty_forward_set_window_title() if set
Fixes 23f9ff4724
2025-06-09 16:24:44 +01:00
Yu Watanabe
afe1567297 include: net/if.h requires features.h
The header uses __THROW, which is defined in features.h, to make the
header self-consistent.
Note, src/basic/include/sys/mount.h also uses __THROW, and includes
features.h.
2025-06-09 22:45:23 +09:00
Yu Watanabe
8139906eaa journal: use poll.h rather than sys/poll.h
This does not change anything, as poll.h is a one-line wrapper of sys/poll.h.
Note that man pages e.g. poll(2) indicate to include poll.h rather than sys/poll.h.
So, let's use poll.h.
2025-06-09 22:45:23 +09:00
Yu Watanabe
b5aed60222 selinux-setup.c: drop redundant inclusion of selinux/selinux.h
The header is anyway included by selinux-util.h in below.
2025-06-09 22:45:23 +09:00
Yu Watanabe
f37b4031f8 tree-wide: drop unnecessary inclusion of sys/quota.h
As it is included by quota-util.h anyway.
2025-06-09 22:45:23 +09:00
Yu Watanabe
e11f01b78a utmp-wtmp: replace _PATH_WTMPX -> WTMPX_FILE
_PATH_WTMPX is a kind of internal definition in glibc, and
WTMPX_FILE should be an exposed definition. Both are same,
let's use WTMPX_FILE.
Note, for utmp, we use UTMPX_FILE, rather than _PATH_UTMPX.
Let's use consistent macros.
2025-06-09 22:45:23 +09:00
Yu Watanabe
afcb6d671b forward: also include paths.h
It provides several important constants, especially _PATH_BSHELL, which
is used in PID1, executor, and run. The header has been included
indirectly through e.g. libmount.h, mntent.h, utmpx.h, and so on.
Let's explicitly include it in forward.h, as libmount.h and friends that
includes paths.h are irrelevant to _PATH_BSHELL, and we may easily fail
to build when code is touched.
The header is not heavy, hence should not hurt anything.
2025-06-09 22:45:23 +09:00
Yu Watanabe
a60495c44b cryptsetup-util: move definition of crypt_token_max()
As it uses streq(), but string-util.h is not included in the header.
2025-06-09 22:45:23 +09:00
Yu Watanabe
14dc330c9c libcrypt-util: include random-util.h
Necessary for crypto_random_bytes(), which is used in the branch that
HAVE_CRYPT_GENSALT_RA is false. Unfortunately, our CIs tested only the
other branch.
2025-06-09 22:45:23 +09:00
Yu Watanabe
6c12289fc8 meson: fix doubled # before include
Follow-up for b5337d1d52.
2025-06-09 10:20:54 +01:00
Luca Boccassi
f245fa0058 test: do not fail when lacking privs to create sysfs directory
4109s /* test_mdio_bus */
4109s src/libsystemd/sd-device/test-sd-device.c:55: Assertion failed: Expected "mkdir_p(syspath, 0755)" to succeed, but got error: Permission denied
4109s (mdio_bus) terminated by signal ABRT.
4109s src/libsystemd/sd-device/test-sd-device.c:37: Assertion failed: Expected "r = safe_fork("(mdio_bus)", FORK_CLOSE_ALL_FDS|FORK_DEATHSIG_SIGTERM|FORK_REOPEN_LOG|FORK_LOG|FORK_WAIT|FORK_NEW_MOUNTNS|FORK_MOUNTNS_SLAVE, NULL)" to succeed, but got error: Protocol error

Follow-up for 687a92a1b6
2025-06-09 15:11:30 +09:00
Daan De Meyer
1b4645d762 forward: Drop socklen_t forward declaration
This is glibc specific and doesn't exist on musl, since removing only
means adding one more include in selinux-util.h, let's drop it.

Fixes #37779
2025-06-08 10:58:56 +09:00
Lennart Poettering
1434ccf709 nspawn: do basic port to PidRef
THis is sometimes a bit superficial, but in many cases allows us to use
pidfd for various of our operations.
2025-06-07 00:28:07 +02:00
Lennart Poettering
790f516217 machined: open up machine registration for unpriv clients also via D-Bus
This is already opened up via Varlink. Let's also open it up via D-Bus
with the same polikit operation.
2025-06-07 00:27:11 +02:00
Lennart Poettering
02927af799 machined: properly open up all missing method calls via D-Bus to unpriv clients
These method calls all already have polkit hookup, hence actually allow
them to go through on all levels.

This is mostly playing catchup with a variety of calls added over the
years.
2025-06-06 22:15:25 +02:00
Zbigniew Jędrzejewski-Szmek
8ec2e177b0 coredump: fix 0-passed-as-pointer warning 2025-06-06 22:15:03 +02:00
Lennart Poettering
ac8c558629 nspawn: start polkit agent while we do polkit operations
Let's make sure unpriv nspawn can acquire privs even when invoked
outside of a desktop environment that has a polkit agent registered.
2025-06-06 22:14:50 +02:00
Yu Watanabe
b5bd717fcd test: extend timeout and enable generating debugging logs
Not sure why the test failed, but maybe the test environment is too
slow? Even this does not fix the failure, by enabling debugging logs,
this hopefully provides more useful information for debugging.

For issue #37685.
2025-06-06 19:43:32 +01:00
Yu Watanabe
c928defc08 run: ignore bus connection error in acquiring invocation ID (#37763)
This introduce bus_error_is_connection(), and use it where applicable.
Then, this makes connection errors in acquiring invocation ID by
systemd-run handled gracefully, like we already do other places.

Fixes #37675.
2025-06-07 01:55:21 +09:00
Yu Watanabe
6c2558a2fc tree-wide: allow building with -Wgnu-variable-sized-type-not-at-end option for clang (#37499)
Follow-up for #36993.
Closes #37497.
2025-06-07 01:02:38 +09:00
Yu Watanabe
eb09b4b546 run: ignore bus connection error in acquiring invocation ID
Similar to 2b983b43c6, but for acquiring
invocation ID.

Fixes #37675.
2025-06-07 00:01:15 +09:00
Yu Watanabe
687a92a1b6 sd-device: replace '!' with '/' before calling sd_device_new_from_subsystem_sysname()
Device ID uses device directory name as is, hence may contain '!', but
sd_device_new_from_subsystem_sysname() expects that the input is sysname.
So, we need to replace '!' with '/'.

Follow-up for 1393c5a2a4.
Fixes #37711.
2025-06-06 23:59:02 +09:00
Lennart Poettering
52c9a3c392 codeql: taint basename() 2025-06-06 23:53:53 +09:00
Lennart Poettering
0f64d570cb repart: fix CopyBlocks=auto for verity-sig partitions, even harder (#37704)
@DaanDeMeyer, this is for you.

Seems to work great here to duplicate ParticleOS onto another disk.
2025-06-06 16:06:26 +02:00
Lennart Poettering
113006a1f3 tree-wide: basename -> path_extract_filename (#34906) 2025-06-06 15:53:28 +02:00
Yu Watanabe
ac004f4cc9 tree-wide: introduce bus_error_is_connection() and use it where applicable 2025-06-06 21:42:25 +09:00
Lennart Poettering
6513646c62 repart: use partition_designator_is_verity_sig() + partition_designator_is_verity() more 2025-06-06 12:37:44 +02:00
Lennart Poettering
d3a6606cea repart: try harder to find verity-sig partitions for CopyBlocks=auto
verity-sig partitions are not kernel concepts, hence dm-verity won't
link them for us from the slaves/ subdir in sysfs. Hence let's instead
look up the partition via udev's database.

Hence: when we search for the data+verity+verity-sig partitions then
search for the first two as usual, but search for the latter by looking
up the udev props on the first two, and then following the paths
provided therein.

Fixes: #34835
2025-06-06 12:37:44 +02:00
Lennart Poettering
188467dfd9 udev: add udev properties that point to verity/verity sig metadata partitions from data partitions
This extends the dissect_image builtin to actually add device node
references to the device nodes where the associated data is placed, if
we can find it.

This is kept very generic, and independent from the roothash properties
and suchlike, since it makes sense to make it possible to set these
properties also independently of the dissect-image builtin.

The device path is a /dev/disk/by-diskseq/ symlink, so that we have
stable reference that are not subject to dev_t reuses.
2025-06-06 12:37:41 +02:00
Lennart Poettering
870d6da909 gpt: add partition_designator_is_verity() helper
And rework partition_designator_is_verity_sig() to be based on
partition_verity_sig_to_data(), so that we don't have to maintain two
lists of verity sig partition types.
2025-06-06 12:37:20 +02:00
Yu Watanabe
f2a8cc943d sd-lldp-rx: add VLAN ID parsing (#37725)
While the `port_vlan_id` field was already present in the
`sd_lldp_neighbor`, it wasn't currently parsed from the LLDP packet.
Added support for that as well as a small parsing test.

Closes #28354.
2025-06-06 19:12:48 +09:00
Yu Watanabe
b1bfa60254 TODO: drop completed entry 2025-06-06 19:09:49 +09:00