ports/146509: [NEW PORT] www/mod_remoteip: Replaces the client IP address/hostname with that given by a proxy

Jim Riggs ports at christianserving.org
Wed May 12 03:20:01 UTC 2010


>Number:         146509
>Category:       ports
>Synopsis:       [NEW PORT] www/mod_remoteip: Replaces the client IP address/hostname with that given by a proxy
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 12 03:20:01 UTC 2010
>Closed-Date:
>Last-Modified:
>Originator:     Jim Riggs
>Release:        FreeBSD 6.3-RELEASE-p2 amd64
>Organization:
>Environment:
System: FreeBSD zion.christianserving.org 6.3-RELEASE-p2 FreeBSD 6.3-RELEASE-p2 #3: Mon May  5 21:27:22 CDT
>Description:
Backport of the Apache 2.3 module that replaces the apparent client
remote IP address and hostname for the request with the IP address
list presented by a proxy or load balancer via the request headers.

WWW:	http://httpd.apache.org/docs/2.3/mod/mod_remoteip.html

Currently includes a patch that I hope to get committed upstream.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- mod_remoteip-2.3.5.a.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mod_remoteip
#	mod_remoteip/files
#	mod_remoteip/files/patch-modules__metadata__mod_remoteip.c
#	mod_remoteip/distinfo
#	mod_remoteip/Makefile
#	mod_remoteip/pkg-descr
#
echo c - mod_remoteip
mkdir -p mod_remoteip > /dev/null 2>&1
echo c - mod_remoteip/files
mkdir -p mod_remoteip/files > /dev/null 2>&1
echo x - mod_remoteip/files/patch-modules__metadata__mod_remoteip.c
sed 's/^X//' >mod_remoteip/files/patch-modules__metadata__mod_remoteip.c << 'END-of-mod_remoteip/files/patch-modules__metadata__mod_remoteip.c'
X--- modules/metadata/mod_remoteip.c.orig	2010-05-11 21:33:43.631571954 -0500
X+++ modules/metadata/mod_remoteip.c	2010-05-11 21:34:15.374903181 -0500
X@@ -127,7 +127,7 @@
X     return (*ipstr == '\0');
X }
X 
X-static const char *proxies_set(cmd_parms *cmd, void *internal,
X+static const char *proxies_set(cmd_parms *cmd, void *cfg,
X                                const char *arg)
X {
X     remoteip_config_t *config = ap_get_module_config(cmd->server->module_config,
X@@ -142,7 +142,7 @@
X     if (!config->proxymatch_ip)
X         config->proxymatch_ip = apr_array_make(cmd->pool, 1, sizeof(*match));
X     match = (remoteip_proxymatch_t *) apr_array_push(config->proxymatch_ip);
X-    match->internal = internal;
X+    match->internal = cmd->info;
X 
X     if (looks_like_ip(ip)) {
X         /* Note s may be null, that's fine (explicit host) */
X@@ -168,7 +168,7 @@
X                 break;
X             match = (remoteip_proxymatch_t *) 
X                     apr_array_push(config->proxymatch_ip);
X-            match->internal = internal;
X+            match->internal = cmd->info;
X         }
X     }
X 
X@@ -182,7 +182,7 @@
X     return NULL;
X }
X 
X-static const char *proxylist_read(cmd_parms *cmd, void *internal,
X+static const char *proxylist_read(cmd_parms *cmd, void *cfg,
X                                   const char *filename)
X {
X     char lbuf[MAX_STRING_LEN];
X@@ -205,7 +205,7 @@
X         while (*(arg = ap_getword_conf(cmd->temp_pool, &args)) != '\0') {
X             if (*arg == '#' || *arg == '\0')
X                 break;
X-            errmsg = proxies_set(cmd, internal, arg);
X+            errmsg = proxies_set(cmd, cfg, arg);
X             if (errmsg) {
X                 errmsg = apr_psprintf(cmd->pool, "%s at line %d of %s", 
X                                       errmsg, cfp->line_number, filename);
END-of-mod_remoteip/files/patch-modules__metadata__mod_remoteip.c
echo x - mod_remoteip/distinfo
sed 's/^X//' >mod_remoteip/distinfo << 'END-of-mod_remoteip/distinfo'
XMD5 (httpd-2.3.5-alpha.tar.gz) = 625c9c0bf4a171cbc176a0ddcf00aea2
XSHA256 (httpd-2.3.5-alpha.tar.gz) = f1c1b322342653445db4acf049637997f9a37f478babd0277587fa58b27ae9b8
XSIZE (httpd-2.3.5-alpha.tar.gz) = 5038492
END-of-mod_remoteip/distinfo
echo x - mod_remoteip/Makefile
sed 's/^X//' >mod_remoteip/Makefile << 'END-of-mod_remoteip/Makefile'
X# New ports collection makefile for:	mod_remoteip
X# Date created:		2010-05-11
X# Whom:			Jim Riggs <ports at christianserving.org>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mod_remoteip
XPORTVERSION=	2.3.5.a
XCATEGORIES=	www
XMASTER_SITES=	${MASTER_SITE_APACHE_HTTPD}
XDISTNAME=	httpd-2.3.5-alpha
X
XMAINTAINER=	ports at christianserving.org
XCOMMENT=	Replaces the client IP address/hostname with that given by a proxy
X
XUSE_APACHE=	2.2+
XAP_FAST_BUILD=	YES
XAP_GENPLIST=	YES
X
XSRC_FILE=	modules/metadata/${PORTNAME}.c
X
X.include <bsd.port.mk>
END-of-mod_remoteip/Makefile
echo x - mod_remoteip/pkg-descr
sed 's/^X//' >mod_remoteip/pkg-descr << 'END-of-mod_remoteip/pkg-descr'
XBackport of the Apache 2.3 module that replaces the apparent client
Xremote IP address and hostname for the request with the IP address
Xlist presented by a proxy or load balancer via the request headers.
X
XWWW:	http://httpd.apache.org/docs/2.3/mod/mod_remoteip.html
END-of-mod_remoteip/pkg-descr
exit
--- mod_remoteip-2.3.5.a.shar ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list