You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
usbguard/SOURCES/usbguard-dbus-CVE-leak.patch

32 lines
1.4 KiB

diff -up usbguard-1.0.0/src/DBus/DBusBridge.cpp.orig usbguard-1.0.0/src/DBus/DBusBridge.cpp
--- usbguard-1.0.0/src/DBus/DBusBridge.cpp.orig 2022-11-23 08:57:40.119760422 +0100
+++ usbguard-1.0.0/src/DBus/DBusBridge.cpp 2022-11-23 08:58:22.380845720 +0100
@@ -434,12 +434,11 @@ namespace usbguard
USBGUARD_LOG(Trace) << "Connecting with Polkit authority...";
PolkitAuthority* const authority = polkit_authority_get_sync(/*cancellable=*/ NULL, &error);
- if (! authority || error) {
+ if (! authority) {
USBGUARD_LOG(Trace) << "Failed to connect to Polkit authority: " << formatGError(error) << ".";
*authErrorCode = G_DBUS_ERROR_AUTH_FAILED;
*authErrorMessage = "Failed to connect to Polkit authority";
g_error_free(error);
- g_object_unref(authority);
g_object_unref(subject);
return false;
}
@@ -470,12 +469,11 @@ namespace usbguard
/*cancellable=*/ NULL,
&error);
- if (! result || error) {
+ if (! result) {
USBGUARD_LOG(Trace) << "Failed to check back with Polkit for authoriation: " << formatGError(error) << ".";
*authErrorCode = G_DBUS_ERROR_AUTH_FAILED;
*authErrorMessage = "Failed to check back with Polkit for authoriation.";
g_error_free(error);
- g_object_unref(result);
g_object_unref(details);
g_object_unref(authority);
g_object_unref(subject);