[Spice-devel] [PATCH spice-gtk v2 5/6] usb-acl-helper: add env var for specifying acl helper binary

Jonathon Jongsma jjongsma at redhat.com
Thu Mar 10 17:17:16 UTC 2016


This allows us to execute a custom mock acl helper binary for testing
purposes.
---
 src/usb-acl-helper.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/usb-acl-helper.c b/src/usb-acl-helper.c
index 20400eb..54b038b 100644
--- a/src/usb-acl-helper.c
+++ b/src/usb-acl-helper.c
@@ -198,7 +198,10 @@ void spice_usb_acl_helper_open_acl_async(SpiceUsbAclHelper *self,
     GIOStatus status;
     GPid helper_pid;
     gsize bytes_written;
-    gchar *argv[] = { (char*) ACL_HELPER_PATH"/spice-client-glib-usb-acl-helper", NULL };
+    const gchar *acl_helper = g_getenv("USB_ACL_HELPER");
+    if (acl_helper == NULL)
+        acl_helper = ACL_HELPER_PATH"/spice-client-glib-usb-acl-helper";
+    gchar *argv[] = { (char*)acl_helper, NULL };
     gint in, out;
     gchar buf[128];
 
-- 
2.4.3



More information about the Spice-devel mailing list