FreeBSD 3.0 CAM braindamage and an (unrelated?) permission problem

William McVey (wam@sa.fedex.com)
Thu, 28 Jan 1999 01:13:15 -0600

[ the first paragraph is a warning/request for more documentation
to FreeBSD users using the CAM subsystem. The second paragraph
is a permission problem with SANE which I have yet to figure out. ]

Ok... it just took me several hours of pounding my head against my
monitor (and resorting to reading pieces of the CAM driver in the
kernel sources), but I have just discovered that contrary to the
recommendation of README in the source distribution of SANE, FreeBSD 3.0
can not handle accessing the scanner via a symlink (not even
hardlink) named /dev/scanner. The passthrough device depends on
having the filename of the device opened begin with "pass". This
caught me way by surprise. Anyway, I'd like someone with access
to the SANE source to make a note of this FreeBSD braindamage in
either PROBLEMS, README, or perhaps even docs/sane-scsi.man. The
FreeBSD ports maintainer for this package should probably ensure
this is documented in the install messages as well. The device
opened to access the scanner (either by explicit commandline or by
config file entry) must be the regular old pass through device
(/usr/src/sys/cam/cam_{periph and xpt}.c performs strncmp against
the opened device's name.)

And perhaps related, but perhaps not, when using the SANE software,
I'm only ever able to scan as root (blech). I created a group
scanner, put my user account in it, made the scanner device grouped
to the new scanner group and chmod 660 on the device. I've then
logged completely out, then back in (via xdm). id(1) shows that
I'm in group scanner; however, when I run xscanimage from my account,
I'm presented only with pnm devices. When I run it as root, it
also allows me to choose umax:/dev/pass4. My review of the cam
subsystem didn't show anything that required root.... I was wondering
if any other FreeBSD users had got it working as a non-root user.

-- William

P.S. Hats off to the SANE developers. This software definetly fills a
big need the Unix/Linux community has had...

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com