Re: USB Port Auto Notification to BitPim
Roger Binns <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <[email protected]> |
Joe Pham wrote:
> I'll check in some experimental code that does this for all to play
> with it.
I highly disagree with the goals but very strongly disagree on the
implementation. On the technical side it doesn't allow for multiple
users on a machine (eg "fast user switching") and it doesn't allow one
user running multiple instances. The config port setting is rather
useless since the usbcell script will be running bitpim as root and
hence use root's config setting.
From the security side, this is a *very* bad idea. There is no form of
protection from other processes on the same machine. Additionally a
device name is passed. What if someone did '-a /dev/hda'? Will AT
commands end up scribbled all over the partition table if the user is a
member of the disk group or root? It doesn't matter what attacks you or
I can think of - the bad guys will be able to think up way better ones.
Whenever there is the potential of user programs running as root
and/or some communication from root to non root users, even tiny things
can be exploited.
It is far better to adopt an existing mechanism. {d,i}notify will work
and doesn't require the cooperation of other processes. dbus already
has a mechanism and others have put way more thought into security.
Even using a named pipe in a private directory owned by the user
significantly reduces risk although there are potential race conditions.
Roger
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642