[gnome-settings-daemon] usb: Correctly append our allow-all rule



commit 4a0304731e456359eca67f2958c1aa32eef7072d
Author: Tobias Mueller <muelli cryptobitch de>
Date:   Wed Jan 6 09:30:45 2021 +0100

    usb: Correctly append our allow-all rule
    
    The version of USBGuard we targetted for the initial release had a bug:
    https://github.com/USBGuard/usbguard/pull/355
    Since this is fixed now, we can remove our workaround and use the
    correct value.

 plugins/usb-protection/gsd-usb-protection-manager.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/plugins/usb-protection/gsd-usb-protection-manager.c 
b/plugins/usb-protection/gsd-usb-protection-manager.c
index 62430c2d..fd4023c0 100644
--- a/plugins/usb-protection/gsd-usb-protection-manager.c
+++ b/plugins/usb-protection/gsd-usb-protection-manager.c
@@ -178,13 +178,7 @@ add_usbguard_allow_rule (GsdUsbProtectionManager *manager)
         } else {
                 gboolean temporary = TRUE;
                 /* This is USBGuard's Rule::LastID */
-                /* const guint32 last_rule_id = G_MAXUINT32 - 2; */
-                /* We can't use Rule::LastID, due to a bug in USBGuard.
-                 * We cannot pick an arbitrary number, so we pick
-                 * "0" which means we prepend our rule.
-                 * https://github.com/USBGuard/usbguard/pull/355
-                 */
-                const guint32 last_rule_id = 0;
+                const guint32 last_rule_id = G_MAXUINT32 - 2;
                 g_debug ("Adding rule %u", last_rule_id);
                 params = g_variant_new ("(sub)", ALLOW_ALL, last_rule_id, temporary);
                 g_dbus_proxy_call (policy_proxy,


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