summaryrefslogtreecommitdiff
path: root/doc/saned.man
diff options
context:
space:
mode:
Diffstat (limited to 'doc/saned.man')
-rw-r--r--doc/saned.man162
1 files changed, 98 insertions, 64 deletions
diff --git a/doc/saned.man b/doc/saned.man
index 7b0fa4a..d019901 100644
--- a/doc/saned.man
+++ b/doc/saned.man
@@ -1,17 +1,26 @@
-.TH saned 8 "20 Apr 2009" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
+.TH saned 8 "29 Sep 2017" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
.IX saned
.SH NAME
saned \- SANE network daemon
.SH SYNOPSIS
.B saned
-.B [ \-a
+.B [ \-a
.I [ username ]
-.B | \-d
-.I [ n ]
-.B | \-s
-.I [ n ]
-.B | \-h
.B ]
+.B [ \-u
+.I username
+.B ]
+.B [ \-b
+.I address
+.B ]
+.B [ \-l ]
+.B [ \-D ]
+.B [ \-o ]
+.B [ \-d
+.I n
+.B ]
+.B [ \-e ]
+.B [ \-h ]
.SH DESCRIPTION
.B saned
is the SANE (Scanner Access Now Easy) daemon that allows remote clients
@@ -19,59 +28,77 @@ to access image acquisition devices available on the local host.
.SH OPTIONS
.PP
The
-.B \-a
+.B \-l
flag requests that
.B saned
-run in standalone daemon mode. In this mode,
+run in standalone daemon mode. In this mode,
.B saned
-will detach from the console and run in the background, listening for incoming
-client connections;
+will listen for incoming client connections;
.B inetd
is not required for
.B saned
-operations in this mode. If the optional
-.B username
-is given after
-.B \-a
-,
+operations in this mode. The
+.B \-b
+flag tells
+.B saned
+to bind to the
+.I address
+given. The
+.B \-u
+flag requests that
.B saned
-will drop root privileges and run as this user (and group).
+drop root privileges and run as the user (and group) associated with
+.I username
+after binding.
+The
+.B \-D
+flag will request
+.B saned
+to detach from the console and run in the background.
+The flag
+.B \-a
+is equivalent to the combination of
+.B \-l \-B \-u
+.I username
+options.
.PP
The
.B \-d
-and
-.B \-s
-flags request that
-.B saned
-run in debug mode (as opposed to
-.BR inetd (8)
-daemon mode). In this mode,
+flag sets the level of
.B saned
-explicitly waits for a connection request. When compiled with
-debugging enabled, these flags may be followed by a number to request
-debug info. The larger the number, the more verbose the debug output.
-E.g.,
+debug output. When compiled with debugging enabled, this flag may be
+followed by a number to request more or less debug info. The larger
+the number, the more verbose the debug output. E.g.,
.B \-d128
-will request printing of all debug info. Debug level 0 means no debug output
-at all. The default value is 2. If flag
-.B \-d
-is used, the debug messages will be printed to stderr while
-.B \-s
-requests using syslog.
+will request output of all debug info. A level of 0 produces no
+output at all. The default value is 2.
.PP
-If
+The
+.B \-e
+flag will divert
+.B saned
+debug output to stderr instead of the syslog default.
+.PP
+The
+.B \-o
+flag requests that
.B saned
-is run from inetd, xinetd or systemd, no option can be given.
+exits after the first client disconnects. This is useful for debugging.
.PP
The
.B \-h
flag displays a short help message.
+.PP
+If
+.B saned
+is run from other programs such as inetd, xinetd and systemd, check that
+program's documentation on how to pass command-line options.
.SH CONFIGURATION
-First and foremost:
+First and foremost:
.B saned
is not intended to be exposed to the internet or other non-trusted
networks. Make sure that access is limited by tcpwrappers and/or a firewall
-setup. Don't depend only on
+setup. Don't depend only on
.BR saned 's
own authentication. Don't run
.B saned
@@ -81,7 +108,7 @@ install
.B saned
as setuid root.
.PP
-The
+The
.I saned.conf
configuration file contains both options for the daemon and the access
list.
@@ -93,6 +120,13 @@ may have performance issues. Use this option if your \fBsaned\fP
server is sitting behind a firewall. If that firewall is a Linux
machine, we strongly recommend using the Netfilter
\fInf_conntrack_sane\fP module instead.
+.TP
+\fBdata_connect_timeout\fP = \fItimeout\fP
+Specify the time in milliseconds that saned will wait for a data
+connection. Without this option, if the data connection is not done
+before the scanner reaches the end of scan, the scanner will continue
+to scan past the end and may damage it depending on the
+backend. Specify zero to have the old behavior. The default is 4000ms.
.PP
The access list is a list of host names, IP addresses or IP subnets
(CIDR notation) that are permitted to use local SANE devices. IPv6
@@ -131,21 +165,21 @@ identical to ahost.com.
.SH SERVER DAEMON CONFIGURATION
For
.B saned
-to work properly in its default mode of operation, it is also necessary to
-add the appropriate configuration for
+to work properly in its default mode of operation, it is also necessary to
+add the appropriate configuration for
.I (x)inetd or systemd.
(see below).
Note that your inetd must support IPv6 if you
-want to connect to saned over IPv6 ; xinetd, openbsd-inetd and systemd
+want to connect to saned over IPv6 ; xinetd, openbsd-inetd and systemd
are known to support IPv6, check the documentation for your inetd daemon.
.PP
-In the sections below the configuration for
+In the sections below the configuration for
.I inetd, xinetd
and
.I systemd
are described in more detail.
.PP
-For the configurations below it is necessary to add a line of the following
+For the configurations below it is necessary to add a line of the following
form to
.IR /etc/services :
.PP
@@ -153,7 +187,7 @@ form to
sane\-port 6566/tcp # SANE network scanner daemon
.RE
.PP
-The official IANA short name for port 6566 is "sane\-port". The older name
+The official IANA short name for port 6566 is "sane\-port". The older name
"sane" is now deprecated.
.SH INETD CONFIGURATION
It is required to add a single line to the inetd configuration file
@@ -183,22 +217,22 @@ Note that both examples assume that there is a
.B saned
group and a
.B saned
-user. If you follow this example, please make sure that the
+user. If you follow this example, please make sure that the
access permissions on the special device are set such that
.B saned
can access the scanner (the program generally needs read and
write access to scanner devices).
.SH XINETD CONFIGURATION
If xinetd is installed on your system instead of inetd the following example
-for
-.I /etc/xinetd.conf
+for
+.I /etc/xinetd.conf
may be helpful:
.PP
.RS
.ft CR
.nf
# default: off
-# description: The sane server accepts requests
+# description: The sane server accepts requests
# for network access to a local scanner via the
# network.
service sane\-port
@@ -214,14 +248,14 @@ service sane\-port
.ft R
.RE
.SH SYSTEMD CONFIGURATION
-Saned can be compiled with explicit systemd support. This
+Saned can be compiled with explicit systemd support. This
will allow logging debugging information to be forwarded
to the systemd journal. The systemd support
requires compilation with the systemd-devel package
installed on the system. this is the preferred option.
-Saned can be used wih systemd without the systemd integration
-compiled in, but then logging of debug information is not supported.
+Saned can be used wih systemd without the systemd integration
+compiled in, but then logging of debug information is not supported.
The systemd configuration is different for the 2 options, so
both are described below.
@@ -229,8 +263,8 @@ both are described below.
for the systemd configuration we need to add 2 configuration files in
.I /etc/systemd/system.
.PP
-The first file we need to add here is called
-.I saned.socket.
+The first file we need to add here is called
+.I saned.socket.
It shall have
the following contents:
.PP
@@ -251,8 +285,8 @@ WantedBy=sockets.target
.ft R
.RE
.PP
-The second file to be added is
-.I saned@.service
+The second file to be added is
+.I saned@.service
with the following contents:
.PP
.RS
@@ -269,7 +303,7 @@ Group=saned
StandardInput=null
StandardOutput=syslog
StandardError=syslog
-Environment=SANE_CONFIG_DIR=@CONFIGDIR@
+Environment=SANE_CONFIG_DIR=@CONFIGDIR@
# If you need to debug your configuration uncomment the next line and
# change it as appropriate to set the desired debug options
# Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5
@@ -280,21 +314,21 @@ Also=saned.socket
.ft R
.RE
.PP
-You need to set an environment variable for
+You need to set an environment variable for
.B SANE_CONFIG_DIR
pointing to the directory where saned can find its configuration files.
-you will have to remove the # on the last line and set the variables
-for the desired debugging information if required. Multiple variables
-can be set by separating the assignments by spaces as shown in the
+you will have to remove the # on the last line and set the variables
+for the desired debugging information if required. Multiple variables
+can be set by separating the assignments by spaces as shown in the
example above.
.PP
-Unlike
+Unlike
.I (x)inetd
, systemd allows debugging output from backends set using
.B SANE_DEBUG_XXX
to be captured. See the man-page for your backend to see what options
are supported.
-With the service unit as described above, the debugging output is
+With the service unit as described above, the debugging output is
forwarded to the system log.
.SH Systemd configuration when saned is compiled without systemd support
@@ -305,7 +339,7 @@ for systemd configuration for saned, we need to add 2 configuration files in
.I /etc/systemd/system.
.PP
The first file we need to add here is called
-.I saned.socket.
+.I saned.socket.
It is identical to the version for systemd with the support compiled in.
It shall have the following contents:
.PP