diff options
author | Jonathon Jongsma <jjongsma@redhat.com> | 2016-03-09 10:50:18 -0600 |
---|---|---|
committer | Jonathon Jongsma <jjongsma@redhat.com> | 2016-03-11 10:40:40 -0600 |
commit | 17b00a13f2c90a1a1149c632b836c92ba5a765b3 (patch) | |
tree | ce556f5e0697678f64fa3d27dceca61dbcf7daeb | |
parent | 6eb8d0a3350f6e16af3cbb7d9cf12e59e415537b (diff) | |
download | spice-gtk-17b00a13f2c90a1a1149c632b836c92ba5a765b3.tar.gz spice-gtk-17b00a13f2c90a1a1149c632b836c92ba5a765b3.tar.xz spice-gtk-17b00a13f2c90a1a1149c632b836c92ba5a765b3.zip |
usb-acl-helper: add env var for specifying acl helper binary
Setting SPICE_USB_ACL_BINARY allows us to execute a custom mock acl
helper binary for testing purposes.
-rw-r--r-- | src/usb-acl-helper.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/usb-acl-helper.c b/src/usb-acl-helper.c index 20400eb..cc5ce9f 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("SPICE_USB_ACL_BINARY"); + 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]; |