From beb9c81fba96aea9b6be05dace76251556d69a58 Mon Sep 17 00:00:00 2001 From: wenyuzifang Date: Wed, 20 Aug 2025 23:25:02 +0800 Subject: [PATCH] Update code from upstream --- 0001-Fix-borked-error-check.patch | 22 ++++++++++++++++++++++ rtkit.spec | 8 +++++++- rtkit.sysusers | 2 ++ 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 0001-Fix-borked-error-check.patch create mode 100644 rtkit.sysusers diff --git a/0001-Fix-borked-error-check.patch b/0001-Fix-borked-error-check.patch new file mode 100644 index 0000000..46b759f --- /dev/null +++ b/0001-Fix-borked-error-check.patch @@ -0,0 +1,22 @@ +From ef090ee5a913f2c68e0fbed2600bfe38dfe55029 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Sun, 24 Jan 2021 21:12:22 +0100 +Subject: [PATCH 1/2] Fix borked error check + +--- + rtkit-daemon.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rtkit-daemon.c b/rtkit-daemon.c +index 3ecc1f7840..a15e84f8f5 100644 +--- a/rtkit-daemon.c ++++ b/rtkit-daemon.c +@@ -1463,7 +1463,7 @@ static DBusHandlerResult dbus_handler(DBusConnection *c, DBusMessage *m, void *u + if (strcmp(interface, "org.freedesktop.RealtimeKit1") == 0) { + assert_se(r = dbus_message_new_method_return(m)); + +- if (!handle_dbus_prop_get(property, r) < 0) { ++ if (handle_dbus_prop_get(property, r) < 0) { + dbus_message_unref(r); + assert_se(r = dbus_message_new_error_printf( + m, diff --git a/rtkit.spec b/rtkit.spec index a5d52a2..371c5ab 100644 --- a/rtkit.spec +++ b/rtkit.spec @@ -1,4 +1,4 @@ -%define anolis_release 4 +%define anolis_release 5 Summary: REALTIMEKIT Realtime Policy and Watchdog Daemon Name: rtkit @@ -10,12 +10,15 @@ Release: %{anolis_release}%{?dist} License: GPLv3+ and BSD URL: http://git.0pointer.net/%{name}.git/ Source0: https://0pointer.de/public/%{name}-%{version}.tar.xz +Source: rtkit.sysusers +Source2: http://0pointer.de/public/rtkit-0.11.tar.xz BuildRequires: autoconf automake libtool make BuildRequires: dbus-devel >= 1.2 BuildRequires: libcap-devel BuildRequires: polkit-devel >= 0.92 BuildRequires: systemd-devel +BuildRequires: systemd-rpm-macros Requires: dbus Requires: polkit >= 0.92 @@ -30,6 +33,7 @@ Patch3: 0003-format-security.patch Patch4: 0004-Fix-borked-error-check.patch Patch5: 0005-systemd-update-sd-daemon.-ch.patch Patch6: 0006-Remove-bundled-copy-of-sd-daemon.-ch.patch +Patch7: 0001-Fix-borked-error-check.patch %description RealtimeKit is a D-Bus system service that changes the @@ -103,6 +107,8 @@ dbus-send --system --type=method_call --dest=org.freedesktop.DBus / org.freedesk %doc README rtkit.c rtkit.h %changelog +* Wed Aug 20 2025 Wenyuzifang - 0.11-5 +- Fix broken error checking to ensure proper handling of D-Bus property requests. * Thu Jun 8 2023 Liwei Ge - 1:0.11-4 - fix useradd in pre script diff --git a/rtkit.sysusers b/rtkit.sysusers new file mode 100644 index 0000000..83b292a --- /dev/null +++ b/rtkit.sysusers @@ -0,0 +1,2 @@ +#Type Name ID GECOS Home directory Shell +u rtkit 172 "RealtimeKit" / /sbin/nologin -- Gitee