Subject: misc/26337: references to gethostby{addr,name} which are no longer used
To: None <gnats-bugs@gnats.NetBSD.org>
From: Peter Postma <peter@pointless.nl>
List: netbsd-bugs
Date: 07/15/2004 15:46:43
>Number: 26337
>Category: misc
>Synopsis: references to gethostby{addr,name} which are no longer used
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Thu Jul 15 13:47:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator: Peter Postma
>Release: NetBSD 2.0G
>Organization:
>Environment:
System: NetBSD mercury.pointless.nl 2.0G NetBSD 2.0G (mercury) #11: Fri Jul 2 17:57:06 CEST 2004 peter@mercury.pointless.nl:/usr/obj/sys/arch/sparc64/compile/mercury sparc64
Architecture: sparc64
Machine: sparc64
>Description:
In src/libexec/ there are a few references in comments and manpages to the
gethostby{addr,name} functions but the functions are no longer used in the
code. They have been replaced with the getnameinfo function.
The comments and manpages should be fixed to reference to this new function.
>How-To-Repeat:
>Fix:
Index: rlogind/rlogind.8
===================================================================
RCS file: /cvsroot/src/libexec/rlogind/rlogind.8,v
retrieving revision 1.15
diff -u -r1.15 rlogind.8
--- rlogind/rlogind.8 7 Aug 2003 09:46:47 -0000 1.15
+++ rlogind/rlogind.8 15 Jul 2004 13:37:47 -0000
@@ -78,7 +78,7 @@
.It
The server checks the client's source address
and requests the corresponding host name (see
-.Xr gethostbyaddr 3 ,
+.Xr getnameinfo 3 ,
.Xr hosts 5
and
.Xr named 8 ) .
Index: rlogind/rlogind.c
===================================================================
RCS file: /cvsroot/src/libexec/rlogind/rlogind.c,v
retrieving revision 1.32
diff -u -r1.32 rlogind.c
--- rlogind/rlogind.c 7 Aug 2003 09:46:47 -0000 1.32
+++ rlogind/rlogind.c 15 Jul 2004 13:37:47 -0000
@@ -290,7 +290,7 @@
if (getnameinfo((struct sockaddr *)fromp, fromp->sa_len,
saddr, sizeof(saddr), NULL, 0, NI_NAMEREQD) == 0) {
/*
- * If name returned by gethostbyaddr is in our domain,
+ * If name returned by getnameinfo is in our domain,
* attempt to verify that we haven't been fooled by someone
* in a remote net; look up the name and check that this
* address corresponds to the name.
Index: rshd/rshd.8
===================================================================
RCS file: /cvsroot/src/libexec/rshd/rshd.8,v
retrieving revision 1.15
diff -u -r1.15 rshd.8
--- rshd/rshd.8 7 Aug 2003 09:46:49 -0000 1.15
+++ rshd/rshd.8 15 Jul 2004 13:37:47 -0000
@@ -79,7 +79,7 @@
.It
The server checks the client's source address
and requests the corresponding host name (see
-.Xr gethostbyaddr 3 ,
+.Xr getnameinfo 3 ,
.Xr hosts 5
and
.Xr named 8 ) .
Index: telnetd/telnetd.8
===================================================================
RCS file: /cvsroot/src/libexec/telnetd/telnetd.8,v
retrieving revision 1.29
diff -u -r1.29 telnetd.8
--- telnetd/telnetd.8 7 Sep 2003 16:22:22 -0000 1.29
+++ telnetd/telnetd.8 15 Jul 2004 13:37:48 -0000
@@ -281,7 +281,7 @@
.Nm
to refuse connections from addresses that
cannot be mapped back into a symbolic name via the
-.Xr gethostbyaddr 3
+.Xr getnameinfo 3
routine.
.It Fl X Ar authtype
This option is only valid if
>Release-Note:
>Audit-Trail:
>Unformatted: