[sane-devel] sane_init(), sane_get_devices() and SANE_Authorization_Callback()

Kåre Särs kare.sars at iki.fi
Mon May 31 08:38:42 UTC 2010


On Thursday 27 May 2010 00:04:32 m. allan noah wrote:
> >> Many backends do not properly re-scan for devices. Those backends
> >> should be fixed. Which version of sane-backends is this?
> > 
> > This was sane-backends 1.0.21 from the ubunntu ppa mentioned in a couple
> > of mails back. The backends I use are epson2 and v4l
> 
> v4l is pretty much unmaintained, so I don't know that will get fixed,
> and A. Zummo has been too busy to work on epson2 lately, but I might
> step in a fix that.
Thanks.

How big of a problem is this? I'm still thinking about calling an external 
application. Something like "scanimage -f %d;%v;%m;%t%n" just to get the 
updated list of available devices...

Is that overkill? or is it bad because it would decrease the incentive to fix 
the real problem?

Could it be seen as a security risk?

> > One workaround I can think of would be to start a separate process that
> > would read the available devices...
> 
> only if you are going to use that process to also do the scanning,
> since the device list would have to be rescanned in any other process.
> 
I do not fully understand what you meant with this...

> >> > 4) Again in a multi threaded application there might be two scanners
> >> > that require authentication. The resource string that is provided to
> >> > SANE_Authorization_Callback() contains the backend name and a md5
> >> > hash, but it does not contain the same ":libusb:001:004" extra info
> >> > type of sting that sane_get_devices() returns for the backend.
> >> 
> >> Which backend?
> > 
> > At least "epson2" and "test" through the net backend.
> 
> weird- i've never used the auth callback, and none of my backends need
> it, so I'd have to play around with it to comment further...
> 
I might have been a bit unclear :) just in case: I have authentication enabled 
for saned on the server. The syntax of the saned.users file indicates that 
saned only cares about the backend and not individual devices.  

Kåre



More information about the sane-devel mailing list