[sane-devel] devfsd

abel deuring a.deuring@satzbau-gmbh.de
Wed, 12 Dec 2001 17:17:44 +0100

Robert Stanford wrote:
> > According to Sane's ChangeLog file, I added at 2001-01-07 support for
> > devfs (more precisely, to sanei_scsi_find_devices). I am not 100% sure,
> > if this means before or after the release of Sane 1.0.3, but I think
> > that the 1.0.3 release is somewhat older. And the functions added by
> > Doug Gilbert to support "out of order" /dev/sg* numbering also try to
> > access devfs files.
> Hmm, the problem here is with symlinks and their permissions.
> > Right, this sounds like a problem in the configuration of devfs.
> Hard to say, the same devfs works dandy with sane 1.0.3, I'm only having
> the problem with 1.0.6. I stumbled upon a thread on the kernel mailing list
> about devfs and there was debate over whether programs should check the
> state of the symlinks (which sane 1.0.6 seems to do) or whether devfs
> should be changed to make symlinks the same as all others lrwxrwxrwx.
> Its at
>   http://www.uwsg.iu.edu/hypermail/linux/kernel/0003.0/0941.html

As I understand that mail, one can get into trouble calling lstat for
devfs "files" -- but sanei_scsi does not call this function. As Henning
already wrote, none of the Sane backends uses lstat -- at least "find .
-type f -exec grep lstat {} \; -print" did not show any place where it
might be called.

> Ive tried changing the config for devfsd so that the node has rwxrwxrwx
> however this doesnt change things for the symlink. The above  thread is
> pretty old but it seems the devfsd developer is pretty adamant about not
> changing this situation, he seems to think (rudely) that if a program is
> checking the perms on a symlink then it must be broken.

Could you run something like "strace scanimage"? Perhaps we can get
closer to the problem that way.