aboutsummaryrefslogtreecommitdiff
path: root/www/mod_auth_any
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2003-10-06 13:00:08 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2003-10-06 13:00:08 +0000
commit44297d052f1100305618831fad144c84a7f9e2bd (patch)
treeb2edc9c78462fdd3d186c0ffffd37c79b22ac770 /www/mod_auth_any
parent417280973f29bf2897d60b06f0a469aba6b3a2c2 (diff)
downloadports-44297d052f1100305618831fad144c84a7f9e2bd.tar.gz
ports-44297d052f1100305618831fad144c84a7f9e2bd.zip
Notes
Diffstat (limited to 'www/mod_auth_any')
-rw-r--r--www/mod_auth_any/Makefile18
-rw-r--r--www/mod_auth_any/distinfo2
-rw-r--r--www/mod_auth_any/files/bash_single_quote_escape_string.c45
-rw-r--r--www/mod_auth_any/files/patch-mod_auth_any.c37
-rw-r--r--www/mod_auth_any/pkg-descr2
5 files changed, 9 insertions, 95 deletions
diff --git a/www/mod_auth_any/Makefile b/www/mod_auth_any/Makefile
index 50a0c52c2028..71d7b4e61fbb 100644
--- a/www/mod_auth_any/Makefile
+++ b/www/mod_auth_any/Makefile
@@ -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@FreeBSD.org
+MAINTAINER= sheepkiller@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>
diff --git a/www/mod_auth_any/distinfo b/www/mod_auth_any/distinfo
index 92f0b80ba1be..098223eb5c0c 100644
--- a/www/mod_auth_any/distinfo
+++ b/www/mod_auth_any/distinfo
@@ -1 +1 @@
-MD5 (mod_auth_any-1.0.2.tgz) = cd2f0c6d39af4fe4c6919caeac38e1b3
+MD5 (mod_auth_any-1.3.2.tar.gz) = ae9ac533576915a05e9728e914c4ec88
diff --git a/www/mod_auth_any/files/bash_single_quote_escape_string.c b/www/mod_auth_any/files/bash_single_quote_escape_string.c
deleted file mode 100644
index 439b205c4426..000000000000
--- a/www/mod_auth_any/files/bash_single_quote_escape_string.c
+++ /dev/null
@@ -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;
-}
diff --git a/www/mod_auth_any/files/patch-mod_auth_any.c b/www/mod_auth_any/files/patch-mod_auth_any.c
deleted file mode 100644
index e234b8517b10..000000000000
--- a/www/mod_auth_any/files/patch-mod_auth_any.c
+++ /dev/null
@@ -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",
diff --git a/www/mod_auth_any/pkg-descr b/www/mod_auth_any/pkg-descr
index 83d164609a8a..8e636d711d89 100644
--- a/www/mod_auth_any/pkg-descr
+++ b/www/mod_auth_any/pkg-descr
@@ -3,4 +3,4 @@ WebNIS to authenticate a user. No more having to keep AuthUserFiles
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