[gnome-settings-daemon] usb: debug rule finding and device allowing



commit 85a8d2430f7134c11b4db08d6c0fae63ded21aec
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Wed Jan 6 10:04:18 2021 +0100

    usb: debug rule finding and device allowing
    
    This helped me to find a subtle bug in the code.
    I hope that it will help me in the future, too.

 plugins/usb-protection/gsd-usb-protection-manager.c | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/plugins/usb-protection/gsd-usb-protection-manager.c 
b/plugins/usb-protection/gsd-usb-protection-manager.c
index fd4023c0..92e0f097 100644
--- a/plugins/usb-protection/gsd-usb-protection-manager.c
+++ b/plugins/usb-protection/gsd-usb-protection-manager.c
@@ -209,6 +209,7 @@ is_usbguard_allow_rule_present (GVariant *rules)
                         return TRUE;
                     }
         }
+        g_debug ("Rule not present");
         return FALSE;
 }
 
@@ -410,6 +411,7 @@ static void call_usbguard_dbus (GDBusProxy              *proxy,
         if (manager->usb_protection_devices == NULL) {
             g_warning("Could not call USBGuard, because DBus is missing");
         } else {
+            g_debug ("Calling applyDevicePolicy with device_id %u, target %u and permanent: %i", device_id, 
target, permanent);
             GVariant *params = g_variant_new ("(uub)", device_id, target, permanent);
             g_dbus_proxy_call (manager->usb_protection_devices,
                                APPLY_DEVICE_POLICY,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]