diff options
author | snj <snj@pkgsrc.org> | 2004-02-25 03:58:42 +0000 |
---|---|---|
committer | snj <snj@pkgsrc.org> | 2004-02-25 03:58:42 +0000 |
commit | 574e3dc72c78a08dd45fdae81bc67d8650aa5d8e (patch) | |
tree | f062aa90023b9bed81869853763f5391fa61a67a /mail/metamail/patches | |
parent | c12ca579132dcf3ada28687b04689bcde468368e (diff) | |
download | pkgsrc-574e3dc72c78a08dd45fdae81bc67d8650aa5d8e.tar.gz |
* Apply security patch from
http://www.securityfocus.com/archive/1/354362/2004-02-15/2004-02-21/2
* Bump PKGREVISION to 2.
* Make patches only modify one file each
* Fix some spelling errors
* Use ${SED} instead of sed, and ${CHMOD} instead of chmod
* Set CFLAGS.SunOS instead of doing the bsd.prefs.mk dance
Diffstat (limited to 'mail/metamail/patches')
-rw-r--r-- | mail/metamail/patches/patch-ac | 21 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ad | 62 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ae | 46 | ||||
-rw-r--r-- | mail/metamail/patches/patch-af | 183 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ag | 195 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ah | 33 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ai | 62 | ||||
-rw-r--r-- | mail/metamail/patches/patch-aj | 52 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ak | 83 | ||||
-rw-r--r-- | mail/metamail/patches/patch-al | 60 | ||||
-rw-r--r-- | mail/metamail/patches/patch-am | 13 | ||||
-rw-r--r-- | mail/metamail/patches/patch-an | 13 | ||||
-rw-r--r-- | mail/metamail/patches/patch-ao | 13 |
13 files changed, 430 insertions, 406 deletions
diff --git a/mail/metamail/patches/patch-ac b/mail/metamail/patches/patch-ac deleted file mode 100644 index 0b0049eb40d..00000000000 --- a/mail/metamail/patches/patch-ac +++ /dev/null @@ -1,21 +0,0 @@ -$NetBSD: patch-ac,v 1.2 1998/08/07 11:09:40 agc Exp $ - -*** bin/sun2mime.ORIG Sat Nov 13 15:53:51 1993 ---- bin/sun2mime Mon Dec 12 10:07:44 1994 -*************** -*** 11,17 **** - fi - TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ - -! /bin/nawk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") - RS=""; FS="\n"; mode="HEADER" } - mode == "HEADER" { ---- 11,17 ---- - fi - TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ - -! /usr/bin/awk ' - BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") - RS=""; FS="\n"; mode="HEADER" } - mode == "HEADER" { diff --git a/mail/metamail/patches/patch-ad b/mail/metamail/patches/patch-ad index 9e122f6f3db..e15473caacf 100644 --- a/mail/metamail/patches/patch-ad +++ b/mail/metamail/patches/patch-ad @@ -1,37 +1,27 @@ -$NetBSD: patch-ad,v 1.3 2003/11/04 19:03:53 dmcmahill Exp $ +$NetBSD: patch-ad,v 1.4 2004/02/25 03:58:42 snj Exp $ -*** fonts/Makefile.orig Mon May 31 22:49:27 1993 ---- fonts/Makefile Thu May 18 21:55:42 1995 -*************** -*** 28,39 **** - -${DIRBUILDER} - - shownonascii: Xshownonascii -! sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii - chmod +x shownonascii - - mailto-hebrew: Xmailto-hebrew -! sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew - chmod +x mailto-hebrew - - clean: - rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir ---- 28,45 ---- - -${DIRBUILDER} - - shownonascii: Xshownonascii -! sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xshownonascii > shownonascii - chmod +x shownonascii - - mailto-hebrew: Xmailto-hebrew -! sed -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xmailto-hebrew > mailto-hebrew - chmod +x mailto-hebrew -+ -+ install: -+ mkdir -p ${PREFIX}/lib/metamail/fonts -+ ${INSTALL} -c heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} \ -+ heb8x13B.${FONTSUFFIX} fonts.alias ${PREFIX}/lib/metamail/fonts -+ mkfontdir ${PREFIX}/lib/metamail/fonts - - clean: - rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir +--- fonts/Makefile.orig 1993-05-31 13:49:27.000000000 -0700 ++++ fonts/Makefile 2004-02-24 19:19:01.000000000 -0800 +@@ -28,12 +28,18 @@ heb8x13B.${FONTSUFFIX}: heb8x13B.bdf + -${DIRBUILDER} + + shownonascii: Xshownonascii +- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii +- chmod +x shownonascii ++ ${SED} -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xshownonascii > shownonascii ++ ${CHMOD} +x shownonascii + + mailto-hebrew: Xmailto-hebrew +- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew +- chmod +x mailto-hebrew ++ ${SED} -e s@/u/nsb/lib/fonts@${PREFIX}/lib/metamail/fonts@ < Xmailto-hebrew > mailto-hebrew ++ ${CHMOD} +x mailto-hebrew ++ ++install: ++ mkdir -p ${PREFIX}/lib/metamail/fonts ++ ${INSTALL} -c heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} \ ++ heb8x13B.${FONTSUFFIX} fonts.alias ${PREFIX}/lib/metamail/fonts ++ mkfontdir ${PREFIX}/lib/metamail/fonts + + clean: + rm -f heb6x13.${FONTSUFFIX} heb8x13.${FONTSUFFIX} heb8x13B.${FONTSUFFIX} shownonascii mailto-hebrew fonts.dir diff --git a/mail/metamail/patches/patch-ae b/mail/metamail/patches/patch-ae index 9805716c462..c8eadd55e84 100644 --- a/mail/metamail/patches/patch-ae +++ b/mail/metamail/patches/patch-ae @@ -1,23 +1,25 @@ -$NetBSD: patch-ae,v 1.2 1998/08/07 11:09:41 agc Exp $ +$NetBSD: patch-ae,v 1.3 2004/02/25 03:58:43 snj Exp $ -*** metamail/splitmail.c.orig Sun Jun 18 13:13:56 1995 ---- metamail/splitmail.c Sun Jun 18 13:14:48 1995 -*************** -*** 41,48 **** - #define VERBOSEDELIVERYCMD VerboseDeliveryCmd - #else - extern char *getenv(); -! #define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" -! #define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" - #endif - - usageexit() { ---- 41,48 ---- - #define VERBOSEDELIVERYCMD VerboseDeliveryCmd - #else - extern char *getenv(); -! #define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" -! #define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi" - #endif - - usageexit() { +--- metamail/splitmail.c.orig 1994-01-31 14:23:14.000000000 -0800 ++++ metamail/splitmail.c 2004-02-24 10:49:02.000000000 -0800 +@@ -41,8 +41,8 @@ extern char *malloc(), *index(), *getmyn + #define VERBOSEDELIVERYCMD VerboseDeliveryCmd + #else + extern char *getenv(); +-#define NORMALDELIVERYCMD "/usr/lib/sendmail -t -oi" +-#define VERBOSEDELIVERYCMD "/usr/lib/sendmail -t -v -oi" ++#define NORMALDELIVERYCMD "/usr/sbin/sendmail -t -oi" ++#define VERBOSEDELIVERYCMD "/usr/sbin/sendmail -t -v -oi" + #endif + + usageexit() { +@@ -361,7 +361,8 @@ char **OrigID; + } + if (!ULstrcmp(s, "subject")) { + *colon = ':'; +- strcpy(SubjectBuf, ++colon); ++ strncpy(SubjectBuf, ++colon, sizeof(SubjectBuf)); ++ SubjectBuf[sizeof(SubjectBuf) - 1] = '\0'; + return(0); + } + if (!ULstrcmp(s, "content-type")) { diff --git a/mail/metamail/patches/patch-af b/mail/metamail/patches/patch-af index e3deae66d00..9d5c60a054d 100644 --- a/mail/metamail/patches/patch-af +++ b/mail/metamail/patches/patch-af @@ -1,131 +1,54 @@ -$NetBSD: patch-af,v 1.2 1998/08/07 11:09:41 agc Exp $ +$NetBSD: patch-af,v 1.3 2004/02/25 03:58:43 snj Exp $ -*** mailto.c.orig Wed Feb 9 23:30:26 1994 ---- metamail/mailto.c Mon Nov 20 01:21:37 1995 -*************** -*** 570,575 **** ---- 570,576 ---- - if (isupper(*sdum)) *sdum = tolower(*sdum); - } - if (strcmp(CharacterSet, "us-ascii") -+ && strcmp(CharacterSet, "koi8-r") - && strncmp(CharacterSet, "iso-8859-", 9)) { - fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet); - exit(-1); -*************** -*** 1130,1135 **** ---- 1131,1137 ---- - if (part->isrich) { - if (strcmp(CharacterSet, "us-ascii") - && (strncmp(CharacterSet, "iso-8859-", 9) -+ && strcmp(CharacterSet, "koi8-r") - || part->encoding_type_needed != ENC_NONE)) { - fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet); - } else { -*************** -*** 1140,1145 **** ---- 1142,1148 ---- - WriteCtypeNicely(fp, part->content_type); - if (strcmp(CharacterSet, "us-ascii") - && (strncmp(CharacterSet, "iso-8859-", 9) -+ && strcmp(CharacterSet, "koi8-r") - || part->encoding_type_needed != ENC_NONE)) { - fprintf(fp, "; charset=\"%s\"\n", CharacterSet); - } else fputs("\n", fp); -*************** -*** 1745,1750 **** ---- 1748,1754 ---- - } - printf("\n\nEnter your choice as a number from 0 to %d: ", i); - fflush(stdout); -+ *LineBuf = '\0'; - fgets(LineBuf, sizeof(LineBuf), stdin); - ans = atoi(LineBuf); - if (ans == 0 || ans == 1) { -*************** -*** 1791,1797 **** - int ct; - printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); - fflush(stdout); -! gets(LineBuf); - if (index(LineBuf, '/')) { - char lc[100], *s, AnsBuf[100]; - strcpy(lc, LineBuf); ---- 1795,1801 ---- - int ct; - printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); - fflush(stdout); -! fgets(LineBuf, sizeof(LineBuf), stdin); - if (index(LineBuf, '/')) { - char lc[100], *s, AnsBuf[100]; - strcpy(lc, LineBuf); -*************** -*** 1809,1815 **** - } - if (mc) break; - printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); -! s = gets(AnsBuf); - while (s && *s && isspace((unsigned char) *s)) ++s; - if (s && (*s == 'y' || *s == 'Y')) break; - continue; ---- 1813,1819 ---- - } - if (mc) break; - printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); -! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - while (s && *s && isspace((unsigned char) *s)) ++s; - if (s && (*s == 'y' || *s == 'Y')) break; - continue; -*** metamail.c.bak Thu Feb 17 04:57:19 1994 ---- metamail/metamail.c Mon Nov 20 01:21:37 1995 -*************** -*** 83,89 **** - #define MAX_FILE_NAME_SIZE 256 - #define WRITE_BINARY "w" - #else /* AMIGA */ -! extern char **environ, *gets(); - #define CATCOMMAND "cat" - #define CATTEMPLATE "cat %s" - #define METAMAIL "metamail" ---- 83,89 ---- - #define MAX_FILE_NAME_SIZE 256 - #define WRITE_BINARY "w" - #else /* AMIGA */ -! extern char **environ; - #define CATCOMMAND "cat" - #define CATTEMPLATE "cat %s" - #define METAMAIL "metamail" -*************** -*** 579,585 **** - int overwriteans = -1; - do { - printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); -! s = gets(AnsBuf); - if (!s) { - overwriteans = 0; - } else { ---- 579,585 ---- - int overwriteans = -1; - do { - printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); -! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - if (!s) { - overwriteans = 0; - } else { -*************** -*** 1823,1829 **** - } else { - printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); - } -! s = gets(AnsBuf); - if (!s) return(0); /* EOF */ - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); ---- 1823,1829 ---- - } else { - printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); - } -! s = fgets(AnsBuf, sizeof(AnsBuf), stdin); - if (!s) return(0); /* EOF */ - while (s && *s && isspace((unsigned char) *s)) ++s; - if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); +--- metamail/mailto.c.orig 1994-02-09 12:30:26.000000000 -0800 ++++ metamail/mailto.c 2004-02-24 10:13:44.000000000 -0800 +@@ -570,6 +570,7 @@ char **argv; + if (isupper(*sdum)) *sdum = tolower(*sdum); + } + if (strcmp(CharacterSet, "us-ascii") ++ && strcmp(CharacterSet, "koi8-r") + && strncmp(CharacterSet, "iso-8859-", 9)) { + fprintf(stderr, "mailto: Unsupported character set: %s\n", CharacterSet); + exit(-1); +@@ -1130,6 +1131,7 @@ struct mailpart *part; + if (part->isrich) { + if (strcmp(CharacterSet, "us-ascii") + && (strncmp(CharacterSet, "iso-8859-", 9) ++ && strcmp(CharacterSet, "koi8-r") + || part->encoding_type_needed != ENC_NONE)) { + fprintf(fp, "Content-type: text/richtext; charset=\"%s\"\n", CharacterSet); + } else { +@@ -1140,6 +1142,7 @@ struct mailpart *part; + WriteCtypeNicely(fp, part->content_type); + if (strcmp(CharacterSet, "us-ascii") + && (strncmp(CharacterSet, "iso-8859-", 9) ++ && strcmp(CharacterSet, "koi8-r") + || part->encoding_type_needed != ENC_NONE)) { + fprintf(fp, "; charset=\"%s\"\n", CharacterSet); + } else fputs("\n", fp); +@@ -1745,6 +1748,7 @@ CreateNewPart() { + } + printf("\n\nEnter your choice as a number from 0 to %d: ", i); + fflush(stdout); ++ *LineBuf = '\0'; + fgets(LineBuf, sizeof(LineBuf), stdin); + ans = atoi(LineBuf); + if (ans == 0 || ans == 1) { +@@ -1791,7 +1795,7 @@ CreateNewPart() { + int ct; + printf("\nEnter the MIME Content-type value for the data from file %s\n (type '?' for a list of locally-valid content-types): ", sdum); + fflush(stdout); +- gets(LineBuf); ++ fgets(LineBuf, sizeof(LineBuf), stdin); + if (index(LineBuf, '/')) { + char lc[100], *s, AnsBuf[100]; + strcpy(lc, LineBuf); +@@ -1809,7 +1813,7 @@ CreateNewPart() { + } + if (mc) break; + printf("The MIME content-type '%s' is not listed in your local mailcap files,\nand may not be a valid MIME type. Do you want to use it anyway [no] ? ", LineBuf); +- s = gets(AnsBuf); ++ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + while (s && *s && isspace((unsigned char) *s)) ++s; + if (s && (*s == 'y' || *s == 'Y')) break; + continue; diff --git a/mail/metamail/patches/patch-ag b/mail/metamail/patches/patch-ag index f8e8c913455..b84492f149b 100644 --- a/mail/metamail/patches/patch-ag +++ b/mail/metamail/patches/patch-ag @@ -1,4 +1,4 @@ -$NetBSD: patch-ag,v 1.2 1998/08/07 11:09:42 agc Exp $ +$NetBSD: patch-ag,v 1.3 2004/02/25 03:58:43 snj Exp $ diff -u -r mm2.7.org/src/bin/showaudio mm2.7/src/bin/showaudio --- bin/showaudio Wed Feb 2 16:21:26 1994 @@ -67,196 +67,3 @@ diff -u -r mm2.7.org/src/bin/showaudio mm2.7/src/bin/showaudio +cp "$1" $fname if ($status == 0) echo Wrote raw audio file: $fname exit 0 - -Only in mm2.7/src/bin: showaudio~ -diff -u -r mm2.7.org/src/bin/showexternal mm2.7/src/bin/showexternal ---- bin/showexternal Tue Feb 8 09:39:05 1994 -+++ bin/showexternal Wed May 21 21:41:39 1997 -@@ -15,9 +15,45 @@ - # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - # - -+# Check argument integrity. Don't trust mail headers -+switch ("$1$2$3$4$5$6$7") -+case "*[\t ]*": -+ echo "Illegal white space in arguments\!" -+ echo "Command was:" -+ echo "'$0' '$1' '$2' '$3' '$4' '$5' '$6' '$7'" -+ exit 2 -+endsw -+ - onintr cleanup -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - if (! $?FTP) then - set FTP=ftp -Only in mm2.7/src/bin: showexternal~ -diff -u -r mm2.7.org/src/bin/showpartial mm2.7/src/bin/showpartial ---- bin/showpartial Wed Feb 2 16:21:29 1994 -+++ bin/showpartial Wed May 21 21:39:49 1997 -@@ -2,8 +2,44 @@ - # (The "-fb" might need to be changed to "-f" on some systems) - # - -+# Check argument integrity. Don't trust mail headers -+switch ("$1$2$3$4") -+case "*[\t ]*": -+ echo "Illegal white space in arguments\!" -+ echo "Command was:" -+ echo "'$0' '$1' '$2' '$3' '$4'" -+ exit 2 -+endsw -+ -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - - set TREEROOT=${METAMAIL_TMPDIR}/m-prts-`whoami` -@@ -11,14 +47,14 @@ - echo "Usage: showpartial file id partnum totalnum" - exit -1 - endif --set file=$1 -+set file="$1" - # This next line is because message-id can contain weird chars --set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` --@ partnum = $3 --if ($#argv == 3 || $4 == "") then -+set id=`echo "$2" | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` -+@ partnum = "$3" -+if ($#argv == 3 || "$4" == "") then - set totalnum=-1 - else -- @ totalnum = $4 -+ @ totalnum = "$4" - endif - - if (! -d $TREEROOT) then -@@ -35,9 +71,9 @@ - exit -1 - endif - endif --cp $file ${TREEROOT}/$id/$partnum -+cp "$file" ${TREEROOT}/$id/$partnum - if ($status) then -- echo cp $file ${TREEROOT}/$id/$partnum failed -+ echo cp "$file" ${TREEROOT}/$id/$partnum failed - exit -1 - endif - if ($totalnum == -1) then -Only in mm2.7/src/bin: showpartial~ -diff -u -r mm2.7.org/src/bin/showpicture mm2.7/src/bin/showpicture ---- bin/showpicture Mon Feb 7 10:59:54 1994 -+++ bin/showpicture Wed May 21 21:34:59 1997 -@@ -15,15 +15,42 @@ - # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. - # - -+# Set a sensible value for the temporary directory, if its not -+# already set. If TMPDIR is set previously, then we will -+# assume it is adequately protected. - if (! $?METAMAIL_TMPDIR) then -- set METAMAIL_TMPDIR=/tmp -+ if ($?TMPDIR) then -+ set METAMAIL_TMPDIR="$TMPDIR" -+ else -+ set METAMAIL_TMPDIR=~/metamail_tmp -+ endif -+endif -+ -+# Set a sensible umask value -+umask 077 -+ -+# Make sure that the temporary directory is available -+if (! -d "$METAMAIL_TMPDIR") then -+ -+ if (! -e "$METAMAIL_TMPDIR") then -+ mkdir "$METAMAIL_TMPDIR" -+ else -+ echo "$METAMAIL_TMPDIR exists, but is not a directory" -+ exit 2 -+ endif -+ -+ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then -+ echo "Error creating $METAMAIL_TMPDIR" -+ exit 2 -+ endif -+ - endif - - if (! $?X_VIEWER) then --set X_VIEWER="xloadimage -view -quiet -geometry +1+1" -+ set X_VIEWER="xloadimage -view -quiet -geometry +1+1" - # set X_VIEWER="xv -geometry +1+1" - endif --if ($1 == "-viewer" && $#argv > 1) then -+if ("$1" == "-viewer" && $#argv > 1) then - set X_VIEWER = "$2" - shift - shift -@@ -57,7 +84,7 @@ - endif - end - endif -- cp $1 $fname -+ cp "$1" $fname - if ($status == 0) echo Wrote file $fname - exit 0 - endif diff --git a/mail/metamail/patches/patch-ah b/mail/metamail/patches/patch-ah index 4dd8126cda7..62e252446a3 100644 --- a/mail/metamail/patches/patch-ah +++ b/mail/metamail/patches/patch-ah @@ -1,7 +1,7 @@ -$NetBSD: patch-ah,v 1.1 2003/09/15 11:26:45 agc Exp $ +$NetBSD: patch-ah,v 1.2 2004/02/25 03:58:43 snj Exp $ ---- man/mailto.1 2003/09/15 11:22:49 1.1 -+++ man/mailto.1 2003/09/15 11:23:02 +--- man/mailto.1.orig 1994-02-09 12:29:12.000000000 -0800 ++++ man/mailto.1 2004-02-24 10:18:53.000000000 -0800 @@ -1,6 +1,6 @@ .TH MAILTO 1 "Release 1" "Bellcore Prototype" .SH NAME @@ -10,3 +10,30 @@ $NetBSD: patch-ah,v 1.1 2003/09/15 11:26:45 agc Exp $ .SH SYNOPSIS .ta 8n \fBmailto\fP [-a] [-c] [-s] [recipient name(s)] +@@ -74,7 +74,7 @@ multimedia mail generator. There are, a + + Basically, mailto can include the following things in mail: + +-1. Simple formatted text, using the MIME type "text/richtext". This allows you to add emphasis to your message using underlining, bold text, italic (diaplsyed as reverse video), centering, and the like. ++1. Simple formatted text, using the MIME type "text/richtext". This allows you to add emphasis to your message using underlining, bold text, italic (displayed as reverse video), centering, and the like. + + 2. Non-text data. Metamail can include pictures, sounds, and other non-textual data in the middle of any mail message. The mailcap configuration mechanism can even make this process reasonably user-friendly, but a knowledgable user can include non-textual data even in the absence of a proper mailcap entry. + +@@ -275,7 +275,7 @@ The mailto program reads both the aliase + + .I + Altered editing behavior: +-The ~e and ~v commands, which are used to edit the message being composed, will behave differently in mailto if the mail includes non-text portions. In such cases, each part will be edited separately, in sequence, which makes it impossble for the user to accidentally mess up the inter-part boundaries. Moreover, if the mailcap entry for a given data type includes an "edit" field, the user will be given the choice of editing with the program named there or editing with his usual (text) editor. In most cases, this will be a choice between using a structured editor or editing the raw data stream. ++The ~e and ~v commands, which are used to edit the message being composed, will behave differently in mailto if the mail includes non-text portions. In such cases, each part will be edited separately, in sequence, which makes it imposisble for the user to accidentally mess up the inter-part boundaries. Moreover, if the mailcap entry for a given data type includes an "edit" field, the user will be given the choice of editing with the program named there or editing with his usual (text) editor. In most cases, this will be a choice between using a structured editor or editing the raw data stream. + + .I + Altered behavior for large messages: +@@ -283,7 +283,7 @@ Mailto delivers your message using the s + + .I + New -r command-line option +-The -r comand-line option is not found in standard Berkeley mail. ++The -r command-line option is not found in standard Berkeley mail. + + .SH SUMMARY OF OPTIONS + -a <charset> -- specifies an alternate character set in use. This had better be the one your terminal is actually using. Currently it must be in the iso-8859 character set family. diff --git a/mail/metamail/patches/patch-ai b/mail/metamail/patches/patch-ai new file mode 100644 index 00000000000..e9e8f14a1db --- /dev/null +++ b/mail/metamail/patches/patch-ai @@ -0,0 +1,62 @@ +$NetBSD: patch-ai,v 1.1 2004/02/25 03:58:43 snj Exp $ + +--- metamail/metamail.c.orig 1994-02-16 17:57:19.000000000 -0800 ++++ metamail/metamail.c 2004-02-24 10:47:27.000000000 -0800 +@@ -83,7 +83,7 @@ extern char *MkRmScript(); + #define MAX_FILE_NAME_SIZE 256 + #define WRITE_BINARY "w" + #else /* AMIGA */ +-extern char **environ, *gets(); ++extern char **environ; + #define CATCOMMAND "cat" + #define CATTEMPLATE "cat %s" + #define METAMAIL "metamail" +@@ -579,7 +579,7 @@ int nestingdepth; + int overwriteans = -1; + do { + printf("File %s exists. Do you want to overwrite it (y/n) ?\n", Fname); +- s = gets(AnsBuf); ++ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + if (!s) { + overwriteans = 0; + } else { +@@ -1202,9 +1202,9 @@ char *SquirrelFile; + fprintf(outfp, "Content-type: %s", ContentType); + for (j=0; j<CParamsUsed; ++j) { + fprintf(outfp, " ; "); +- fprintf(outfp, CParams[j]); ++ fprintf(outfp, "%s", CParams[j]); + fprintf(outfp, " = "); +- fprintf(outfp, CParamValues[j]); ++ fprintf(outfp, "%s", CParamValues[j]); + } + fprintf(outfp, "\n\n"); + TranslateInputToOutput(InputFP, outfp, EncodingCode, ContentType); +@@ -1823,7 +1823,7 @@ char *ctype, *progname, *label; + } else { + printf("This message contains '%s'-format data.\nDo you want to view it using the '%s' command (y/n) [y] ? ", ctype, ShortCommand(progname)); + } +- s = gets(AnsBuf); ++ s = fgets(AnsBuf, sizeof(AnsBuf), stdin); + if (!s) return(0); /* EOF */ + while (s && *s && isspace((unsigned char) *s)) ++s; + if (*s == 'y' || *s == 'Y' || !*s || *s == '\n') return(1); +@@ -2022,7 +2022,8 @@ int ShowLeadingWhitespace; + if (lc2strcmp(charset, PrevCharset)) { + char *s2, *charsetinuse; + +- strcpy(PrevCharset, charset); ++ strncpy(PrevCharset, charset, sizeof(PrevCharset)); ++ PrevCharset[sizeof(PrevCharset) - 1] = '\0'; + for (s2=PrevCharset; *s2; ++s2) { + if (isupper((unsigned char) *s2)) *s2 = tolower((unsigned char) *s2); + } +@@ -2032,7 +2033,7 @@ int ShowLeadingWhitespace; + } + } + if (ecode == ENCODING_NONE) { +- printf(txt+1); ++ printf("%s", txt+1); + } else { + /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ + MkTmpFileName(TmpFile); diff --git a/mail/metamail/patches/patch-aj b/mail/metamail/patches/patch-aj new file mode 100644 index 00000000000..988ac6c9caa --- /dev/null +++ b/mail/metamail/patches/patch-aj @@ -0,0 +1,52 @@ +$NetBSD: patch-aj,v 1.1 2004/02/25 03:58:43 snj Exp $ + +diff -u -r mm2.7.org/src/bin/showexternal mm2.7/src/bin/showexternal +--- bin/showexternal Tue Feb 8 09:39:05 1994 ++++ bin/showexternal Wed May 21 21:41:39 1997 +@@ -15,9 +15,45 @@ + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + ++# Check argument integrity. Don't trust mail headers ++switch ("$1$2$3$4$5$6$7") ++case "*[\t ]*": ++ echo "Illegal white space in arguments\!" ++ echo "Command was:" ++ echo "'$0' '$1' '$2' '$3' '$4' '$5' '$6' '$7'" ++ exit 2 ++endsw ++ + onintr cleanup ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + if (! $?FTP) then + set FTP=ftp diff --git a/mail/metamail/patches/patch-ak b/mail/metamail/patches/patch-ak new file mode 100644 index 00000000000..f198ee73fd5 --- /dev/null +++ b/mail/metamail/patches/patch-ak @@ -0,0 +1,83 @@ +$NetBSD: patch-ak,v 1.1 2004/02/25 03:58:43 snj Exp $ + +diff -u -r mm2.7.org/src/bin/showpartial mm2.7/src/bin/showpartial +--- bin/showpartial Wed Feb 2 16:21:29 1994 ++++ bin/showpartial Wed May 21 21:39:49 1997 +@@ -2,8 +2,44 @@ + # (The "-fb" might need to be changed to "-f" on some systems) + # + ++# Check argument integrity. Don't trust mail headers ++switch ("$1$2$3$4") ++case "*[\t ]*": ++ echo "Illegal white space in arguments\!" ++ echo "Command was:" ++ echo "'$0' '$1' '$2' '$3' '$4'" ++ exit 2 ++endsw ++ ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + + set TREEROOT=${METAMAIL_TMPDIR}/m-prts-`whoami` +@@ -11,14 +47,14 @@ + echo "Usage: showpartial file id partnum totalnum" + exit -1 + endif +-set file=$1 ++set file="$1" + # This next line is because message-id can contain weird chars +-set id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` +-@ partnum = $3 +-if ($#argv == 3 || $4 == "") then ++set id=`echo "$2" | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\` ++@ partnum = "$3" ++if ($#argv == 3 || "$4" == "") then + set totalnum=-1 + else +- @ totalnum = $4 ++ @ totalnum = "$4" + endif + + if (! -d $TREEROOT) then +@@ -35,9 +71,9 @@ + exit -1 + endif + endif +-cp $file ${TREEROOT}/$id/$partnum ++cp "$file" ${TREEROOT}/$id/$partnum + if ($status) then +- echo cp $file ${TREEROOT}/$id/$partnum failed ++ echo cp "$file" ${TREEROOT}/$id/$partnum failed + exit -1 + endif + if ($totalnum == -1) then diff --git a/mail/metamail/patches/patch-al b/mail/metamail/patches/patch-al new file mode 100644 index 00000000000..1233277e3b2 --- /dev/null +++ b/mail/metamail/patches/patch-al @@ -0,0 +1,60 @@ +$NetBSD: patch-al,v 1.1 2004/02/25 03:58:43 snj Exp $ + +diff -u -r mm2.7.org/src/bin/showpicture mm2.7/src/bin/showpicture +--- bin/showpicture Mon Feb 7 10:59:54 1994 ++++ bin/showpicture Wed May 21 21:34:59 1997 +@@ -15,15 +15,42 @@ + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + # + ++# Set a sensible value for the temporary directory, if its not ++# already set. If TMPDIR is set previously, then we will ++# assume it is adequately protected. + if (! $?METAMAIL_TMPDIR) then +- set METAMAIL_TMPDIR=/tmp ++ if ($?TMPDIR) then ++ set METAMAIL_TMPDIR="$TMPDIR" ++ else ++ set METAMAIL_TMPDIR=~/metamail_tmp ++ endif ++endif ++ ++# Set a sensible umask value ++umask 077 ++ ++# Make sure that the temporary directory is available ++if (! -d "$METAMAIL_TMPDIR") then ++ ++ if (! -e "$METAMAIL_TMPDIR") then ++ mkdir "$METAMAIL_TMPDIR" ++ else ++ echo "$METAMAIL_TMPDIR exists, but is not a directory" ++ exit 2 ++ endif ++ ++ if ( $status != 0 || ! -d "$METAMAIL_TMPDIR" ) then ++ echo "Error creating $METAMAIL_TMPDIR" ++ exit 2 ++ endif ++ + endif + + if (! $?X_VIEWER) then +-set X_VIEWER="xloadimage -view -quiet -geometry +1+1" ++ set X_VIEWER="xloadimage -view -quiet -geometry +1+1" + # set X_VIEWER="xv -geometry +1+1" + endif +-if ($1 == "-viewer" && $#argv > 1) then ++if ("$1" == "-viewer" && $#argv > 1) then + set X_VIEWER = "$2" + shift + shift +@@ -57,7 +84,7 @@ + endif + end + endif +- cp $1 $fname ++ cp "$1" $fname + if ($status == 0) echo Wrote file $fname + exit 0 + endif diff --git a/mail/metamail/patches/patch-am b/mail/metamail/patches/patch-am new file mode 100644 index 00000000000..95167ae262c --- /dev/null +++ b/mail/metamail/patches/patch-am @@ -0,0 +1,13 @@ +$NetBSD: patch-am,v 1.1 2004/02/25 03:58:43 snj Exp $ + +--- man/mailcap.4.orig 2004-02-24 10:35:36.000000000 -0800 ++++ man/mailcap.4 2004-02-24 10:36:52.000000000 -0800 +@@ -42,7 +42,7 @@ The "textualnewlines" field can be used + + The "compose" field may be used to specify a program that can be used to compose a new body or body part in the given format. Its intended use is to support mail composing agents that support the composition of multiple types of mail using external composing agents. As with the view-command, the compose command will be executed after replacing certain escape sequences starting with "%". In particular, %s should be replaced by the name of a file to which the composed data is to be written by the specified composing program, thus allowing th3e calling program (e.g. metamail) to tell the called program where to store the composed data. If %s does not appear, then the composed data will be assumed to be written by the composing programs to standard output. The result of the composing program may be data that is NOT yet suitable for mail transport -- that is, a Content-Transfer-Encoding may still need to be applied to the data. + +-The "composetyped" field is similar to the "compose" field, but is to be used when the composing program needs to specify the Content-type header field to be applied to the composed data. The "compose" field is simpler, and is preferred for use with existing (non-mail-oriented) programs for composing data in a given format. The "composetyped" field is necessary when the Content-type information must include auxilliary parameters, and the composition program must then know enough about mail formats to produce output that includes the mail type information, and to apply any necessary Content-Transfer-Encoding. Conceptually, "compose" specifies a program that simply outputs the specified type of data in its raw form, while "composetyped" specifies a program that outputs the data as a MIME object, with all necessary Content-* headers already in place. ++The "composetyped" field is similar to the "compose" field, but is to be used when the composing program needs to specify the Content-type header field to be applied to the composed data. The "compose" field is simpler, and is preferred for use with existing (non-mail-oriented) programs for composing data in a given format. The "composetyped" field is necessary when the Content-type information must include auxiliary parameters, and the composition program must then know enough about mail formats to produce output that includes the mail type information, and to apply any necessary Content-Transfer-Encoding. Conceptually, "compose" specifies a program that simply outputs the specified type of data in its raw form, while "composetyped" specifies a program that outputs the data as a MIME object, with all necessary Content-* headers already in place. + + .TP 8 + .B needsterminal diff --git a/mail/metamail/patches/patch-an b/mail/metamail/patches/patch-an new file mode 100644 index 00000000000..6271abda917 --- /dev/null +++ b/mail/metamail/patches/patch-an @@ -0,0 +1,13 @@ +$NetBSD: patch-an,v 1.1 2004/02/25 03:58:43 snj Exp $ + +--- man/metasend.1.orig 2004-02-24 10:38:49.000000000 -0800 ++++ man/metasend.1 2004-02-24 10:38:56.000000000 -0800 +@@ -12,7 +12,7 @@ program will allow a user to send one or + + With no arguments, the program will ask the user for the To, Subject, and CC fields. It will then ask for the name of a MIME content-type. Next, it will ask the user for the name of an existing file containing that type of data. After this, it will ask what encoding type, if any, should be applied to this data. Finally, it will ask if the user wants to include information from an additional file, in which case the last three questions will be repeated for the next file. + +-Alternately, all of this information can be provided on the comand line, using the following options: ++Alternately, all of this information can be provided on the command line, using the following options: + + -b -- specifies Batch (non-interactive) Mode. Will exit with an error message if all additional needed information is not provided on the command line. + -c cc -- specifies the CC address diff --git a/mail/metamail/patches/patch-ao b/mail/metamail/patches/patch-ao new file mode 100644 index 00000000000..f713ae3fbe5 --- /dev/null +++ b/mail/metamail/patches/patch-ao @@ -0,0 +1,13 @@ +$NetBSD: patch-ao,v 1.1 2004/02/25 03:58:43 snj Exp $ + +--- man/splitmail.1.orig 2004-02-24 10:42:15.000000000 -0800 ++++ man/splitmail.1 2004-02-24 10:42:25.000000000 -0800 +@@ -16,7 +16,7 @@ If the -d option is specified, the mail + + The -i option can be used to make splitmail generate the pieces with similar (but not identical) message-id fields, in a format which allows them to be easily correlated with one another and which end with the suffix provided on the command line after -i. + +-The default chunk size for spliting messages is 250000 at most sites, though this is also a compile-time option. This can be overriden with the -s switch, or with the environment variable SPLITSIZE. ++The default chunk size for spliting messages is 250000 at most sites, though this is also a compile-time option. This can be overridden with the -s switch, or with the environment variable SPLITSIZE. + + Messages smaller than the chunk size will not be turned into partial messages, but will be written to a single file or delivered as a single message. + .SH ENVIRONMENT |