From owner-svn-ports-head@FreeBSD.ORG Thu Jun 27 13:25:39 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 585055D3; Thu, 27 Jun 2013 13:25:39 +0000 (UTC) (envelope-from feld@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 30A1013BE; Thu, 27 Jun 2013 13:25:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5RDPcHo048242; Thu, 27 Jun 2013 13:25:38 GMT (envelope-from feld@svn.freebsd.org) Received: (from feld@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5RDPcaC048241; Thu, 27 Jun 2013 13:25:38 GMT (envelope-from feld@svn.freebsd.org) Message-Id: <201306271325.r5RDPcaC048241@svn.freebsd.org> From: Mark Felder Date: Thu, 27 Jun 2013 13:25:38 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r321888 - head/net/rwhoisd/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jun 2013 13:25:39 -0000 Author: feld Date: Thu Jun 27 13:25:38 2013 New Revision: 321888 URL: http://svnweb.freebsd.org/changeset/ports/321888 Log: fix patch Approved by: swills (mentor) Modified: head/net/rwhoisd/files/patch-server-security.c Modified: head/net/rwhoisd/files/patch-server-security.c ============================================================================== --- head/net/rwhoisd/files/patch-server-security.c Thu Jun 27 12:51:07 2013 (r321887) +++ head/net/rwhoisd/files/patch-server-security.c Thu Jun 27 13:25:38 2013 (r321888) @@ -1,5 +1,5 @@ ---- server/security.c.orig 2005-06-01 09:20:55.000000000 +0900 -+++ server/security.c 2013-06-26 14:56:12.000000000 +0900 +--- server/security.c.orig 2013-06-26 08:30:20.069392984 -0500 ++++ server/security.c 2013-06-26 08:33:21.470393456 -0500 @@ -110,18 +110,17 @@ char *hosts_deny; extern char *hosts_allow_table; @@ -21,26 +21,26 @@ -# else - struct request_info req; -# endif /* HAVE_IPV6 */ - + hosts_allow = get_security_allow(); hosts_deny = get_security_deny(); @@ -133,7 +132,6 @@ hosts_allow_table = hosts_allow; hosts_deny_table = hosts_deny; - + -# ifdef HAVE_IPV6 /* Do this the new way, which specifically knows how to format IPv6 addresses. */ - + @@ -153,42 +151,15 @@ - - /* convert the address to a presentation format that tcp wrapper + + /* convert the address to a presentation format that tcp wrapper understands */ - switch ( sa->sa_family ) { - case AF_INET: { - sin = (struct sockaddr_in *) sa; - strncpy( wrapper_addr, -- inet_ntop( AF_INET, (void *) sin->sin_addr.s_addr, addr, +- inet_ntop( AF_INET, (void *) sin->sin_addr.s_addr, addr, - sizeof addr ), - sizeof wrapper_addr ) ; - } @@ -51,7 +51,7 @@ - /* If it's an IPv4 mapped address, drop the leading '::ffff:' */ - if ( IN6_IS_ADDR_V4MAPPED( &(sin6->sin6_addr) ) ) - strncpy( wrapper_addr, addr + 7, sizeof wrapper_addr ); -- /* otherwise surround the address with braces to hopefully match +- /* otherwise surround the address with braces to hopefully match - what tcp wrapper expects */ - else sprintf( wrapper_addr, "%s", addr ); - } @@ -63,21 +63,21 @@ + strerror(errno)); + log( L_LOG_WARNING, CONFIG, "client tcp wrapper address: %s", wrapper_addr ); - + return( hosts_ctl( directive, client_name, wrapper_addr, STRING_UNKNOWN ) ); -# else /* HAVE_IPV6 */ -- +- - /* Do this the old way, which still seems to work */ -- +- - /* set up the request structure */ - request_init(&req, RQ_FILE, 0, RQ_DAEMON, directive, 0); -- +- - /* fill in the client info */ - fromhost(&req); - - /* return the results of the access check */ - return(hosts_access(&req)); -# endif /* HAVE_IPV6 */ - + #else /* USE_TCP_WRAPPERS */ return TRUE;