summary refs log tree commit diff
path: root/inet/rcmd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-29 18:12:01 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-29 18:12:01 +0000
commit30f1226b0b921c541d539450e5b6fe8af7fc4ab9 (patch)
treee6b03d73295b23e8b8da7cf341e31e9fb1948937 /inet/rcmd.c
parent1a6c971d0030bdd01aacbee3bbb52602f5ab6b4c (diff)
downloadglibc-30f1226b0b921c541d539450e5b6fe8af7fc4ab9.tar.gz
glibc-30f1226b0b921c541d539450e5b6fe8af7fc4ab9.tar.xz
glibc-30f1226b0b921c541d539450e5b6fe8af7fc4ab9.zip
Update.
2000-08-29  Ulrich Drepper  <drepper@redhat.com>

	* inet/rcmd.c (__checkhost_sa): If getnameinfo succeeds but the
	names don't match don't return.
	Patch by Olaf Kirch <okir@flash.lst.de>.
Diffstat (limited to 'inet/rcmd.c')
-rw-r--r--inet/rcmd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/inet/rcmd.c b/inet/rcmd.c
index 6c01f96811..16ad02b438 100644
--- a/inet/rcmd.c
+++ b/inet/rcmd.c
@@ -615,8 +615,9 @@ __checkhost_sa (struct sockaddr *ra, size_t ralen, char *lhost,
 	/* XXX */
 	if (getnameinfo(ra, ralen,
 			raddr, sizeof(raddr), NULL, 0,
-			NI_NUMERICHOST) == 0)
-		return negate * (strcmp(raddr, lhost) == 0);
+			NI_NUMERICHOST) == 0
+	    && strcmp(raddr, lhost) == 0)
+		return negate;
 
 	/* Better be a hostname. */
 	match = 0;