diff options
author | adam <adam@pkgsrc.org> | 2006-01-06 22:46:51 +0000 |
---|---|---|
committer | adam <adam@pkgsrc.org> | 2006-01-06 22:46:51 +0000 |
commit | 8e5abd345e4f0fdf37e933d1e310d86d945058d4 (patch) | |
tree | 5b8c0dbcde41e5a3d8ee82663d63597c1aeaafd8 /www | |
parent | f967965ad486f56a10310c3931241d92832900db (diff) | |
download | pkgsrc-8e5abd345e4f0fdf37e933d1e310d86d945058d4.tar.gz |
Changes 2.05:
Temporary files used to accept file uploads were not closed properly. This
resulted in a file descriptor leak, which was unlikely to be serious because of
the short lifespan of CGI programs and the fact that very few forms upload many
files at once. However, on the Windows platform and possibly some others, file
locking semantics prevented file uploads from working at all with these files
not properly closed. Fixed in 2.05.
Changes 2.04:
Documentation fixes: the cgiHtmlEscape, cgiHtmlEscapeData, cgiValueEscape, and
cgiValueEscapeData routines were named incorrectly in the manual. No code
changes in version 2.04.
Changes 2.03:
Support for setting cookies has been reimplemented. The new code closely
follows the actual practice of web sites that successfully use cookies, rather
than attempting to implement the specification. The new code can successfully
set more than one cookie at a time in typical web browsers.
Diffstat (limited to 'www')
-rw-r--r-- | www/cgic/Makefile | 8 | ||||
-rw-r--r-- | www/cgic/distinfo | 16 | ||||
-rw-r--r-- | www/cgic/patches/patch-aa | 45 | ||||
-rw-r--r-- | www/cgic/patches/patch-ac | 30 | ||||
-rw-r--r-- | www/cgic/patches/patch-ae | 6 | ||||
-rw-r--r-- | www/cgic/patches/patch-af | 6 |
6 files changed, 52 insertions, 59 deletions
diff --git a/www/cgic/Makefile b/www/cgic/Makefile index 688a4745e12..79dbc807528 100644 --- a/www/cgic/Makefile +++ b/www/cgic/Makefile @@ -1,9 +1,7 @@ -# $NetBSD: Makefile,v 1.3 2005/04/11 21:47:52 tv Exp $ -# +# $NetBSD: Makefile,v 1.4 2006/01/06 22:46:51 adam Exp $ -DISTNAME= cgic202 -PKGNAME= cgic-2.02 -PKGREVISION= 1 +DISTNAME= cgic205 +PKGNAME= cgic-2.05 CATEGORIES= www MASTER_SITES= http://www.boutell.com/cgic/ diff --git a/www/cgic/distinfo b/www/cgic/distinfo index 4c23b00b44e..275a5a3f367 100644 --- a/www/cgic/distinfo +++ b/www/cgic/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.2 2005/02/24 14:08:29 wiz Exp $ +$NetBSD: distinfo,v 1.3 2006/01/06 22:46:51 adam Exp $ -SHA1 (cgic202.tar.gz) = 8db924f00a7443f8953ea37a084025332e0efbb1 -RMD160 (cgic202.tar.gz) = a0814904733dea2a4acd7208c39542c144161842 -Size (cgic202.tar.gz) = 49531 bytes -SHA1 (patch-aa) = 1799e30492707962a9fdf927697657021e7afdce +SHA1 (cgic205.tar.gz) = 04646274466192570190572f0a70094c67fa2703 +RMD160 (cgic205.tar.gz) = 913d50cb04f70c44119eda3fd3f689572efb65e4 +Size (cgic205.tar.gz) = 50263 bytes +SHA1 (patch-aa) = 4ab91a2b5ff67906ab7f87ffbf0647c3954fb039 SHA1 (patch-ab) = 42e8ee71eeb363e702dfab66344811a8967d382d -SHA1 (patch-ac) = 948ba16e838bb50c60b14e75ccffc942ec01144a +SHA1 (patch-ac) = ee06539e395f5027291253c98ec103808f188a66 SHA1 (patch-ad) = 6ef230a6cc265121dbcbaef392bc1d9c43d167b0 -SHA1 (patch-ae) = 30c7170033e3fce8dea2991456d76cdd26e5cae2 -SHA1 (patch-af) = e143b77cabe7cb8ac44bd74419ed875800dc1d1d +SHA1 (patch-ae) = 0cbf0e7ceaa69adef326672cf4087a266e1c9512 +SHA1 (patch-af) = 04c73e07a32c7df1b659f181528066d93ed684e5 diff --git a/www/cgic/patches/patch-aa b/www/cgic/patches/patch-aa index 12168fe243d..bb9027a850a 100644 --- a/www/cgic/patches/patch-aa +++ b/www/cgic/patches/patch-aa @@ -1,29 +1,26 @@ -$NetBSD: patch-aa,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ +$NetBSD: patch-aa,v 1.2 2006/01/06 22:46:51 adam Exp $ ---- Makefile.orig Sun Jan 12 13:59:43 2003 +--- Makefile.orig 2005-12-16 15:52:31.000000000 +0100 +++ Makefile -@@ -1,27 +1,42 @@ +@@ -1,29 +1,38 @@ -CFLAGS=-g -Wall -+CFLAGS += -g -Wall - CC=gcc - AR=ar +-CC=gcc +-AR=ar +-RANLIB=ranlib -LIBS=-L./ -lcgic -+LIBS = libcgic.la - +- -all: libcgic.a cgictest.cgi capture -+OBJS = cgic.o - +- -install: libcgic.a - cp libcgic.a /usr/local/lib - cp cgic.h /usr/local/include - @echo libcgic.a is in /usr/local/lib. cgic.h is in /usr/local/include. -+all: libcgic.la cgictest capture - +- -libcgic.a: cgic.o cgic.h - rm -f libcgic.a - $(AR) rc libcgic.a cgic.o -+.SUFFIXES: .lo - +- $(RANLIB) libcgic.a +- -#mingw32 and cygwin users: replace .cgi with .exe - -cgictest.cgi: cgictest.o libcgic.a @@ -31,13 +28,21 @@ $NetBSD: patch-aa,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ - -capture: capture.o libcgic.a - gcc capture.o -o capture ${LIBS} +- ++CFLAGS+= -Wall ++LIBS= libcgic.la ++OBJS= cgic.o ++ ++all: libcgic.la cgictest capture ++ ++.SUFFIXES: .lo ++ +.c.lo: + ${LIBTOOL} --mode=compile ${CC} ${CFLAGS} -o $@ -c $< + +libcgic.la: $(OBJS:.o=.lo) + ${LIBTOOL} --mode=link ${CC} -o $@ ${OBJS:.o=.lo} \ -+ -rpath ${PREFIX}/lib \ -+ -version-info 0:0 ++ -rpath ${PREFIX}/lib -version-info 0:0 + +cgictest: cgictest.lo libcgic.la + ${LIBTOOL} --mode=link $(CC) $(CFLAGS) $(LDFLAGS) -o $@ cgictest.lo $(LIBS) @@ -50,15 +55,15 @@ $NetBSD: patch-aa,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ + -mkdir -p ${PREFIX}/share/examples/cgiclib + ${INSTALL} -c -m 444 capture.c ${PREFIX}/share/examples/cgiclib + ${INSTALL} -c -m 444 cgictest.c ${PREFIX}/share/examples/cgiclib -+ ${LIBTOOL} --mode=install ${INSTALL} -c -m 444 libcgic.la ${PREFIX}/lib -+ ${LIBTOOL} --mode=install ${INSTALL} -c -m 755 capture ${PREFIX}/libexec/cgi-bin -+ ${LIBTOOL} --mode=install ${INSTALL} -c -m 755 cgictest ${PREFIX}/libexec/cgi-bin ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_LIB} libcgic.la ${PREFIX}/lib ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} capture ${PREFIX}/libexec/cgi-bin ++ ${LIBTOOL} --mode=install ${BSD_INSTALL_PROGRAM} cgictest ${PREFIX}/libexec/cgi-bin + ${INSTALL} -c -m 444 cgic.h ${PREFIX}/include + -mkdir -p ${PREFIX}/share/doc/html/cgiclib + for i in *.html; do \ + ${INSTALL} -c -m 444 $$i ${PREFIX}/share/doc/html/cgiclib ; \ + done - ++ clean: - rm -f *.o *.a cgictest.cgi capture + rm -f *.o *.la cgictest capture diff --git a/www/cgic/patches/patch-ac b/www/cgic/patches/patch-ac index eb7a2089d20..862a25a3668 100644 --- a/www/cgic/patches/patch-ac +++ b/www/cgic/patches/patch-ac @@ -1,10 +1,10 @@ -$NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ +$NetBSD: patch-ac,v 1.2 2006/01/06 22:46:51 adam Exp $ ---- cgic.c.orig Sun Jan 12 13:59:43 2003 +--- cgic.c.orig 2004-11-15 17:57:59.000000000 +0100 +++ cgic.c -@@ -124,8 +124,9 @@ static int cgiStrBeginsNc(char *s1, char - - static int firstCookie = 1; +@@ -119,8 +119,9 @@ static void cgiFreeResources(); + static int cgiStrEqNc(char *s1, char *s2); + static int cgiStrBeginsNc(char *s1, char *s2); -int main(int argc, char *argv[]) { - int result; @@ -14,7 +14,7 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ char *cgiContentLengthString; char *e; cgiSetupConstants(); -@@ -211,17 +212,6 @@ int main(int argc, char *argv[]) { +@@ -206,17 +207,6 @@ int main(int argc, char *argv[]) { cgiOut = stdout; cgiRestored = 0; @@ -32,25 +32,15 @@ $NetBSD: patch-ac,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ if (cgiStrEqNc(cgiRequestMethod, "post")) { #ifdef CGICDEBUG CGICDEBUGSTART -@@ -290,9 +280,9 @@ int main(int argc, char *argv[]) { +@@ -284,9 +274,8 @@ int main(int argc, char *argv[]) { + #endif /* CGICDEBUG */ } } - firstCookie = 1; - result = cgiMain(); - cgiFreeResources(); - return result; -+ -+ atexit(cgiFreeResources); -+ return(0); ++ atexit(cgiFreeResources); ++ return 0; } static void cgiGetenv(char **s, char *var){ -@@ -1995,7 +1985,7 @@ cgiEnvironmentResultType cgiReadEnvironm - FILE *in; - cgiFormEntry *e = 0, *p; - char *version; -- cgiEnvironmentResultType result; -+ cgiEnvironmentResultType result = cgiEnvironmentSuccess; - /* Free any existing data first */ - cgiFreeResources(); - /* Be sure to open in binary mode */ diff --git a/www/cgic/patches/patch-ae b/www/cgic/patches/patch-ae index d548a8f53aa..003ad48a4b3 100644 --- a/www/cgic/patches/patch-ae +++ b/www/cgic/patches/patch-ae @@ -1,8 +1,8 @@ -$NetBSD: patch-ae,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ +$NetBSD: patch-ae,v 1.2 2006/01/06 22:46:51 adam Exp $ ---- cgic.html.orig Sun Jan 12 13:59:43 2003 +--- cgic.html.orig 2004-11-15 17:59:19.000000000 +0100 +++ cgic.html -@@ -365,6 +365,29 @@ cgic.c to your project?</strong> +@@ -378,6 +378,29 @@ cgic.c to your project?</strong> If none of the above proves effective, please see the section regarding <a href="#support">support</a>. <h3><a name="howto">How to write a cgic application</a></h3> diff --git a/www/cgic/patches/patch-af b/www/cgic/patches/patch-af index 0fc93cd0c7c..d4e7415ebb7 100644 --- a/www/cgic/patches/patch-af +++ b/www/cgic/patches/patch-af @@ -1,8 +1,8 @@ -$NetBSD: patch-af,v 1.1.1.1 2004/07/20 21:44:29 jmmv Exp $ +$NetBSD: patch-af,v 1.2 2006/01/06 22:46:51 adam Exp $ ---- cgictest.c.orig Sun Jan 12 13:59:43 2003 +--- cgictest.c.orig 2004-04-22 22:49:47.000000000 +0200 +++ cgictest.c -@@ -33,7 +33,13 @@ void Cookies(); +@@ -42,7 +42,13 @@ void Cookies(); void LoadEnvironment(); void SaveEnvironment(); |