You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
826 B
28 lines
826 B
3 years ago
|
--- tcp_wrappers_7.6-ipv6.4/socket.c.patch7 1999-10-27 15:23:14.000000000 +0200
|
||
|
+++ tcp_wrappers_7.6-ipv6.4/socket.c 2013-01-23 11:41:48.776857327 +0100
|
||
|
@@ -54,6 +54,8 @@ int af;
|
||
|
{
|
||
|
char dot_name[MAXHOSTNAMELEN + 1];
|
||
|
|
||
|
+ struct hostent *hp;
|
||
|
+
|
||
|
/*
|
||
|
* Don't append dots to unqualified names. Such names are likely to come
|
||
|
* from local hosts files or from NIS.
|
||
|
@@ -62,8 +64,13 @@ int af;
|
||
|
if (strchr(name, '.') == 0 || strlen(name) >= MAXHOSTNAMELEN - 1) {
|
||
|
return (tcpd_gethostbyname(name, af));
|
||
|
} else {
|
||
|
- sprintf(dot_name, "%s.", name);
|
||
|
- return (tcpd_gethostbyname(dot_name, af));
|
||
|
+ sprintf(dot_name, "%s.", name);
|
||
|
+ hp = tcpd_gethostbyname(dot_name, af);
|
||
|
+ if (hp)
|
||
|
+ return hp;
|
||
|
+
|
||
|
+ else
|
||
|
+ return tcpd_gethostbyname(name, af);
|
||
|
}
|
||
|
}
|
||
|
|