ports/60030: [maintainer patch] www/mod_auth_remote: fix small bug in HTTP request

Clement LAFORET sheepkiller at cultdeadsheep.org
Mon Dec 8 00:10:13 UTC 2003


>Number:         60030
>Category:       ports
>Synopsis:       [maintainer patch] www/mod_auth_remote: fix small bug in HTTP request
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          maintainer-update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Dec 07 16:10:07 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Clement Laforet
>Release:        FreeBSD 5.2-CURRENT i386
>Organization:
cotds.org
>Environment:
System: FreeBSD lucifer.cultdeadsheep.org 5.2-CURRENT FreeBSD 5.2-CURRENT #0: Sun Dec 7 15:41:23 GMT 2003 root at lucifer.cultdeadsheep.org:/usr/obj/usr/src/sys/LUCIFER i386


>Description:
	- Fix malformed request which prevents from authenticate agaist Zope servers
		Notice by: Morten W. Petersen" <morten at nidelven-it.no>
		Obtained from: srp at grex.org (author)

	- Port changes:
		- use USE_APACHE
		- use PORTDOCS
		- fix install/deinstall behaviour with package install
		- add file:
			files/patch-mod_auth_remote.c
>How-To-Repeat:
	N/A.
>Fix:


--- mod_auth_remote.diff begins here ---
Index: mod_auth_remote/Makefile
===================================================================
RCS file: /SERVICES/cvs/FreeBSD/ports/www/mod_auth_remote/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- mod_auth_remote/Makefile	14 Oct 2003 08:48:23 -0000	1.2
+++ mod_auth_remote/Makefile	8 Dec 2003 00:03:34 -0000
@@ -7,6 +7,7 @@
 
 PORTNAME=	mod_auth_remote
 PORTVERSION=	0.1
+PORTREVISION=	1
 CATEGORIES=	www
 MASTER_SITES=	http://sheepkiller.nerim.net/ports/${PORTNAME}/ \
 		http://www.cultdeadsheep.org/FreeBSD/ports/download/distfiles/
@@ -16,11 +17,10 @@
 MAINTAINER=	sheepkiller at cultdeadsheep.org
 COMMENT=	Allows users to authenticate on a remote web server
 
-BUILD_DEPENDS=	${LOCALBASE}/sbin/apxs:${PORTSDIR}/www/apache2
-RUN_DEPENDS=	${BUILD_DEPENDS}
-
-APXS?=		${LOCALBASE}/sbin/apxs
+USE_APACHE=	YES
+WITH_APACHE2=	YES
 
+PORTDOCS=	readme.txt
 do-build:
 	@(cd ${WRKSRC} && ${APXS} -c ${PORTNAME}.c)
 
@@ -28,7 +28,7 @@
 	@(cd ${WRKSRC} && ${APXS} -A -i ${PORTNAME}.la)
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}
-	@${INSTALL_DATA} ${WRKSRC}/readme.txt ${DOCSDIR}
+	@${INSTALL_DATA} ${WRKSRC}/${PORTDOCS} ${DOCSDIR}
 .endif
 
 .include <bsd.port.mk>
Index: mod_auth_remote/pkg-plist
===================================================================
RCS file: /SERVICES/cvs/FreeBSD/ports/www/mod_auth_remote/pkg-plist,v
retrieving revision 1.1
diff -u -r1.1 pkg-plist
--- mod_auth_remote/pkg-plist	8 Oct 2003 10:32:04 -0000	1.1
+++ mod_auth_remote/pkg-plist	8 Dec 2003 00:03:34 -0000
@@ -1,5 +1,4 @@
 libexec/apache2/mod_auth_remote.so
- at exec %D/sbin/apxs -e -a -n auth_remote %D/%f
-%%PORTDOCS%%%%DOCSDIR%%/readme.txt
-%%PORTDOCS%%@dirrm %%DOCSDIR%%
+ at exec %D/sbin/apxs -e -A -n auth_remote %D/%f
+ at unexec %D/sbin/apxs -e -A -n auth_remote %D/%f
 @unexec echo "===>  If you do not plan on reinstalling mod_auth_remote, you must manually remove"; echo "===>  references to it in httpd.conf."
Index: mod_auth_remote/files/patch-mod_auth_remote.c
===================================================================
RCS file: mod_auth_remote/files/patch-mod_auth_remote.c
diff -N mod_auth_remote/files/patch-mod_auth_remote.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ mod_auth_remote/files/patch-mod_auth_remote.c	8 Dec 2003 00:03:34 -0000
@@ -0,0 +1,20 @@
+--- mod_auth_remote.c.orig	Tue Jan 21 16:44:53 2003
++++ mod_auth_remote.c	Sun Dec  7 22:42:36 2003
+@@ -141,8 +141,8 @@
+    itemp = strlen(user_pass);
+    encoded = apr_palloc(r->pool, (((itemp+2)/3)*4)+2); 
+    apr_base64_encode(encoded, user_pass, itemp);
+-   req_b = apr_pstrcat(r->pool, "HEAD ", conf->remote_uri," HTTP/1.0 ", 
+-                       "\nAuthorization: Basic ",encoded,CRLF,CRLF,NULL);
++   req_b = apr_pstrcat(r->pool, "HEAD ", conf->remote_uri," HTTP/1.0", 
++                       CRLF,"Authorization: Basic ",encoded,CRLF,CRLF,NULL);
+    bytes = strlen(req_b);
+    val = apr_send(socket, req_b, &bytes);
+    if(val != APR_SUCCESS)
+@@ -194,4 +194,4 @@
+   NULL,
+   auth_remote_cmds,
+   register_hooks
+-};
+\ No newline at end of file
++};
--- mod_auth_remote.diff ends here ---


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



More information about the freebsd-ports-bugs mailing list