1
0
mirror of https://github.com/systemd/systemd synced 2026-03-26 16:54:53 +01:00

Compare commits

..

4 Commits

Author SHA1 Message Date
David Tardon
d23a7eb4c0 udev-rules: use the right variable
We carefully prepare a copy of a local buffer to save in device cache
and then save the buffer there instead... This leads to abort in free()
on exit (also, copied is leaked).

Reproducer:
 # udevadm test /sys/block/sr0

Follow-up-for: a9559ebcbcf3098b2c14e5e10e99d05aaffe4ac3

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2406118
2025-12-06 02:29:24 +09:00
Luca Boccassi
fdb9ad1a44 pid1: do not fail if dlopen of libmount fails because it is not compiled in
It is now possible to build and run without libmount. But if support
is compiled in, then we need to be able to load it. Hence gracefully
skip it when support is not compiled in, but fail otherwise.
2025-12-06 01:36:43 +09:00
Luca Boccassi
64ba571576 Reapply "pid1: pull in libmount unconditionally"
It was actually intended to load libmount very early, as it is
needed by more than just mount units, such as umount_recursive(),
bind_remount_recursive(), get_sub_mounts(), etc.

Fixes https://github.com/systemd/systemd/issues/39994

This reverts commit 46b4b33c256b918652d5e0b1b5ec376b598111f6.
2025-12-06 01:36:43 +09:00
Daniel Rusek
405a58752e po: Translated using Weblate (Czech)
Currently translated at 100.0% (264 of 264 strings)

Co-authored-by: Daniel Rusek <mail@asciiwolf.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/cs/
Translation: systemd/main
2025-12-05 16:03:15 +00:00
4 changed files with 22 additions and 12 deletions

View File

@ -9,7 +9,7 @@ msgid ""
msgstr "" msgstr ""
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-11-26 01:17+0000\n" "POT-Creation-Date: 2025-11-26 01:17+0000\n"
"PO-Revision-Date: 2025-12-05 13:08+0000\n" "PO-Revision-Date: 2025-12-05 15:00+0000\n"
"Last-Translator: Daniel Rusek <mail@asciiwolf.com>\n" "Last-Translator: Daniel Rusek <mail@asciiwolf.com>\n"
"Language-Team: Czech <https://translate.fedoraproject.org/projects/systemd/" "Language-Team: Czech <https://translate.fedoraproject.org/projects/systemd/"
"main/cs/>\n" "main/cs/>\n"
@ -388,7 +388,7 @@ msgstr "Import obrazu disku"
#: src/import/org.freedesktop.import1.policy:23 #: src/import/org.freedesktop.import1.policy:23
msgid "Authentication is required to import an image." msgid "Authentication is required to import an image."
msgstr "Pro import obrazu je nutné ověření." msgstr "Pro import obrazu je vyžadováno ověření."
#: src/import/org.freedesktop.import1.policy:32 #: src/import/org.freedesktop.import1.policy:32
msgid "Export a disk image" msgid "Export a disk image"
@ -413,7 +413,7 @@ msgstr "Zrušit přenos obrazu disku"
#: src/import/org.freedesktop.import1.policy:53 #: src/import/org.freedesktop.import1.policy:53
msgid "" msgid ""
"Authentication is required to cancel the ongoing transfer of a disk image." "Authentication is required to cancel the ongoing transfer of a disk image."
msgstr "Pro zrušení probíhajícího přenosu obrazu disku je nutné ověření." msgstr "Pro zrušení probíhajícího přenosu obrazu disku je vyžadováno ověření."
#: src/locale/org.freedesktop.locale1.policy:22 #: src/locale/org.freedesktop.locale1.policy:22
msgid "Set system locale" msgid "Set system locale"
@ -801,7 +801,7 @@ msgstr "Nastavit zprávu všem uživatelům"
#: src/login/org.freedesktop.login1.policy:397 #: src/login/org.freedesktop.login1.policy:397
msgid "Authentication is required to set a wall message." msgid "Authentication is required to set a wall message."
msgstr "Pro nastavení zprávy na zdi je nutné ověření." msgstr "Pro nastavení zprávy na zdi je vyžadováno ověření."
#: src/login/org.freedesktop.login1.policy:406 #: src/login/org.freedesktop.login1.policy:406
msgid "Change Session" msgid "Change Session"
@ -878,7 +878,8 @@ msgstr "Vytvoření místního virtuálního počítače nebo kontejneru"
msgid "" msgid ""
"Authentication is required to create a local virtual machine or container." "Authentication is required to create a local virtual machine or container."
msgstr "" msgstr ""
"K vytvoření místního virtuálního počítače nebo kontejneru je nutné ověření." "K vytvoření místního virtuálního počítače nebo kontejneru je vyžadováno "
"ověření."
#: src/machine/org.freedesktop.machine1.policy:106 #: src/machine/org.freedesktop.machine1.policy:106
msgid "Register a local virtual machine or container" msgid "Register a local virtual machine or container"
@ -888,7 +889,7 @@ msgstr "Zaregistrovat lokální virtuální stroj nebo kontejner"
msgid "" msgid ""
"Authentication is required to register a local virtual machine or container." "Authentication is required to register a local virtual machine or container."
msgstr "" msgstr ""
"K zaregistrování lokálního virtuálního stroje nebo kontejneru je nutné " "K zaregistrování lokálního virtuálního stroje nebo kontejneru je vyžadováno "
"ověření." "ověření."
#: src/machine/org.freedesktop.machine1.policy:116 #: src/machine/org.freedesktop.machine1.policy:116
@ -1048,8 +1049,8 @@ msgid ""
"Authentication is required to specify whether persistent storage for systemd-" "Authentication is required to specify whether persistent storage for systemd-"
"networkd is available." "networkd is available."
msgstr "" msgstr ""
"Ověření je nutné k určení, zda je k dispozici trvalé úložiště pro systemd-" "K určení, zda je k dispozici trvalé úložiště pro systemd-networkd je "
"networkd." "vyžadováno ověření."
#: src/portable/org.freedesktop.portable1.policy:13 #: src/portable/org.freedesktop.portable1.policy:13
msgid "Inspect a portable service image" msgid "Inspect a portable service image"
@ -1085,7 +1086,7 @@ msgstr "Registrovat službu DNS-SD"
#: src/resolve/org.freedesktop.resolve1.policy:23 #: src/resolve/org.freedesktop.resolve1.policy:23
msgid "Authentication is required to register a DNS-SD service." msgid "Authentication is required to register a DNS-SD service."
msgstr "Pro registraci služby DNS-SD je nutné ověření." msgstr "Pro registraci služby DNS-SD je vyžadováno ověření."
#: src/resolve/org.freedesktop.resolve1.policy:33 #: src/resolve/org.freedesktop.resolve1.policy:33
msgid "Unregister a DNS-SD service" msgid "Unregister a DNS-SD service"
@ -1149,7 +1150,7 @@ msgstr "Obnovit statistiky"
#: src/resolve/org.freedesktop.resolve1.policy:199 #: src/resolve/org.freedesktop.resolve1.policy:199
msgid "Authentication is required to reset statistics." msgid "Authentication is required to reset statistics."
msgstr "Pro resetování statistik je nutné ověření." msgstr "Pro resetování statistik je vyžadováno ověření."
#: src/sysupdate/org.freedesktop.sysupdate1.policy:35 #: src/sysupdate/org.freedesktop.sysupdate1.policy:35
msgid "Check for system updates" msgid "Check for system updates"
@ -1185,7 +1186,7 @@ msgstr "Vyčištění starých aktualizací systému"
#: src/sysupdate/org.freedesktop.sysupdate1.policy:66 #: src/sysupdate/org.freedesktop.sysupdate1.policy:66
msgid "Authentication is required to cleanup old system updates." msgid "Authentication is required to cleanup old system updates."
msgstr "K vyčištění starých aktualizací systému je nutné ověření." msgstr "K vyčištění starých aktualizací systému je vyžadováno ověření."
#: src/sysupdate/org.freedesktop.sysupdate1.policy:75 #: src/sysupdate/org.freedesktop.sysupdate1.policy:75
msgid "Manage optional features" msgid "Manage optional features"

