On Fri, Oct 11, 2002, Mark McClelland <[EMAIL PROTECTED]> wrote:
> David Brownell wrote:
> 
> >> Right now, there is nothing in the standard hotplug userspace that makes
> >> this easy for anyone. It encourages applications to do the hideous thing
> >> and do whatever they think is best.
> >>
> >> We should provide some sort of standard support where an application can
> >> install a configuration of what devices it can support and the OS does
> >> the rest.
> >>
> >> This is the chance to set a standard.
> >
> > Since the last hotplug release, the way to do this is:
> >
> >  - /etc/hotplug/usb/FOO.usermap  ... what devices supported
> >  - /etc/hotplug/usb/FOO ... what to do when they're connected
> 
> IMHO, applications shouldn't create or modify those files. The potential 
> for conflicts is too great. What if the user wants two different 
> applications to be able to access the same device?
> 
> The only situation I can see where an application should register itself 
> with hotplug is so that it can be "auto-launched" when the device is 
> plugged in. I think this is what Johannes was getting at, although maybe 
> he was thinking of something more complex. I'm thinking of something 
> like /home/mark/.usb/VID:PID.autorun, that contains:

I was only thinking about permissions. This, while I think should be
discussed, was out of the scope I was talking about :)

> * /usr/bin/xsane --device=%DEVPATH%
>   /usr/bin/gimp --acquire=%DEVPATH%
> 
> with the '*' indicating the default action. If there's no default then a 
> window would pop up asking the user what to run.
> 
> What it comes down to is that the user should be in control of the 
> hotplug policy at all times, not the applications at install time. 

User or distribution.

> Otherwise you end up with crap like Windows, where some lame app starts 
> whenever you plug in your camera, and you can't disable it without 
> hacking the registry.
> 
> Regardless of how it's done, the policy for setting permissions and 
> taking action on connect/disconnect should be kept very separate. 
> Setting of permissions is a system-wide policy that needs to be 
> controlled by root, and actions are a per-user policy that should be 
> settable by anyone.
> 
> Ideally, there would be a permissions "database" with entries like:
> 
> {VID=0x05a9, PID=0x0511}    mark:mark:644
> {CLASS=0x08}    mark:mark:600
> 
> Having a standardized format like that (vs. putting chown/chmod/etc in 
> /etc/hotplug/usb/FOO), makes it easy to write a graphical config tool. 
> That file could also be used to infer who should have their autorun 
> scripts executed. The kernel could even be notified of this info so that 
> it can revoke the permissions when the device is unplugged.

This is an interesting idea, but I think it's better discussed on
linux-hotplug.

One thing I want to point out is that many people want system wide
settings as well.

In fact, the permissions discussion should probably be held there too.

JE



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to