Hi Timo,
Post by Timo HoenigHi Jon,
Post by William Jon McCannHere is a patch to add an ACL to the .bir file so that the user it
belongs to can always read it. I think this is a bit better than
making it owned by the user so that it can't be removed or tampered
with.
Having the file readable by the user it belongs to makes it easier to
support programs that don't run as root - like screensavers.
What do you think?
(I'm replying to both of your mails with this)
Thanks for the patches.
The idea sounds fine in general but I have reason why I haven't gone the
path making the device accessible to users.
Without modifications the USB device is only accessible for root and
setuid binaries. If we loosen that requirement any user can claim the
USB device. Once claimed another user -- or even the system
administrator -- can not claim the device anymore. That's why I am
strongly against making the device accessible to anyone.
In my opinion we should follow some sort of an 'at_console' approach.
We've discussed the start for that in the thread '[resubmit PATCH] Patch
to pretend remote users' [1].
That is precisely what the console.perms stuff does via
pam_console.so. It only makes the device owned by the user if they
are the owner of /dev/console.
It isn't a complete solution to the problem of multiple local console
users though. For that we need to take advantage of ConsoleKit. Take
a look at:
http://people.freedesktop.org/~mccann/doc/ConsoleKit/ConsoleKit.html
http://gitweb.freedesktop.org/?p=ConsoleKit.git;a=summary
Using utmp etc doesn't really work for a variety of reasons. Firstly,
you can't trust the information there since it is writable by many.
Secondly, you don't have a way to distinguish which of the locally
active users should own the device (think about fast user switching).
See the following for some discussion of various issues:
http://live.gnome.org/BetterPowerManager
Post by Timo HoenigOnce this is in, we can discuss if it is really necessary to make the
device accessible to users.