ports/57413: [update orphand port] www/mod_auth_any: Update to 1.3.2 and take maintainership
Clement Laforet
sheepkiller at cultdeadsheep.org
Sat Oct 4 09:50:07 UTC 2003
The following reply was made to PR ports/57413; it has been noted by GNATS.
From: Clement Laforet <sheepkiller at cultdeadsheep.org>
To: FreeBSD-gnats-submit at freebsd.org
Cc: Edwin Groothuis <edwin at FreeBSD.org>
Subject: Re: ports/57413: [update orphand port] www/mod_auth_any: Update to
1.3.2 and take maintainership
Date: Sat, 4 Oct 2003 11:43:45 +0200
On Sat, 4 Oct 2003 00:23:11 -0700 (PDT)
Edwin Groothuis <edwin at FreeBSD.org> wrote:
> Could you please check the patch-files?
> They don't apply cleanly anymore.
oups... they can be safely removed. I totally forgot it.
Here the correct patch:
removed files:
files/bash_single_quote_escape_string.c
files/patch-mod_auth_any.c
Index: mod_auth_any/Makefile
===================================================================
RCS file: /WORK/REPO/ports/www/mod_auth_any/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- mod_auth_any/Makefile 25 Mar 2003 04:23:11 -0000 1.6
+++ mod_auth_any/Makefile 30 Sep 2003 17:33:29 -0000
@@ -6,29 +6,25 @@
#
PORTNAME= mod_auth_any
-PORTVERSION= 1.0.2
-PORTREVISION= 1
+PORTVERSION= 1.3.2
CATEGORIES= www
-MASTER_SITES= ftp://ftp.itlab.musc.edu/pub/toolbox/mod_auth_any/
-EXTRACT_SUFX= .tgz
+MASTER_SITES= http://www.itlab.musc.edu/webNIS/dist/
-MAINTAINER= ports at FreeBSD.org
+MAINTAINER= sheepkiller at cultdeadsheep.org
COMMENT= Apache module to use any command line program to authenticate a user
BUILD_DEPENDS= ${APXS}:${APACHE_PORT}
RUN_DEPENDS= ${APXS}:${APACHE_PORT}
+WRKSRC= ${WRKDIR}/${PORTNAME}
+
APXS?= ${LOCALBASE}/sbin/apxs
APACHE_PORT?= ${PORTSDIR}/www/apache13
-post-patch:
- @${CAT} ${FILESDIR}/bash_single_quote_escape_string.c >> \
- ${WRKSRC}/${PORTNAME}.c
-
do-build:
- @cd ${WRKSRC} && ${APXS} -c ${PORTNAME}.c
+ @cd ${WRKSRC}/src && ${APXS} -c ${PORTNAME}.c
do-install:
- ${APXS} -i -A -n ${PORTNAME:S/mod_//g} ${WRKSRC}/${PORTNAME}.so
+ ${APXS} -i -A -n ${PORTNAME:S/mod_//g} ${WRKSRC}/src/${PORTNAME}.so
.include <bsd.port.mk>
Index: mod_auth_any/distinfo
===================================================================
RCS file: /WORK/REPO/ports/www/mod_auth_any/distinfo,v
retrieving revision 1.1
diff -u -r1.1 distinfo
--- mod_auth_any/distinfo 10 Apr 2001 22:28:40 -0000 1.1
+++ mod_auth_any/distinfo 30 Sep 2003 17:33:29 -0000
@@ -1 +1 @@
-MD5 (mod_auth_any-1.0.2.tgz) = cd2f0c6d39af4fe4c6919caeac38e1b3
+MD5 (mod_auth_any-1.3.2.tar.gz) = ae9ac533576915a05e9728e914c4ec88
Index: mod_auth_any/pkg-descr
===================================================================
RCS file: /WORK/REPO/ports/www/mod_auth_any/pkg-descr,v
retrieving revision 1.1
diff -u -r1.1 pkg-descr
--- mod_auth_any/pkg-descr 10 Apr 2001 22:28:40 -0000 1.1
+++ mod_auth_any/pkg-descr 30 Sep 2003 17:33:29 -0000
@@ -3,4 +3,4 @@
in sync, or maintain some nasty database. You can even have an
expect script that does ssh authentication.
-WWW: http://www.itlab.musc.edu/~nafees/mod_auth_any.html
+WWW: http://www.itlab.musc.edu/webNIS/mod_auth_any.html
Index: mod_auth_any/files/bash_single_quote_escape_string.c
===================================================================
RCS file: mod_auth_any/files/bash_single_quote_escape_string.c
diff -N mod_auth_any/files/bash_single_quote_escape_string.c
--- mod_auth_any/files/bash_single_quote_escape_string.c 25 Mar 2003 04:23:11 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,45 +0,0 @@
-/* Escape special characters in the input string so that the bash
- shell will not interpolate them when the input string is withing
- single quotes.
-
- IN: null-terminated character array containing string to be interpolated
- OUT: newly allocate (using malloc) null-terminated character array
- containing the input string with the special characters properly
- escaped */
-char* bash_single_quote_escape_string(const char *s) {
- /* used to count the length of the string and the number of single quotes */
- int str_len, sq_count;
- int s_pos, buf_pos; /* copy chars loop counter */
- /* used to hold the final result string */
- char *buf;
- const char *escapees = "\"'\\$~` \t|&;()<>";
-
- /* Count the single quotes.
- LOOP INVARIANT: str_len < (number of chars in string 's')
- POSTCONDITION: sq_count == (number of single quotes in string 's') */
- for (str_len = 0, sq_count = 0; s[str_len] != '\0'; str_len++)
- if (strchr(escapees, s[str_len]) != NULL)
- sq_count++;
-
- /* Allocate the memory for the final string.
- Each ' (one char) will become \' (2 chars), so multiply by 2
- and don't forget to add 1 for terminating null. */
- buf = (char*) malloc(sizeof(char) * (str_len + 1 + sq_count * 2));
-
- /* Copy the chars of 's' into 'buf', turning each ' into \' */
- for (s_pos = 0, buf_pos = 0; s_pos < str_len; s_pos++) {
- /* If we see a single quote, then put '\'' into 'buf' and advance
- buf_pos 4 positions, else put the next char from 's' into 'buf'
- and advance buf_pos 1 position. */
- if(strchr(escapees, s[s_pos]) != NULL) {
- buf[buf_pos++] = '\\';
- buf[buf_pos++] = s[s_pos];
- } else {
- buf[buf_pos++] = s[s_pos];
- }
- }
- /* don't forget the null terminator */
- buf[buf_pos] = '\0';
-
- return buf;
-}
Index: mod_auth_any/files/patch-mod_auth_any.c
===================================================================
RCS file: mod_auth_any/files/patch-mod_auth_any.c
diff -N mod_auth_any/files/patch-mod_auth_any.c
--- mod_auth_any/files/patch-mod_auth_any.c 25 Mar 2003 04:23:11 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,37 +0,0 @@
---- mod_auth_any.c.orig Tue Jan 9 05:48:20 2001
-+++ mod_auth_any.c Tue Mar 25 01:09:55 2003
-@@ -121,6 +121,7 @@
-
- */
-
-+char* bash_single_quote_escape_string(const char *);
-
- /* NB: debugging stuff */
- extern int errno;
-@@ -180,13 +181,25 @@
- const char *rpw, *w;
- FILE* ext_authprog;
- FILE* fp;
-+ char *escaped_user, *escaped_password;
-
- l = (char*) malloc (MAX_STRING_LEN * sizeof(char));
-+ memset (l, '\0', MAX_STRING_LEN);
- execstr = (char*) malloc (MAX_STRING_LEN * sizeof(char));
-
- setenv ("REMOTE_ADDR", r -> connection -> remote_ip, 1);
-+
-+ /* escape the user name and the password */
-+ escaped_user = bash_single_quote_escape_string(user);
-+ escaped_password = bash_single_quote_escape_string(password);
-+
- /* open the program stream */
-- snprintf (execstr, MAX_STRING_LEN, "%s %s \"%s\"", auth_pwfile, user, password);
-+ snprintf (execstr, MAX_STRING_LEN, "%s %s %s", auth_pwfile, escaped_user, escaped_password);
-+
-+ /* free the escaped user and password before we forget */
-+ free(escaped_user);
-+ free(escaped_password);
-+
- if (!(ext_authprog = popen (execstr, "r"))) {
-
- ap_log_rerror (APLOG_MARK, APLOG_ERR, r, "Could not popen() on program: %s: %s",
More information about the freebsd-ports-bugs
mailing list