View File

@ -59,6 +59,7 @@
#include "killall.h" #include "killall.h"
#include "kmod-setup.h" #include "kmod-setup.h"
#include "label-util.h" #include "label-util.h"
#include "libmount-util.h"
#include "limits-util.h" #include "limits-util.h"
#include "load-fragment.h" #include "load-fragment.h"
#include "log.h" #include "log.h"
@ -3310,6 +3311,13 @@ int main(int argc, char *argv[]) {
goto finish; goto finish;
} }
/* Building without libmount is allowed, but if it is compiled in, then we must be able to load it */
r = dlopen_libmount();
if (r < 0 && !ERRNO_IS_NEG_NOT_SUPPORTED(r)) {
error_message = "Failed to load libmount.so";
goto finish;
}
r = initialize_runtime(skip_setup, r = initialize_runtime(skip_setup,
first_boot, first_boot,
&saved_rlimit_nofile, &saved_rlimit_nofile,

View File

@ -201,6 +201,7 @@ executables += [
'dependencies' : [ 'dependencies' : [
libapparmor_cflags, libapparmor_cflags,
libkmod_cflags, libkmod_cflags,
libmount_cflags,
libseccomp_cflags, libseccomp_cflags,
libselinux_cflags, libselinux_cflags,
], ],

View File

@ -3026,7 +3026,7 @@ static int udev_rule_apply_token_to_event(
if (!copied) if (!copied)
return log_oom(); return log_oom();
r = device_cache_sysattr_value(dev, resolved, value, /* error = */ 0); r = device_cache_sysattr_value(dev, resolved, copied, /* error = */ 0);
if (r < 0) if (r < 0)
log_event_warning_errno(event, token, r, "Failed to cache sysfs attribute \"%s\", ignoring: %m", resolved); log_event_warning_errno(event, token, r, "Failed to cache sysfs attribute \"%s\", ignoring: %m", resolved);
else if (r > 0) { else if (r > 0) {