Commit Graph

79370 Commits

Author SHA1 Message Date
Mike Yuan
0fa062f983 core/dbus-mount: add missing ReloadResult and CleanResult properties 2025-02-12 15:34:54 +01:00
Mike Yuan
c7c6cf2031 core/mount: trivial coding style cleanups 2025-02-12 15:34:53 +01:00
Mike Yuan
74c0d9726c core/mount: report accurate can_start and can_reload 2025-02-12 15:33:11 +01:00
Mike Yuan
65bc0c03b9 core/mount: check parameters_fragment first in mount_enter_(re)mounting()
I.e. don't perform any action if we can't spawn mount task anyway.
Later the same check would be added to mount_can_start/reload(),
so this makes things more coherent too.
2025-02-12 15:32:30 +01:00
Mike Yuan
7e9a78d6be core/mount: filter out "fail" option as well 2025-02-12 14:43:06 +01:00
Mike Yuan
5fe4c30ca7 core/dbus-service: fix alignment 2025-02-12 14:43:04 +01:00
Daan De Meyer
7ee5b95f6b udev: several improvements for debugging logs (#36357) 2025-02-12 14:35:46 +01:00
Paul Fertser
a3aad16c6e socket: resolve unit specifiers in BindToDevice
There are cases where templated Socket unit files are used for network services
with interface name used as an instance. This patch allows using %i for
BindToDevice setting to limit the scope automatically.
2025-02-12 12:03:42 +01:00
Yu Watanabe
b3b4420620 udev-watch: do not try to remove invalid watch handle
When a new device is processed, there should be no watch handle for
the device, hence udev_watch_clear() provides -1. Let's not try to call
inotify_rm_watch() in that case.

This should not change any behavior. Just for suppressing spurious
debugging log:
=====
(udev-worker)[3626140]: zram1: Removing watch handle -1.
=====
2025-02-12 09:27:24 +09:00
Yu Watanabe
a52aad3b4b udev-watch: mention that the failure is ignored 2025-02-12 09:26:51 +09:00
Yu Watanabe
951def0e27 udev-worker: add debugging log about success of flock() for whole block device 2025-02-12 09:20:58 +09:00
Anthony Messina
6cbd126b0b nspawn: add @keyring to default syscall allow_list
Keyring namespacing introduced in kernel version v5.3-rc1 c84ca912b0

Fixes #17606
2025-02-12 08:05:11 +09:00
Yu Watanabe
c0cc24ba42 Follow-ups for xattr-util (#36335) 2025-02-12 07:59:24 +09:00
Philip Withnall
cc0c4bc500 man: Fix a minor typo in the org.freedesktop.login1 man page
Signed-off-by: Philip Withnall <pwithnall@gnome.org>
2025-02-11 19:27:38 +01:00
Mike Yuan
a31f7bc2ac test-xattr-util: return early if not privileged enough to set trusted.* 2025-02-11 17:00:42 +01:00
Mike Yuan
d696e9e64f test-xattr-util: relax listxattr() retval check
Follow-up for d228afd792

Apparently security.selinux might get set on the file too,
behind our back.
2025-02-11 16:57:56 +01:00
Mike Yuan
78b47a4e89 xattr-util: drop unnecessary nofollow normalization
Follow-up for b8df25dcfe

This is some leftover from get/listxattrat() usage which
got dropped later.
2025-02-11 16:57:56 +01:00
Muhammad Nuzaihan Bin Kamal Luddin
81ae2237c1 resolve: add an option to explicitly disable query AAAA, SRV, MX, etc... (#34165)
Based on this patch i had submitted to RedHat
(https://issues.redhat.com/browse/RHEL-56280), i am submitting this
patch to this upstream systemd.

There is no way to explicitly enable/disable IPv6 AAAA queries.

Problem was that i am using RHEL9 and some applications does not use a
newer glibc that supports `no-aaaa` option in `/etc/resolv.conf`. So
some applications will still resolve IPv6 AAAA even with `no-aaaa`
option and it is inconsistent across the system where some work and some
don't.

So this systemd-resolved patch catch-all queries and disable IPv6 AAAA
queries for all applications in the OS by having an option
`RefuseRecordTypes=AAAA` to disable IPv6 AAAA queries.

Although https://github.com/systemd/systemd/pull/28136 tries to fix this
automatically but it still does not work with
`net.ipv6.conf.all.disable_ipv6 = 1`. Also tried with explicitly
removing the conditional and force set `family = AF_INET` and still
resolves AAAA records.

The issue is that i want to explicitly disable IPv6 AAAA queries instead
of systemd-resolved to figure out itself which address family it is
using, which always have problems.
2025-02-11 18:29:39 +09:00
Yu Watanabe
1e4d0b00e5 string-util: introduce strprepend(), drop effectively unused strnappend() (#36343)
Split out from #36337
2025-02-11 18:09:03 +09:00
Alexander Shopov
75c898284b po: Translated using Weblate (Bulgarian)
Currently translated at 100.0% (259 of 259 strings)

Co-authored-by: Alexander Shopov <ash@kambanaria.org>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/bg/
Translation: systemd/main
2025-02-11 11:05:05 +09:00
Mike Yuan
63ed611579 string-util: modernize strextendn() a bit
l == SIZE_MAX requires no special handling, since we assert
on (s || l == 0) above.
2025-02-10 19:39:22 +01:00
Mike Yuan
146b2ed6a6 string-util: drop now unused strnappend() 2025-02-10 19:39:22 +01:00
Mike Yuan
ea5fbc3938 env-util: use strextendn() instead of strnappend() where appropriate 2025-02-10 19:39:21 +01:00
Mike Yuan
ce0a510667 cryptsetup: port to strprepend() 2025-02-10 19:39:21 +01:00
Mike Yuan
b40694f5fc string-util: introduce strprepend() helper 2025-02-10 19:39:21 +01:00
Lennart Poettering
fd2a114061 bootctl: fix potential uninitialized memory access (#36329) 2025-02-10 15:34:38 +01:00
Lennart Poettering
ceebfc3fbe escape: apply the minimal ansi highlighting on --help we usually do (#36339) 2025-02-10 15:33:59 +01:00
Lennart Poettering
a3196d4e9e update TODO 2025-02-10 10:05:01 +01:00
Jan Kalabza
c19451f840 po: Translated using Weblate (Czech)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Jan Kalabza <jan.kalabza@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main
2025-02-10 11:59:59 +09:00
Lennart Poettering
37252381d2 bootctl,kernel-install: suffix some paths referring to dirs in log messages with / 2025-02-10 01:15:52 +01:00
Lennart Poettering
592b715f4f update TODO 2025-02-09 23:44:00 +01:00
Lennart Poettering
af5b961ad8 bootctl: minor reordering of fields in output
Let's move the currently used/default/oneshot entry output after the
basic info about the boot loader itself, since conceptually these are
objects kinda "one level down" from the boot loader perspective. Hence,
let's *first* show all info about the boot loader itself before we
display the objects it manages.

This is just a trivial change in output, just swaps th elines for these
fields with the ones showing where the boot loader is installed.
2025-02-09 23:34:29 +01:00
Luca Boccassi
2ac8fcf656 ukify: add --pcr-certificate= parameter
Public keys and certificates are not the same, as the latter embeds more
information that the former, and other tools like sd-measure have distinct
parameters for each of them.
Add a new --pcr-certificate= parameter to ukify, and use it to pass certs
down to sd-measure, as an alternative to --pcr-public-key=. Do not allow
specifying both.
2025-02-09 22:24:00 +00:00
Lennart Poettering
df418fa234 bootctl: suppress output of empty partition info if we also have no idea about EFI binary path
So far we'd output both the partition and the binary path always, even
if we didn't know either (but in that case show empty information).
Let's address this, and show partition info only if we know it, or if we
know the EFI binary path, but suppress both if we know neither.

Note that we'll show the partition info if we don't know it still if we
know the EFI binary path used for boot, since it is relative to the
partition of course, and hence it's really strange to know one but not
the other, hence it deserves some mentioning in the output.
2025-02-09 23:23:38 +01:00
Lennart Poettering
26bfd97216 bootctl: also shown whether stub loader partition data was passed
Let's make the stub and loader output sections more alike, and say in
both cases whether we recieved that data from the boot phase or not the
same way.
2025-02-09 23:21:14 +01:00
Lennart Poettering
df28afe9b2 bootctl: fix potential uninitialized memory access
And while we are at it, let' get rid of have_xyz_partition_uuid
variables, to simplify things.
2025-02-09 23:19:46 +01:00
Yu Watanabe
5dbd751ccc tmpfiles: 3 trivial cleanups (#36332) 2025-02-10 02:33:33 +09:00
Yu Watanabe
869b0dfe6e core: remove path to transient unit file from unit name maps on stop (#36186)
Fixes #35190.
2025-02-10 00:48:01 +09:00
Michael Olbrich
e91c5cf06a missing_sched: add CLONE_PIDFD
CLONE_PIDFD was introduced in v5.2 and in sched.h in glibc-2.31 so
without this, building with older version fails with:

src/basic/raw-clone.h:41:108: error: 'CLONE_PIDFD' undeclared (first use in this function); did you mean 'CLONE_FILES'?
2025-02-10 00:43:53 +09:00
Yu Watanabe
aaa274ed7f xattr-util: try new *xattrat() family syscalls first (#36228)
While killing cgroup v1 I want to turn all cg_* helpers to take
cgroupfs_fd + cg path, which means all relevant path operations must
support openat() semantics. `removexattrat()` is currently missing. I
took the chance to do a bigger refactor for xattr-util.
2025-02-10 00:41:38 +09:00
Daan De Meyer
dc90f083d0 storagetm: Check if /sys/kernel/config is a mountpoint
Otherwise we'll fail with an unclear error later on so let's check
this first before continuing.
2025-02-09 16:40:45 +01:00
Mike Yuan
8dc4f9a944 tmpfiles: drop redundant proc_mounted() check
Follow-up for 01131684ac

After the mentioned commit, the execution of tmpfiles
is aborted without /proc/. No need to check for individual
operations.
2025-02-09 15:39:25 +01:00
Mike Yuan
7b66a950db tmpfiles: use prefix_roota() where appropriate 2025-02-09 15:39:24 +01:00
Mike Yuan
6f91e7a3be tmpfiles: fix copypasta in create_symlink() (FIFO -> symlink) 2025-02-09 15:39:22 +01:00
Enrico Tagliavini
1740bbc98b hwdb: add accel orientation and location for the BMAX Y14
The BMAX MaxBook Y14 has 2 acceleromenter sensors, one seems to be in
the display, the other in the base. With the default ACCEL_MOUNT_MATRIX
monitor-sensor would report the display to be rotate of 180 degrees
compared to its real position, i.e. upside down when normal and vice
versa. Left up and right up are also swapped.

Correcting the ACCEL_MOUNT_MATRIX for the display sensor solves the
issue and monitor-sensor reports the correct values.

For the Y13 model the Z axis value was also inverted. For the Y14 to
work correctly, this is not necessary, but I'm not sure how to double
check this.

Sensors info:

P: /devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX010A:00/iio:device0
M: iio:device0
R: 0
U: iio
T: iio_device
D: c 237:0
N: iio:device0
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:15.0/i2c_designware.0/i2c-0/i2c-KIOX010A:00/iio:device0
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device0
E: DEVTYPE=iio_device
E: MAJOR=237
E: MINOR=0
E: USEC_INITIALIZED=25931869
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

P: /devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-3/i2c-KIOX020A:00/iio:device1
M: iio:device1
R: 1
U: iio
T: iio_device
D: c 237:1
N: iio:device1
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:15.3/i2c_designware.3/i2c-3/i2c-KIOX020A:00/iio:device1
E: SUBSYSTEM=iio
E: DEVNAME=/dev/iio:device1
E: DEVTYPE=iio_device
E: MAJOR=237
E: MINOR=1
E: USEC_INITIALIZED=26000295
E: IIO_SENSOR_PROXY_TYPE=iio-poll-accel iio-buffer-accel
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:systemd:
E: CURRENT_TAGS=:systemd:

accel-display
acpi:KIOX010A:KIOX010A:
dmi:bvnAmericanMegatrendsInternational,LLC.:bvr5.00_002:bd05/13/2024:br5.27:efr1.1:svnAMI:pnIntel:pvrDefaultstring:rvnAMI:rnIntel:rvrDefaultstring:cvnDefaultstring:ct31:cvrDefaultstring:skuH8Y6:

accel-base
acpi:KIOX020A:KIOX020A:
2025-02-09 23:36:06 +09:00
Mike Yuan
3c06e2efb8 smack-util: several cleanups
- Make _read_at and _apply_at variants the "canonical" functions
  (which leverage xsetxattr()/xremovexattr()), turn others
  into static inline helpers
- Unexport string table lookup (not used anywhere else)
- Define nop functions as static inline if !ENABLE_SMACK
2025-02-09 14:51:04 +01:00
Mike Yuan
61b3d116ee tmpfiles,chown-recursive: port to xsetxattr()/xremovexattr() 2025-02-09 14:51:04 +01:00
Mike Yuan
d228afd792 test-xattr-util: add test cases for symlinks 2025-02-09 14:51:04 +01:00
Mike Yuan
b8df25dcfe xattr-util: try new *xattrat() family syscalls first
Added in 6140be90ec

However, when O_PATH fds are encountered we'd have to go by
/proc/self/fd/ still, since the kernel people are reluctant
to make the new syscalls work with them
(https://lore.kernel.org/linux-fsdevel/20250206-steril-raumplanung-733224062432@brauner/)
Hence getxattrat() and listxattrat() are not employed.

While at it, remove the discrepancy between path being NULL
and empty - I don't grok the "security issue" claimed earlier,
but nowadays even the kernel treats the two as identical:
e896474fe4
2025-02-09 14:51:04 +01:00
Mike Yuan
baca3581ea xattr-util: modernize getcrtime_at() and friends
- Drop fd_ prefix for openat()-like function
- Make fd_setcrtime() accept O_PATH fds too
- Use statx_timestamp_load()
2025-02-09 14:51:03 +01:00