[sane-devel] Where should a backend save config data ?

Henning Meier-Geinitz henning@meier-geinitz.de
Wed, 24 Jul 2002 21:50:49 +0200


On Wed, Jul 24, 2002 at 08:52:17PM +0200, mh wrote:
> small problem:
> Is there a well-known location, where a backend should/could save some data?
> I'd like to save some calibration data (shading,exposure ...), but I'm not 
> sure how to do this.

One way is to write it to a place that's world-writable. However, be
carefull not to create yet another temp file vulnerability by
simply overwriting files without checking for links.

> Should this go to $HOME/.sane ? Does this work with saned?

I should work with saned but probably not the way the user expects. As
saned is started by user saned (at least that's what the manpage
suggests) I guess the data is saved in /home/saned/.sane. So it will
be accessible by all remote users. But I haven't tested this.

In any case, make sure the filename is unique by including the
backend's name.