mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
fix patch
Approved by: swills (mentor)
This commit is contained in:
parent
ca83d3678b
commit
2479fcefc0
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=321888
1 changed files with 14 additions and 14 deletions
|
@ -1,5 +1,5 @@
|
||||||
--- server/security.c.orig 2005-06-01 09:20:55.000000000 +0900
|
--- server/security.c.orig 2013-06-26 08:30:20.069392984 -0500
|
||||||
+++ server/security.c 2013-06-26 14:56:12.000000000 +0900
|
+++ server/security.c 2013-06-26 08:33:21.470393456 -0500
|
||||||
@@ -110,18 +110,17 @@
|
@@ -110,18 +110,17 @@
|
||||||
char *hosts_deny;
|
char *hosts_deny;
|
||||||
extern char *hosts_allow_table;
|
extern char *hosts_allow_table;
|
||||||
|
@ -21,26 +21,26 @@
|
||||||
-# else
|
-# else
|
||||||
- struct request_info req;
|
- struct request_info req;
|
||||||
-# endif /* HAVE_IPV6 */
|
-# endif /* HAVE_IPV6 */
|
||||||
|
|
||||||
hosts_allow = get_security_allow();
|
hosts_allow = get_security_allow();
|
||||||
hosts_deny = get_security_deny();
|
hosts_deny = get_security_deny();
|
||||||
@@ -133,7 +132,6 @@
|
@@ -133,7 +132,6 @@
|
||||||
hosts_allow_table = hosts_allow;
|
hosts_allow_table = hosts_allow;
|
||||||
hosts_deny_table = hosts_deny;
|
hosts_deny_table = hosts_deny;
|
||||||
|
|
||||||
-# ifdef HAVE_IPV6
|
-# ifdef HAVE_IPV6
|
||||||
/* Do this the new way, which specifically knows how to format IPv6
|
/* Do this the new way, which specifically knows how to format IPv6
|
||||||
addresses. */
|
addresses. */
|
||||||
|
|
||||||
@@ -153,42 +151,15 @@
|
@@ -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 */
|
understands */
|
||||||
- switch ( sa->sa_family ) {
|
- switch ( sa->sa_family ) {
|
||||||
- case AF_INET: {
|
- case AF_INET: {
|
||||||
- sin = (struct sockaddr_in *) sa;
|
- sin = (struct sockaddr_in *) sa;
|
||||||
- strncpy( wrapper_addr,
|
- 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 addr ),
|
||||||
- sizeof wrapper_addr ) ;
|
- sizeof wrapper_addr ) ;
|
||||||
- }
|
- }
|
||||||
|
@ -51,7 +51,7 @@
|
||||||
- /* If it's an IPv4 mapped address, drop the leading '::ffff:' */
|
- /* If it's an IPv4 mapped address, drop the leading '::ffff:' */
|
||||||
- if ( IN6_IS_ADDR_V4MAPPED( &(sin6->sin6_addr) ) )
|
- if ( IN6_IS_ADDR_V4MAPPED( &(sin6->sin6_addr) ) )
|
||||||
- strncpy( wrapper_addr, addr + 7, sizeof wrapper_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 */
|
- what tcp wrapper expects */
|
||||||
- else sprintf( wrapper_addr, "%s", addr );
|
- else sprintf( wrapper_addr, "%s", addr );
|
||||||
- }
|
- }
|
||||||
|
@ -63,21 +63,21 @@
|
||||||
+ strerror(errno));
|
+ strerror(errno));
|
||||||
+
|
+
|
||||||
log( L_LOG_WARNING, CONFIG, "client tcp wrapper address: %s", wrapper_addr );
|
log( L_LOG_WARNING, CONFIG, "client tcp wrapper address: %s", wrapper_addr );
|
||||||
|
|
||||||
return( hosts_ctl( directive, client_name, wrapper_addr, STRING_UNKNOWN ) );
|
return( hosts_ctl( directive, client_name, wrapper_addr, STRING_UNKNOWN ) );
|
||||||
-# else /* HAVE_IPV6 */
|
-# else /* HAVE_IPV6 */
|
||||||
-
|
-
|
||||||
- /* Do this the old way, which still seems to work */
|
- /* Do this the old way, which still seems to work */
|
||||||
-
|
-
|
||||||
- /* set up the request structure */
|
- /* set up the request structure */
|
||||||
- request_init(&req, RQ_FILE, 0, RQ_DAEMON, directive, 0);
|
- request_init(&req, RQ_FILE, 0, RQ_DAEMON, directive, 0);
|
||||||
-
|
-
|
||||||
- /* fill in the client info */
|
- /* fill in the client info */
|
||||||
- fromhost(&req);
|
- fromhost(&req);
|
||||||
-
|
-
|
||||||
- /* return the results of the access check */
|
- /* return the results of the access check */
|
||||||
- return(hosts_access(&req));
|
- return(hosts_access(&req));
|
||||||
-# endif /* HAVE_IPV6 */
|
-# endif /* HAVE_IPV6 */
|
||||||
|
|
||||||
#else /* USE_TCP_WRAPPERS */
|
#else /* USE_TCP_WRAPPERS */
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue