kopia lustrzana https://gitlab.com/sane-project/backends
Changed service name from "sane" to "sane-port". This is the
IANA registered service name for port 6566 (bug #300758).merge-requests/1/head
rodzic
94ce381d82
commit
7751b3b7eb
|
@ -156,7 +156,7 @@ add_device (const char *name, Net_Device ** ndp)
|
|||
hints.ai_family = PF_INET;
|
||||
# endif /* ENABLE_IPV6 */
|
||||
|
||||
error = getaddrinfo (name, "sane", &hints, &res);
|
||||
error = getaddrinfo (name, "sane-port", &hints, &res);
|
||||
if (error)
|
||||
{
|
||||
error = getaddrinfo (name, NULL, &hints, &res);
|
||||
|
@ -665,7 +665,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
|
||||
#ifndef NET_USES_AF_INDEP
|
||||
DBG (2, "sane_init: determining sane service port\n");
|
||||
serv = getservbyname ("sane", "tcp");
|
||||
serv = getservbyname ("sane-port", "tcp");
|
||||
|
||||
if (serv)
|
||||
{
|
||||
|
@ -675,7 +675,7 @@ sane_init (SANE_Int * version_code, SANE_Auth_Callback authorize)
|
|||
else
|
||||
{
|
||||
saned_port = htons (6566);
|
||||
DBG (1, "sane_init: could not find `sane' service (%s); using default "
|
||||
DBG (1, "sane_init: could not find `sane-port' service (%s); using default "
|
||||
"port %d\n", strerror (errno), ntohs (saned_port));
|
||||
}
|
||||
#endif /* !NET_USES_AF_INDEP */
|
||||
|
|
|
@ -77,7 +77,7 @@ and
|
|||
are contacted in addition to the hosts listed above.
|
||||
.PP
|
||||
For this backend to function properly, it is also necessary to define the
|
||||
.B sane
|
||||
.B sane-port
|
||||
service in
|
||||
.IR /etc/services .
|
||||
The
|
||||
|
@ -85,7 +85,7 @@ The
|
|||
service should be defined using a line of the following form:
|
||||
.PP
|
||||
.RS
|
||||
sane 6566/tcp # SANE network scanner daemon
|
||||
sane-port 6566/tcp # SANE network scanner daemon
|
||||
.RE
|
||||
.PP
|
||||
.SH FILES
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.TH saned 1 "29 Oct 2003" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.TH saned 1 "30 May 2004" "@PACKAGEVERSION@" "SANE Scanner Access Now Easy"
|
||||
.IX saned
|
||||
.SH NAME
|
||||
saned \- SANE network daemon
|
||||
|
@ -92,7 +92,7 @@ support IPv6, check the documentation for your inetd daemon.
|
|||
The configuration line normally looks like this:
|
||||
.PP
|
||||
.RS
|
||||
sane stream tcp nowait saned.saned @SBINDIR@/saned saned
|
||||
sane-port stream tcp nowait saned.saned @SBINDIR@/saned saned
|
||||
.RE
|
||||
.PP
|
||||
However, if your system uses
|
||||
|
@ -105,7 +105,7 @@ and use a line of the following form in
|
|||
instead:
|
||||
.PP
|
||||
.RS
|
||||
sane stream tcp nowait saned.saned /usr/sbin/tcpd @SBINDIR@/saned
|
||||
sane-port stream tcp nowait saned.saned /usr/sbin/tcpd @SBINDIR@/saned
|
||||
.RE
|
||||
.PP
|
||||
Note that both examples assume that there is a
|
||||
|
@ -130,7 +130,7 @@ for xinetd.conf may be helpful:
|
|||
.br
|
||||
# network.
|
||||
.br
|
||||
service sane
|
||||
service sane-port
|
||||
.br
|
||||
{
|
||||
.br
|
||||
|
@ -153,9 +153,11 @@ Finally, it is also necessary to add a line of the following form to
|
|||
.IR /etc/services :
|
||||
.PP
|
||||
.RS
|
||||
sane 6566/tcp # SANE network scanner daemon
|
||||
sane-port 6566/tcp # SANE network scanner daemon
|
||||
.RE
|
||||
.PP
|
||||
The official IANA short name for port 6566 is "sane-port". The older name "sane"
|
||||
is now deprecated.
|
||||
|
||||
.SH "RESTRICTIONS"
|
||||
In addition to the control connection (port 6566) saned also uses a data
|
||||
|
|
|
@ -2074,7 +2074,7 @@ main (int argc, char *argv[])
|
|||
DBG (DBG_WARN, "main: starting debug mode (level %d)\n", debug);
|
||||
|
||||
DBG (DBG_DBG,
|
||||
"main: trying to get port for service `sane' (getaddrinfo)\n");
|
||||
"main: trying to get port for service `sane-port' (getaddrinfo)\n");
|
||||
|
||||
memset (&hints, 0, sizeof (struct addrinfo));
|
||||
|
||||
|
@ -2082,11 +2082,11 @@ main (int argc, char *argv[])
|
|||
hints.ai_flags = AI_PASSIVE;
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
err = getaddrinfo (NULL, "sane", &hints, &res);
|
||||
err = getaddrinfo (NULL, "sane-port", &hints, &res);
|
||||
if (err)
|
||||
{
|
||||
DBG (DBG_WARN, "main: \"sane\" service unknown on your host; you should add\n");
|
||||
DBG (DBG_WARN, "main: sane 6566/tcp saned # SANE network scanner daemon\n");
|
||||
DBG (DBG_WARN, "main: \"sane-port\" service unknown on your host; you should add\n");
|
||||
DBG (DBG_WARN, "main: sane-port 6566/tcp saned # SANE network scanner daemon\n");
|
||||
DBG (DBG_WARN, "main: to your /etc/services file (or equivalent). Proceeding anyway.\n");
|
||||
err = getaddrinfo (NULL, "6566", &hints, &res);
|
||||
if (err)
|
||||
|
@ -2326,7 +2326,7 @@ main (int argc, char *argv[])
|
|||
|
||||
DBG (DBG_DBG,
|
||||
"main: trying to get port for service `sane' (getservbyname)\n");
|
||||
serv = getservbyname ("sane", "tcp");
|
||||
serv = getservbyname ("sane-port", "tcp");
|
||||
if (serv)
|
||||
{
|
||||
port = serv->s_port;
|
||||
|
|
Ładowanie…
Reference in New Issue