Flags like -a, -d and -s have many overlap effects. This patch restricts
the effect of flags to a simple action.
New -u (user) flag replaces -a optional argument for running saned as a different user.
The code that retrieve the user info and drop privileges migrated to runas_user().
As a side effect, PID file can be created even if getting user info fails.
New -l (listen) flag sets run_mode to standalone.
New -D (daemonize) flag daemonizes saned after bind.
New -o (once) make saned exit after the first client disconnects.
Flag -s (syslog) is gone. Previous behavior can be reproduced with '-a -d level -o -f'.
New -e (stderr) flag for redirecting output to stderr, instead of syslog.
Flag -d (debug) now only sets the debug level and argument is required. Previous behavior
can be reproduced with '-a -d level -o -f -e'.
The run_mode SANED_RUN_DEBUG and SANED_RUN_ALONE shared most of its code
path. With the new flags dealing with their difference, SANED_RUN_DEBUG is gone.
Flag '-a' still works as before but it can be replaced by '-l -D -u user'.
Current uses of -d (debug) or -s (syslog) will break.
Signed-off-by: Luiz Angelo Daros de Luca <luizluca@gmail.com>
doc/descriptions/fujitsu.desc: add S1500 usb ids and status
* backend/canon_dr.c: update credits
* doc/sane-fujitsu.man doc/sane-canon_dr.man: update version numbers,
dates, credits and known issues
* doc/saned.man: remove section about uncontrolled data port range
Reorganize code by splitting the main() function into a series of functions.
Factorize common code between the old network code and the AF-indep code. There's now only one version of main().
* doc/saned.man doc/sane-net.man doc/descriptions/net.desc:
Updated URL of the sane-net homepage to
http://www.penguin-breeder.org/?page=sane-net
* doc/sane-mustek_pp.man doc/descriptions/mustek_pp.desc:
Updated URL of the mustek_pp homepage to
http://www.penguin-breeder.org/?page=mustek_pp
* TODO:
Added entry to saned section:
- Add support for IP ranges in saned.conf (like 10.0.0.0/8)
are used for comparison, not host names as before. It's possible to
put hostnames, FQDNs and IP addresses into saned.conf.
Limitations: Only the first IP address in struct hostent is checked.
IPv6 is untested. The change is based on a patch by Petter
Reinholdtsen <pere@hungry.com>.
Removed isfdtype to avoid compilation problems. Added more
debug output. Print function name in every DBG statement.
Updated manual pages and saned.conf.
the messages are printed to syslog as before. If option "-d" is used,
the mesages are printed to stderr. Updated manual page.
Henning Meier-Geinitz <henning@meier-geinitz.de>
* doc/scanimage.man doc/saned.man: updated description of password
file
* sanei/sanei_auth.c frontend/saned.c frontend/scanimage.c: replaced
index() by strchr(). Changed style of password file
* backend/net.c: the net backend now prepends net:host: to the
resource before calling the auth_callback function
* configure configure.in: Added test for /dev/urandom and
index() in string.h or strings.h
* backend/net.c: Fixed SANE_NET_AUTHORIZE call handling
* doc/net.tex: Clarified definition of SANE_NET_AUTHORIZE, added
definition of MD5 authorization
* doc/sane.tex: Upgraded to version 1.0.2, changed definition of
SANE_MAX_USERNAME_LEN & SANE_MAX_PASSWORD_LEN to 128 chars
* doc/saned.man: added description of SANE_CONFIG_DIR/saned.users
* doc/scanimage.man: added description of ~/.sane/pass and
--accept-md5-only
* frontend/saned.c: implemented user authorization on a per backend
basis
* frontend/scanimage.c: fixed bug (option -b wasn't present)
implemented auth_callback
* include/sane/sane.h: changed definition of SANE_MAX_USERNAME_LEN &
SANE_MAX_PASSWORD_LEN to 128 chars
* lib/Makefile.in sanei/Makefile.in: updated Makefiles