Commit Graph
79591 Commits
Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek de02b551ad core/condition: fix segfault when key not found in os-release
'ConditionOSRelease=|ID_LIKE$=*rhel*' results in a segfault.
The key 'ID_LIKE' is not present in Fedora's os-release file.

I think the most reasonable behaviour is to treat missing keys as empty.
This matches the "shell-like" sprit, since in a shell empty keys would
by default be treated as empty too. Thus, "ID_LIKE=" would match, if
ID_LIKE is not present in the file, and ID_LIKE=!$foo" would also match.
The other option would be to make those matches fail, but I think that'd
make the feature harder to use, esp. with negative matches.

Documentation is updated to clarify the new behaviour.

https://bugzilla.redhat.com/show_bug.cgi?id=2345544
2025-02-13 18:16:42 +01:00
Lennart Poettering 2d790b225d logind: map enum strings to underscores in logind
Varlink doesn't know dashes in enums, we use them all the time. Convert
dashes to underscores hence before we pass them through varlink.
2025-02-13 18:16:20 +01:00
Lennart Poettering 0c69a67294 varlink: fix IDL for errno error 2025-02-13 18:15:52 +01:00
Lennart Poettering 411bc7c96c update TODO 2025-02-13 17:43:11 +01:00
Lennart Poettering 3329debc93 update TODO 2025-02-13 17:35:59 +01:00
Daan De Meyer 5ca1865ad9 sysupdate: Don't use compression extension for UKIs in manpage
UKIs should generally not be compressed since the kernel image and
initrd in them will already be compressed so let's remove the compression
suffix from the examples in the sysupdate manpage.
2025-02-13 13:08:15 +01:00
Daan De Meyer 78056ba850 ptyfwd: Forward various signals to forked process (#36345) 2025-02-13 11:30:34 +01:00
Daan De Meyer 3fd11dbcd9 Update TODO 2025-02-13 10:21:03 +01:00
Daan De Meyer b000e16798 ptyfwd: Forward various signals to forked process
We want systemd-pty-forward to be something that can be dropped in
somewhere without too much thought. To enable this, let's make sure
we forward various signals to the forked process. This makes sure that
any signals are delivered to the actual child process regardless of whether
it's running within systemd-pty-forward or not.
2025-02-13 10:21:00 +01:00
Lennart Poettering 3c837087c2 login: Queue session for garbage collection on leader death (#36364)
This ensures sessions are cleaned up properly in case the user service
manager was manually stopped.

How to reproduce:
- Install Fedora 41
- Log in
- Run `systemctl --user exit`
- Log in again
- Run `loginctl`

Expected results:
- Only 1 `manager` session

Actual results:
- More than 1 `manager` session
2025-02-13 09:10:06 +01:00
msizanoen a6bccda28d login: Queue session for garbage collection on leader death
This ensures sessions are cleaned up properly in case the user service
manager was manually stopped.
2025-02-13 09:29:11 +07:00
msizanoen b2a4109031 login: Continue watching leader pidfd after stop
This ensures that garbage collection will be triggered when the leader
process dies.
2025-02-13 09:29:11 +07:00
Lennart Poettering 276e641275 update TODO 2025-02-12 22:02:04 +01:00
Lennart Poettering 0eeeb36bd5 update TODO 2025-02-12 21:55:57 +01:00
Daan De Meyer b429f82eaf mkosi: Update to latest
In https://github.com/systemd/mkosi/pull/3497, mkosi has started parsing
options passed after the verb as regular mkosi options instead of options
for the invoked command. We adapt to this change by adding '--' as a delimiter
everywhere where required.
2025-02-12 21:39:27 +01:00
Mike Yuan f565e5a94a core/mount: log only once about fs not supporting new mount API 2025-02-12 18:16:44 +01:00
Mike Yuan c2198d0c3f mountpoint-util: assume fsopen() works in mount_option_supported()
Our baseline includes it now.
2025-02-12 18:16:44 +01:00
Mike Yuan 0d76f1c423 core/mount: rework GracefulOptions= to be just x-systemd.graceful-option=
09fbff57fc introduced new knob
for such functionality. However, that seems unnecessary.

The mount option string is ubiquitous in that all of fstab,
kernel cmdline, credentials, systemd-mount, ... speak it.
And we already have x-systemd.device-bound= that's parsed
by pid1 instead of fstab-generator. It feels hence more natural
for graceful options to be an extension of that, rather than
its own property.

There's also one nice side effect that the setting itself
is now more graceful for systemd versions not supporting
such feature.
2025-02-12 18:16:44 +01:00
Mike Yuan 818315ae61 core/service: drop unneeded unit_add_to_gc_queue()
Follow-up for a1d315730f
and 6ac62d61db

With the aforementioned commits, unit_release_resources()
is dispatched in a dedicated queue, and Service.n_keep_fd_store
has been dropped, hence the comment is outdated. Moreover,
the unit is added to GC queue in unit_notify() already.
No other unit types do this in corresponding _enter_dead()
functions, nor does Service need it anymore.
2025-02-12 17:54:34 +01:00
Mike Yuan 468e87267f core/unit: use UNIT_IS_INACTIVE_OR_FAILED at one more place 2025-02-12 17:49:22 +01:00
Mike Yuan 85f759baee bus-unit-util: add missing assertions 2025-02-12 15:34:54 +01:00
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 https://github.com/torvalds/linux/commit/c84ca912b07901be528e5184fd254fca1dddf2ac

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