Re: Two usbfs users can claim the same interface

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

 



Greg KH wrote:
> 
> Wait right there.  The admin set up the box so that both User A and User
> B had access to the device, so you are screwed.  Don't do that :)
> 
> Using PolicyKit, you can easily set this up so it will not happen, no
> kernel changes needed at all.

Okay, that's good to know.

FYI, this is the patch I have to libusb's libusb_kernel_driver_active().

-- libusb-1.0-1.0.1.orig/libusb/os/linux_usbfs.c
+++ libusb-1.0-1.0.1/libusb/os/linux_usbfs.c
@@ -1158,6 +1158,9 @@
 		return LIBUSB_ERROR_OTHER;
 	}

+	if (strcmp(getdrv.driver, "usbfs") == 0) {
+		return 0;
+	}
 	return 1;
 }

David
-- 
David Vrabel, Senior Software Engineer, Drivers
CSR, Churchill House, Cambridge Business Park,  Tel: +44 (0)1223 692562
Cowley Road, Cambridge, CB4 0WZ                 http://www.csr.com/


Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux