User-level USB device drivers, and permissions

From: Tim Waugh (twaugh@redhat.com)
Date: Fri Oct 05 2001 - 06:51:16 EST


I have a question regarding user-level USB device drivers. The
project I'm thinking about is gphoto2. I'm posting it here because at
least part of the solution lies in usbdevfs I think.

The problem is this:

How can a user-level USB device driver do its job while running as a
non-root 'console' user, with minimal (preferrably no) intervention
from the sysadmin?

By 'console' user, I am talking about the users that pam_console will
recognise as being on the console.

The closest solution at the moment seems to be: mount /proc/bus/usb
group-writable and group-owned by 'usb', and add users that can use
USB devices to group 'usb'. This has the following problems:

- sysadmin needs to add any potential console users to the 'usb' group
  first,
- those users are then in the usb group even when not at the console.

An idea in my head is to have a pam module that, for console users,
mounts -tusbdevfs none /somewhere/usb-bus/$LOGNAME with user ownership
on login and dismounts it on logout, but I don't know if that is
feasible.

Does anyone know if this problem has already been solved, or else can
they think of a solution?

Thanks,
Tim.
*/



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Oct 07 2001 - 21:00:36 EST