summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorosy <50960678+osy@users.noreply.github.com>2021-05-11 20:58:59 -0700
committerNathan Hjelm <hjelmn@google.com>2021-05-16 15:15:05 -0600
commit6a902c3b207a017cd699ac8bb6659abf32eb0c99 (patch)
tree564ec71c6ac443a828ebbc8dd280a07564453029 /configure.ac
parentabd788c203624930241f45f32b501c16936bd806 (diff)
downloadlibusb-6a902c3b207a017cd699ac8bb6659abf32eb0c99.tar.gz
darwin: add authorization for device capture
To use USBDeviceReEnumerate with kUSBReEnumerateCaptureDeviceMask your app either needs to be running as root OR have the 'com.apple.vm.device-access' entitlement AND have the user authorization requested via IOServiceAuthorize(). We can use the capture re-enumerate APIs if either 1) the process is running as root or 2) the 'com.apple.vm.device-access' entitlement is used AND IOServiceAuthorize() is called. We assume that if the entitlement is not there then we are running as root--if this is not true, then darwin_detach_kernel_driver will fail anyways. The authorization status is cached in the device's start() so we have to stop() and start() the device by destroying the plugin and recreating it again. Signed-off-by: Nathan Hjelm <hjelmn@google.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 1 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 7c86598..5899fc2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -161,7 +161,7 @@ fi
case $backend in
darwin)
AC_CHECK_FUNCS([pthread_threadid_np])
- LIBS="${LIBS} -lobjc -Wl,-framework,IOKit -Wl,-framework,CoreFoundation"
+ LIBS="${LIBS} -lobjc -Wl,-framework,IOKit -Wl,-framework,CoreFoundation -Wl,-framework,Security"
;;
haiku)
LIBS="${LIBS} -lbe"