Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64078 - sane permissions - allow access of scanners by regular users by default
Summary: sane permissions - allow access of scanners by regular users by default
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement
Assignee: Patrick Kursawe (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-14 19:43 UTC by Adam
Modified: 2021-01-22 02:23 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam 2004-09-14 19:43:04 UTC
I am using a USB scanner which uses LIBUSB, which means the scanner is accessed without a device node being created.  By default, it only works as root.  After hunting through the documentation, I discovered that to allow other users to access my scanner I have to modify the file /etc/hotplug/usb/libusbscanner, uncommenting the block that sets the permissions to 666.

Now, I suggest 666 be the default permissions to make it easier for users configuring scanners.  The file says this is insecure, but seriously, what kind of security problems are introduced by letting anyone use a scanner?  Maybe I'm missing something, but I don't understand how someone could hack into your system by being allowed to use your scanner.


Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 solar (RETIRED) gentoo-dev 2004-09-14 20:52:25 UTC
"The file says this is insecure"

NO.
Comment 2 Adam 2004-09-17 08:51:55 UTC
Perhaps my report was misunderstood.  I'm not suggesting you do something insecure.  I suspect that, as a matter of fact, it IS secure to have 666 for permissions of a scanner.  I suspect that the reason the person wrote that it's insecure is out of habit of thinking that system files with permissions of 666 is insecure.
Comment 3 Adam 2004-09-27 05:08:51 UTC
How about if Gentoo automatically adds users to the "scanner" group when SANE is installed?  I reported this request to SANE and they said that's what individual distributions could do.  See:

http://alioth.debian.org/tracker/?func=detail&atid=410366&aid=300932&group_id=30186
Comment 4 Patrick Kursawe (RETIRED) gentoo-dev 2005-07-14 00:10:39 UTC
Thought about it again (while checking something else with sane-backends) and
came to the conclusion that this is no good idea.

Giving scanner access to anyone when this could (in rare cases, admitted...)
damage your hardware? No.
Automatically adding users to a privileged group? The same as above with some
bells and whistles.

Arranging hardware access rights is a job for the system administrator. Adding
some scripts that make jobs like "open access for everyone to scanners" easier
would be a different question and are perhaps worth thinking about. The
pkg_config part of the ebuild would be a good place for this kind of job. But it
should not be done without asking root. 
Comment 5 Adam 2005-07-14 08:05:45 UTC
Fair enough.  Just keep in mind that with that methodology, Gentoo and in
general Linux will never be a system that "just works", hence will never become
used by everyone as a desktop, but only by the (probably minority of) people
with the extra time needed to configure it.

After thinking about it, I got another idea, which I think is better - what
about a way for root to create a "trusted" user?  Such user would, simply on
creation, be added to whatever groups are necessary to use all hardware.  More
generally, it could be assumed that such a user would never do anything
intentionally harmful, but the system would prevent them from doing anything
accidentally harmful, as it does for any other regular user.  The user could
have a bunch of things automatcially configured for them with that goal in mind.