(__checkhost_sa): If getnameinfo succeeds but the names don't match
authordrepper <drepper>
Tue, 29 Aug 2000 18:00:48 +0000 (18:00 +0000)
committerdrepper <drepper>
Tue, 29 Aug 2000 18:00:48 +0000 (18:00 +0000)
don't return.

inet/rcmd.c

index 6c01f96..16ad02b 100644 (file)
@@ -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;