linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Karl O. Pinc" <kop@meme.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: Patch: add ACL for parallel printer and scanner
Date: Thu, 08 Oct 2009 02:18:43 +0000	[thread overview]
Message-ID: <1254968323.13350.10@mofo> (raw)
In-Reply-To: <1254904702.16942.11.camel@trinidad.mandrakesoft.com>

On 10/07/2009 12:40:25 PM, Frederic Crozat wrote:
> Le mercredi 07 octobre 2009 à 18:59 +0200, Martin Pitt a écrit :
> > Frederic Crozat [2009-10-07 18:31 +0200]:
> > > > This grants access to any device connected, to the parallel
> port, and
> > > > is not limited to printers or scanners, right?
> > > >   KERNEL="parport[0-9]*",  ENV{ACL_MANAGE}="1"
> > > 
> > > Yes, since there is no possible autodetection on it.

> > I'd really like to avoid it for printers, see above.
> 
> As far as I know, there is no way to detect the device plugged on a
> parallel port, so I don't see how we could allow only access for
> scanner
> and not for printer (unless we move the ACL to sane package but it
> isn't
> a real protection).

I have a stupid idea, firmly grounded in ignorance
and grown in the hothouse of klugery.  Take it
for what it's worth.

If you wrote a kernel driver/module
that does nothing but read a config file and create a
"dummy" device node (for detection by KERNEL=foo) based on 
the parallel scanner connectivity information in a config 
file then udev could set device permissions that are appropriate
for the scanner while leaving printer parallel ports alone.
The config file would specify which parallel port is plugged
into the scanner, default to parport0, and be installed
along with the kernel module only when the sane 
"parallel-scanner" application package is installed.

I know nothing about parallel scanners but perhaps
there is some way that the "driver" could probe the parallel
ports to autodetect -- printers do not normally respond
to commands and send a lot of data to the CPU over the
parallel port.

This would reduce the end-user's problem to installing
a package supporting parallel scanners.

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein


      parent reply	other threads:[~2009-10-08  2:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07  8:38 Patch: add ACL for parallel printer and scanner Frederic Crozat
2009-10-07 11:13 ` Kay Sievers
2009-10-07 16:31 ` Frederic Crozat
2009-10-07 16:59 ` Martin Pitt
2009-10-07 17:40 ` Frederic Crozat
2009-10-08  2:18 ` Karl O. Pinc [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1254968323.13350.10@mofo \
    --to=kop@meme.com \
    --cc=linux-hotplug@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).