FreeBSD Bugzilla – Attachment 177905 Details for
Bug 209869
www/mod_rpaf2: [PATCH] update to v0.8.4
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
svn diff www/mod_rpaf2
mod_rpaf2.diff (text/plain), 7.73 KB, created by
geoffroy desvernay
on 2016-12-12 09:21:51 UTC
(
hide
)
Description:
svn diff www/mod_rpaf2
Filename:
MIME Type:
Creator:
geoffroy desvernay
Created:
2016-12-12 09:21:51 UTC
Size:
7.73 KB
patch
obsolete
>Index: www/mod_rpaf2/Makefile >=================================================================== >--- www/mod_rpaf2/Makefile (revision 428376) >+++ www/mod_rpaf2/Makefile (working copy) >@@ -2,9 +2,7 @@ > # $FreeBSD$ > > PORTNAME= mod_rpaf >-PORTVERSION= 0.6.0 >-DISTVERSIONPREFIX= v >-PORTREVISION= 3 >+PORTVERSION= 0.8.4 > CATEGORIES= www > PKGNAMESUFFIX= 2 > >@@ -11,14 +9,33 @@ > MAINTAINER= apache@FreeBSD.org > COMMENT= Make proxied requests appear with client IP > >+LICENSE= APACHE20 >+ > USE_GITHUB= yes > GH_ACCOUNT= gnif >+GH_TAGNAME= v0.8.4 > >+DOCS= README.md >+ > USE_APACHE= 22+ > AP_FAST_BUILD= yes >-AP_GENPLIST= yes > SHORTMODNAME= rpaf > >-SRC_FILE= mod_rpaf-2.0.c >+SRC_FILE= mod_rpaf.c > >-.include <bsd.port.mk> >+APMOD_FILE= 200_mod_rpaf.conf.sample >+PLIST_SUB+= APMOD_FILE=${APMOD_FILE} >+PLIST_FILES= @sample\ %%APACHEETCDIR%%/modules.d/200_${PORTNAME}.conf.sample \ >+ %%APACHEMODDIR%%/${PORTNAME}.so >+SUB_FILES= ${APMOD_FILE} >+ >+PORTDOCS= README.md >+ >+.include <bsd.port.pre.mk> >+ >+post-install: >+ @${MKDIR} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/modules.d ${STAGEDIR}${DOCSDIR} >+ ${INSTALL_DATA} ${WRKDIR}/${APMOD_FILE} ${STAGEDIR}${PREFIX}/${APACHEETCDIR}/modules.d >+ ${INSTALL_DATA} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR} >+ >+.include <bsd.port.post.mk> >Index: www/mod_rpaf2/distinfo >=================================================================== >--- www/mod_rpaf2/distinfo (revision 428376) >+++ www/mod_rpaf2/distinfo (working copy) >@@ -1,3 +1,3 @@ >-TIMESTAMP = 1464785880 >-SHA256 (gnif-mod_rpaf-v0.6.0_GH0.tar.gz) = f89e51d7331d336a00833d6dc1cc786430d9f9c53bbbac97f22a96dbe803c7e7 >-SIZE (gnif-mod_rpaf-v0.6.0_GH0.tar.gz) = 7643 >+TIMESTAMP = 1464885904 >+SHA256 (gnif-mod_rpaf-0.8.4-v0.8.4_GH0.tar.gz) = b78f292d7336f839527d6fb2213116c995a525ad9aa38c344c485abbd76848f5 >+SIZE (gnif-mod_rpaf-0.8.4-v0.8.4_GH0.tar.gz) = 6458 >Index: www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in >=================================================================== >--- www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in (nonexistent) >+++ www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in (working copy) >@@ -0,0 +1,33 @@ >+LoadModule rpaf_module %%APACHEMODDIR%%/mod_rpaf.so >+<IfModule mod_rpaf> >+ # Enable reverse proxy add forward >+ #RPAF_Enable On >+ >+ # What IPs & bitmasked subnets to adjust requests for >+ #RPAF_ProxyIPs 127.0.0.1 10.0.0.0/24 >+ >+ # The header to use for the real IP address >+ #RPAF_Header X-Forwarded-For >+ >+ # Update vhost name so ServerName & ServerAlias work >+ #RPAF_SetHostName Off >+ >+ # Set the HTTPS environment variable >+ # to the header value contained in >+ # X-HTTPS, or X-Forwarded-HTTPS. For >+ # best results make sure that mod_ssl >+ # is NOT enabled. >+ #RPAF_SetHTTPS Off >+ >+ # Set the server port to the header >+ # value contained in X-Port, or >+ # X-Forwarded-Port. >+ # (see https://github.com/gnif/mod_rpaf/issues/12) >+ #RPAF_SetPort Off >+ >+ # Option to forbid request if not from >+ # trusted RPAF_ProxyIPs; otherwise >+ # cannot be done with Allow/Deny after >+ # remote addr substitution >+ #RPAF_ForbidIfNotProxy Off >+</IfModule> > >Property changes on: www/mod_rpaf2/files/200_mod_rpaf.conf.sample.in >___________________________________________________________________ >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: www/mod_rpaf2/files/patch-mod__rpaf.c >=================================================================== >--- www/mod_rpaf2/files/patch-mod__rpaf.c (nonexistent) >+++ www/mod_rpaf2/files/patch-mod__rpaf.c (working copy) >@@ -0,0 +1,11 @@ >+--- mod_rpaf.c.orig 2016-12-12 09:04:09 UTC >++++ mod_rpaf.c >+@@ -114,7 +114,7 @@ static const char *rpaf_set_proxy_ip(cmd >+ >+ if (rpaf_looks_like_ip(proxy_ip)) { >+ ip = apr_pstrdup(cmd->temp_pool, proxy_ip); >+- if (mask = ap_strchr(ip, '/')) { >++ if ((mask = ap_strchr(ip, '/'))) { >+ *mask++ = '\0'; >+ } >+ sub = (apr_ipsubnet_t **)apr_array_push(cfg->proxy_ips); > >Property changes on: www/mod_rpaf2/files/patch-mod__rpaf.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: www/mod_rpaf2/files/patch-mod_rpaf-2.0.c >=================================================================== >--- www/mod_rpaf2/files/patch-mod_rpaf-2.0.c (revision 428376) >+++ www/mod_rpaf2/files/patch-mod_rpaf-2.0.c (nonexistent) >@@ -1,66 +0,0 @@ >-PR: ports/179525 Fix for mod_rpaf2 compatibility with Apache 2.4 >-======================================================================== >---- ./mod_rpaf-2.0.c.orig >-+++ ./mod_rpaf-2.0.c >-@@ -86,6 +86,23 @@ >- request_rec *r; >- } rpaf_cleanup_rec; >- >-+ >-+inline apr_sockaddr_t * rpaf_client_addr(conn_rec *c) { >-+#if AP_SERVER_MAJORVERSION_NUMBER >= 2 && AP_SERVER_MINORVERSION_NUMBER >= 4 >-+ return c->client_addr; >-+#else >-+ return c->remote_addr; >-+#endif >-+} >-+ >-+inline char * rpaf_client_ip(conn_rec *c) { >-+#if AP_SERVER_MAJORVERSION_NUMBER >= 2 && AP_SERVER_MINORVERSION_NUMBER >= 4 >-+ return c->client_ip; >-+#else >-+ return c->remote_ip; >-+#endif >-+} >-+ >- static void *rpaf_create_server_cfg(apr_pool_t *p, server_rec *s) { >- rpaf_server_cfg *cfg = (rpaf_server_cfg *)apr_pcalloc(p, sizeof(rpaf_server_cfg)); >- if (!cfg) >-@@ -147,8 +164,9 @@ >- >- static apr_status_t rpaf_cleanup(void *data) { >- rpaf_cleanup_rec *rcr = (rpaf_cleanup_rec *)data; >-- rcr->r->connection->remote_ip = apr_pstrdup(rcr->r->connection->pool, rcr->old_ip); >-- rcr->r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(rcr->r->connection->remote_ip); >-+ char *remote_ip = rpaf_client_ip(rcr->r->connection); >-+ strcpy(remote_ip,apr_pstrdup(rcr->r->connection->pool, rcr->old_ip)); >-+ rpaf_client_addr(rcr->r->connection)->sa.sin.sin_addr.s_addr = apr_inet_addr(remote_ip); >- return APR_SUCCESS; >- } >- >-@@ -160,8 +178,8 @@ >- >- if (!cfg->enable) >- return DECLINED; >-- >-- if (is_in_array(r->connection->remote_ip, cfg->proxy_ips) == 1) { >-+ char *remote_ip = rpaf_client_ip(r->connection); >-+ if (is_in_array(remote_ip, cfg->proxy_ips) == 1) { >- /* check if cfg->headername is set and if it is use >- that instead of X-Forwarded-For by default */ >- if (cfg->headername && (fwdvalue = apr_table_get(r->headers_in, cfg->headername))) { >-@@ -180,11 +198,11 @@ >- if (*fwdvalue != '\0') >- ++fwdvalue; >- } >-- rcr->old_ip = apr_pstrdup(r->connection->pool, r->connection->remote_ip); >-+ rcr->old_ip = apr_pstrdup(r->connection->pool, remote_ip); >- rcr->r = r; >- apr_pool_cleanup_register(r->pool, (void *)rcr, rpaf_cleanup, apr_pool_cleanup_null); >-- r->connection->remote_ip = apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)]); >-- r->connection->remote_addr->sa.sin.sin_addr.s_addr = apr_inet_addr(r->connection->remote_ip); >-+ strcpy(remote_ip,apr_pstrdup(r->connection->pool, ((char **)arr->elts)[((arr->nelts)-1)])); >-+ rpaf_client_addr(r->connection)->sa.sin.sin_addr.s_addr = apr_inet_addr(remote_ip); >- if (cfg->sethostname) { >- const char *hostvalue; >- if (hostvalue = apr_table_get(r->headers_in, "X-Forwarded-Host")) { > >Property changes on: www/mod_rpaf2/files/patch-mod_rpaf-2.0.c >___________________________________________________________________ >Deleted: fbsd:nokeywords >## -1 +0,0 ## >-yes >\ No newline at end of property >Deleted: svn:eol-style >## -1 +0,0 ## >-native >\ No newline at end of property >Deleted: svn:mime-type >## -1 +0,0 ## >-text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 209869
:
170839
|
170952
|
177848
| 177905