Am Samstag, 6. April 2002 04:55 schrieb Patrick J. Kobly:
> On Wed, Apr 03, 2002 at 06:55:19PM -0800, Greg KH wrote:
> > On Wed, Apr 03, 2002 at 07:21:21PM -0700, Patrick J. Kobly wrote:
> > > I'm sending this out now, so that I can get comments, recommendations
> > > and device ID's for Samsung MP3 players that I may be able to support.
> >
> > Is there any reason this has to be a kernel driver? Can't you just use
> > usbfs or libusb to talk to the device just as easily?
>
> Correct me if I'm wrong, but don't apps which use libusb need to be setuid
> root? At least with an in-kernel driver, we limit privileged code to only
> the code in the kernel driver, where with libusb, we have more setuid
> user-apps, each of which needs to be carefully checked for buffer overflows
> and other vulnerabilities. (This is _the_ reason that I don't like the
> solution taken for CD-R's under linux - use sg, set cdrecord setuid or run
> it as root)
You are to a large extent wrong ;-)
Usbfs takes all standard permisions just fine. It just doesn't retain them.
You can set them from a hotplug script (or devfs - but it's rude to require
devfs).
There are two issues with that approach that might apply in your case.
Firstly concurrent opening by two or more tasks is a real pain with usbfs.
Secondly, the permissions cannot be graded.
You cannot implement different permissions for different operations
with usbfs. Eg everybody can read and play files, only one user can write
new files to the player, only root can reformat the internal flash is impossible
with usbfs.
Regards
Oliver
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel