[SCM] NSS Wrapper Repository - branch master updated

Andreas Schneider asn at samba.org
Fri Jan 31 05:39:41 MST 2014


The branch, master has been updated
       via  bb1f815 src: Remove the localhost shortcut.
      from  e4c453a Add ChangeLog.

http://gitweb.samba.org/?p=nss_wrapper.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit bb1f815557255a9e9a1059510eef94e2f0ed4111
Author: Andreas Schneider <asn at cryptomilk.org>
Date:   Thu Jan 30 16:15:07 2014 +0100

    src: Remove the localhost shortcut.
    
    If we do lookups for the hostname this could lead to wrong results if
    socket_wrapper loaded and the libnss_myhostname module in use.
    
    This could be tested with:
    
    getent ahosts <myhostname>
    
    Reviewed-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 src/nss_wrapper.c |   28 ----------------------------
 1 files changed, 0 insertions(+), 28 deletions(-)


Changeset truncated at 500 lines:

diff --git a/src/nss_wrapper.c b/src/nss_wrapper.c
index 087dbdd..5685fc6 100644
--- a/src/nss_wrapper.c
+++ b/src/nss_wrapper.c
@@ -3812,34 +3812,6 @@ static int nwrap_getaddrinfo(const char *node,
 	ret = libc_getaddrinfo(node, service, hints, &p);
 	if (ret == 0) {
 		*res = p;
-
-		switch (p->ai_family) {
-			case AF_INET:
-			{
-				struct sockaddr_in *sin =
-					(struct sockaddr_in *)p->ai_addr;
-
-				if (sin->sin_addr.s_addr == htonl(INADDR_LOOPBACK) ||
-				    sin->sin_addr.s_addr == htonl(INADDR_ANY) ||
-				    (sin->sin_addr.s_addr & htonl(0xff000000)) == htonl(0xff000000)) { /* some broadcast */
-					return ret;
-				}
-			}
-			break;
-#ifdef HAVE_IPV6
-			case AF_INET6:
-			{
-				struct sockaddr_in6 *sin6 =
-					(struct sockaddr_in6 *)p->ai_addr;
-
-				if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr) ||
-				    IN6_IS_ADDR_UNSPECIFIED(&sin6->sin6_addr)) {
-					return ret;
-				}
-			}
-			break;
-#endif
-		}
 	}
 
 	/* If no node has been specified, let glibc deal with it */


-- 
NSS Wrapper Repository


More information about the samba-cvs mailing list