commit d7a1fa4c5b43f92e8838fde0d5b2b151ed7a58dbd1af6fe56917dc2bc7a63650 Author: OBS User unknown Date: Mon Jan 15 23:25:04 2007 +0000 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/metamail?expand=0&rev=1 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/metamail-2.7-19-security.dif b/metamail-2.7-19-security.dif new file mode 100644 index 0000000..86a5f32 --- /dev/null +++ b/metamail-2.7-19-security.dif @@ -0,0 +1,84 @@ +--- metamail/metamail.c ++++ metamail/metamail.c 2006-02-23 18:56:04.000000000 +0100 +@@ -445,7 +445,7 @@ + } + LineBuf = malloc(LINE_BUF_SIZE); + if (!LineBuf) ExitWithError(nomem); +- sprintf(LineBuf, "--%s", boundary); ++ snprintf(LineBuf, LINE_BUF_SIZE, "--%s", boundary); + strcpy(boundary, LineBuf); + boundarylen = strlen(boundary); + if (BoundaryCt >= BoundaryAlloc) { +@@ -1202,9 +1202,9 @@ + fprintf(outfp, "Content-type: %s", ContentType); + for (j=0; j= BoundaryAlloc) { +--- metamail/splitmail.c ++++ metamail/splitmail.c 2006-02-23 18:55:01.000000000 +0100 +@@ -194,7 +194,7 @@ + s = endofheader(from); /* would be index(from, '\n'), + but need to check for continuation lines */ + *s = '\0'; +- if (ShareThisHeader(from, SubjectBuf, &OrigID)) { ++ if (ShareThisHeader(from, SubjectBuf, sizeof(SubjectBuf), &OrigID)) { + strcat(SharedHeaders, from); + strcat(SharedHeaders, "\n"); + } +@@ -339,9 +339,10 @@ + NULL + }; + +-ShareThisHeader(s, SubjectBuf, OrigID) ++ShareThisHeader(s, SubjectBuf, SubjectBufLen, OrigID) + char *s; + char *SubjectBuf; ++size_t SubjectBufLen; + char **OrigID; + { + int i; +@@ -361,7 +362,8 @@ + } + if (!ULstrcmp(s, "subject")) { + *colon = ':'; +- strcpy(SubjectBuf, ++colon); ++ strncpy(SubjectBuf, ++colon, SubjectBufLen); ++ SubjectBuf[SubjectBufLen - 1] = '\0'; + return(0); + } + if (!ULstrcmp(s, "content-type")) { diff --git a/metamail-2.7-19.dif b/metamail-2.7-19.dif new file mode 100644 index 0000000..0a9c7ae --- /dev/null +++ b/metamail-2.7-19.dif @@ -0,0 +1,3748 @@ +--- .pkgextract ++++ .pkgextract 2005-07-01 12:53:06.000000000 +0200 +@@ -0,0 +1 @@ ++patch -p0 -s --suffix=security < ../metamail-2.7-19-security.dif +--- Makefile ++++ Makefile 2005-07-01 12:53:06.000000000 +0200 +@@ -26,7 +26,7 @@ + CP = cp + + # How to compile C programs +-CC = cc ++CC = gcc + + # You may also want to change the CFLAGS variable, which will be passed on + # to all subdirectories. If you do that, the changes will only work right if you +@@ -38,7 +38,7 @@ + + STATICFLAG=FOOBAR${HOST_ARCH} + +-CFLAGS = -g -I. ${$(STATICFLAG)} ++CFLAGS = $(RPM_OPT_FLAGS) -g -pipe -DLINUX -DSTDC_HEADERS -I. ${$(STATICFLAG)} + # The following is better if you want to make sure you run with SYSV defined + # CFLAGS = -g -I. ${$(STATICFLAG)} -DSYSV + # Also, for SGI Irix, compile in K&R mode +@@ -75,15 +75,15 @@ + INSTALL = install -c -s + + # Root of installation tree +-INSTROOT = /usr/local ++INSTROOT = /usr + # + # This is where binaries should be copied + LOCALBINDIR = ${INSTROOT}/bin + + # This is where man pages should be copied, and their extensions +-MAN1DIR = ${INSTROOT}/man/man1 ++MAN1DIR = ${INSTROOT}/share/man/man1 + MAN1EXT = 1 +-MAN4DIR = ${INSTROOT}/man/man4 ++MAN4DIR = ${INSTROOT}/share/man/man4 + MAN4EXT = 4 + + # Sets the font suffix your version of X uses - snf for X11R4, pcf for X11R5 +@@ -91,7 +91,7 @@ + FONTSUFFIX=pcf + + # This is where the mailcap file should be put +-MAILCAPDIR = ${INSTROOT}/etc ++MAILCAPDIR = /etc + + # This helps with the "for" constructs below on some platforms: + SHELL=/bin/sh +@@ -131,20 +131,20 @@ + echo "installing binary $$target"; \ + ${INSTALL} $$file $$target 2>/dev/null; \ + done) +-# @(cd man; \ +-# for file in *.1; \ +-# do \ +-# target=$(MAN1DIR)/`basename $$file .1`.$(MAN1EXT); \ +-# echo "installing man page $$target";\ +-# ${CP} $$file $$target; \ +-# done) +-# @(cd man; \ +-# for file in *.4; \ +-# do \ +-# target=$(MAN4DIR)/`basename $$file .4`.$(MAN4EXT); \ +-# echo "installing man page $$target";\ +-# ${CP} $$file $$target; \ +-# done) ++ @(cd man; \ ++ for file in *.1; \ ++ do \ ++ target=$(MAN1DIR)/`basename $$file .1`.$(MAN1EXT); \ ++ echo "installing man page $$target";\ ++ install -m 644 $$file $$target; \ ++ done) ++ @(cd man; \ ++ for file in *.4; \ ++ do \ ++ target=$(MAN4DIR)/`basename $$file .4`.$(MAN4EXT); \ ++ echo "installing man page $$target";\ ++ install -m 644 $$file $$target; \ ++ done) + # @echo "Renaming old mailcap file to $(MAILCAPDIR)/mailcap.old" + # -mv $(MAILCAPDIR)/mailcap $(MAILCAPDIR)/mailcap.old + # @echo "installing file $(MAILCAPDIR)/mailcap" +--- config.h ++++ config.h 2005-07-01 12:53:06.000000000 +0200 +@@ -38,6 +38,9 @@ + + #ifdef LINUX + #define SYSV /* Linux is SysV */ ++#include ++#include ++#include + #endif + + #ifdef SVR3 +@@ -100,12 +103,14 @@ + #endif + + #ifdef SYSV ++#if 0 + #define killpg(a, b) kill(-(a), (b)) + #define bcopy(a, b, c) memcpy(b, a, c) + #define bzero(a, b) memset(a, 0, b) + #define bcmp memcmp + #define index strchr + #define rindex strrchr ++#endif + #define initstate srand + #define random rand + #define NO_RLIMITS 1 +@@ -173,7 +178,7 @@ + #else + #define PATH_SEPARATOR ':' + #ifndef STDPATH +-#define STDPATH "/.mailcap:/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap:/etc/mail/mailcap:/usr/public/lib/mailcap" ++#define STDPATH "/usr/local/etc/mailcap:/usr/etc/mailcap:/etc/mailcap" + #endif + #endif + #endif +--- bin/audiosend ++++ bin/audiosend 2005-07-01 12:53:06.000000000 +0200 +@@ -43,14 +43,14 @@ + dev=/dev/audio + fi + +-if test -f /usr/lib/sendmail ++if test -x /usr/sbin/sendmail + then +- MAILCOMMAND=/usr/lib/sendmail ++ MAILCOMMAND=/usr/sbin/sendmail + else + MAILCOMMAND=/bin/mail + fi + +-if test ! -z "${1:-}" ++if test ! -z "${1:-}"; then + to=$1 + else + echo -n "To: " +@@ -70,8 +70,14 @@ + echo -n "Press RETURN when you are ready to start recording: " + read foo + +- fname=${METAMAIL_TMPDIR}/audio-out.$$ +- fnameraw=${METAMAIL_TMPDIR}/audio-raw.$$ ++ if [ -n "`type -p mktemp`" ] ; then ++ fname=`mktemp ${METAMAIL_TMPDIR}/audio-out.$$.XXXXXX` || exit 1 ++ fnameraw=`mktemp ${METAMAIL_TMPDIR}/audio-raw.$$.XXXXXX` || exit 1 ++ else ++ fname=${METAMAIL_TMPDIR}/audio-out.$$ ++ fnameraw=${METAMAIL_TMPDIR}/audio-raw.$$ ++ /bin/rm -f $fname $fnameraw ++ fi + + echo "To: $to" > $fname + echo "Subject: $subject" >> $fname +@@ -111,7 +117,7 @@ + read which + case $which in + 1) echo -n "Sending mail, please wait... " +- $MAILCOMMAND $to $cc < $fname ++ $MAILCOMMAND "$to" "$cc" < $fname + + if test $? -eq 0 + then +--- bin/mailserver ++++ bin/mailserver 2005-07-01 12:53:06.000000000 +0200 +@@ -28,20 +28,28 @@ + rehash + set FromName="" + set Subject="" +-set TmpFile=/tmp/ms.$$ ++# Generate temporary file name: ++if ( -x /bin/mktemp || -x /usr/bin/mktemp ) then ++ set TmpFile="`mktemp /tmp/ms.$$.XXXXXXX`" || exit 1 ++else ++ set TmpFile=/tmp/ms.$$ ++ rm -rf $TmpFile ++endif ++onintr - end ++# + set FOORAW=$< + while ("$FOORAW" != "") +-set FOO=(` echo "$FOORAW" | tr "[" "x"`) ++set FOO=(`echo "$FOORAW" | tr "[" "x"`) + set BAR=($FOO) +-set BARLC=(`echo $FOO | tr A-Z a-z`) +-if ($BARLC[1] == "from:") then ++set BARLC=(`echo "$FOO" | tr A-Z a-z`) ++if ("$BARLC[1]" == "from:") then + if ("$FromName" == "") then +- set FromName = ($BAR[2-]) ++ set FromName = ("$BAR[2-]") + endif +-else if ($BARLC[1] == "reply-to:") then +- set FromName = ($BAR[2-]) +-else if ($BARLC[1] == "subject:") then +- set Subject = ($BAR[2-]) ++else if ("$BARLC[1]" == "reply-to:") then ++ set FromName = ("$BAR[2-]") ++else if ("$BARLC[1]" == "subject:") then ++ set Subject = ("$BAR[2-]") + endif + set FOORAW=$< + end +@@ -52,12 +60,14 @@ + endif + + if ("$FromName" == "") then ++ set noglob + cat > $TmpFile < $TmpFile < $TmpFile <> $TmpFile +- /usr/lib/sendmail -t < $TmpFile ++ /usr/sbin/sendmail -t < $TmpFile + rm $TmpFile + exit 0 + endif + +-if (-e ${Subject}.ct) then +- set ct=`cat ${Subject}.ct` ++if (-e "${Subject}.ct" ) then ++ set ct=`cat "${Subject}.ct"` + else + set ct="application/octet-stream" + endif + + metasend -b -t "$FromName" -f "$Subject" -m "$ct" -s "Re: $Subject" + if ($status != 0) then ++ set noglob + cat > $TmpFile < /dev/null 2>&1 ++then ++ d="--rfc-822" ++else ++ LC_TIME=POSIX ++ export LC_TIME ++ d="+%a, %e %b %Y %T %z" ++fi ++ + ouputfile="" + multipartsubtype="mixed" + cdescrip="An object packed by metasend" + isentity=0 +-newid=`date | tr " :" "__"` ++newid=`date ${d+"$d"}| tr " :" "__"` + cid="<${newid}_$idctr@${hname}>" + idctr=`expr $idctr + 1` + +@@ -252,7 +261,7 @@ + datafile="" + encode="" + encodingprog="" +- newid=`date | tr " :" "__"` ++ newid=`date ${d+"$d"}| tr " :" "__"` + cid="<${newid}_$idctr@${hname}>" + idctr=`expr $idctr + 1` + cdescrip="An object packed by metasend" +@@ -362,7 +371,7 @@ + datafile="" + encode="" + encodingprog="" +- newid=`date | tr " :" "__"` ++ newid=`date ${d+"$d"}| tr " :" "__"` + cid="<${newid}_$idctr@${hname}>" + idctr=`expr $idctr + 1` + multipart=`expr $multipart + 1` +@@ -453,8 +462,17 @@ + eval isentity${multipart}=$isentity + eval encodingprog${multipart}=\"\$encodingprog\" + +-fname=$METAMAIL_TMPDIR/metasend.$$ +-echo "MIME-Version: 1.0" > $fname ++if [ -n "`type -p mktemp`" ] ; then ++ fname=`mktemp $METAMAIL_TMPDIR/metasend.XXXXXX` || exit 1 ++ echo "MIME-Version: 1.0" > $fname ++else ++ fname=$METAMAIL_TMPDIR/metasend.$$ ++ rm -f $fname ++ set -Ce ++ echo "MIME-Version: 1.0" > $fname ++ set +Ce ++fi ++trap "rm -f $fname" 0 1 2 3 7 13 15 + + if test ! -z "${to:-}" + then echo "To: $to" >> $fname +@@ -471,8 +489,8 @@ + + if test $multipart -gt 1 + then +- boundary=${hname}.$$.`date | tr " " .` +- newid=`date | tr " :" "__"` ++ boundary=${hname}.$$.`date ${d+"$d"}| tr " " .` ++ newid=`date ${d+"$d"}| tr " :" "__"` + if test ! -z "${multicid:-}" + then + echo "Content-ID: $multicid" >> $fname +@@ -518,7 +536,7 @@ + then + echo "Content-ID: $cid" >> $fname + echo "Content-type: $ctype" >> $fname +- echo "Content-Description: $cdesrip" >> $fname ++ echo "Content-Description: $cdescrip" >> $fname + echo "Content-Transfer-Encoding: $encode" >> $fname + fi + echo "" >> $fname +--- bin/mgrep ++++ bin/mgrep 2005-07-01 12:53:06.000000000 +0200 +@@ -0,0 +1,80 @@ ++#!/bin/sh ++ ++# mgrep -- a wrapper around a grep program that decode MIMEd data ++# as needed (some code taken from zgrep of gzip) ++ ++PATH="/usr/bin:$PATH"; export PATH ++ ++prog=${0##*/} ++case "$prog" in ++ *egrep) grep=${EGREP-egrep -a} ;; ++ *fgrep) grep=${FGREP-egrep -a} ;; ++ *) grep=${GREP-grep -a} ;; ++esac ++ ++pat="" ++while test $# -ne 0; do ++ case "$1" in ++ -e|-f) ++ opt="$opt $1" ++ shift ++ pat="$1" ++ if test "$grep" = grep; then ++ grep=egrep ++ fi ++ ;; ++ -*) ++ opt="$opt $1" ++ ;; ++ *) ++ if test -z "$pat"; then ++ pat="$1" ++ else ++ break; ++ fi ++ ;; ++ esac ++ shift ++done ++ ++if test -z "$pat"; then ++ echo "$prog: grep through mimencoded files" 1>&2 ++ echo "usage: $prog [grep_options] pattern [files]" 1>&2 ++ exit 1 ++fi ++ ++ list=0 ++silent=0 ++case "${opt//[ -]/}" in ++ *l*) list=1 ++esac ++case "${opt//[ -]/}" in ++ *h*) silent=1 ++esac ++ ++mimedecode () ++{ ++ mimencode -u -b $1 2> /dev/null ++ echo ++} ++ ++if test $# -eq 0; then ++ mimedecode | $grep $opt "$pat" ++ exit $? ++fi ++ ++res=0 ++for i do ++ if test $list -eq 1; then ++ mimedecode $i | $grep $opt "$pat" > /dev/null && echo $i ++ r=$? ++ elif test $# -eq 1 -o $silent -eq 1; then ++ mimedecode $i | $grep $opt "$pat" ++ r=$? ++ else ++ mimedecode $i | $grep $opt "$pat" | sed "s|^|${i}:|" ++ r=$? ++ fi ++ test "$r" -ne 0 && res="$r" ++done ++exit $res +--- bin/mimeit ++++ bin/mimeit 2005-07-01 12:53:06.000000000 +0200 +@@ -19,4 +19,4 @@ + echo Subject: "$sub" ; \ + echo Content-Transfer-Encoding: base64 ; + echo "" ; \ +- mimencode -b ) | splitmail -d $* ++ mimencode -b ) | splitmail -d "$@" +--- bin/patch-metamail ++++ bin/patch-metamail 2005-07-01 12:53:06.000000000 +0200 +@@ -67,9 +67,15 @@ + + case "$ans" in + [Yy]*) cd $TREEROOT +- ident=`whoami`@`hostname` ++ ident=`whoami`@`hostname -f` + echo Using anonymous ftp with password $ident +- ftp -n < $TmpFtp < ${METAMAIL}/audio.$$ +- /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end ${METAMAIL}/audio.$$ +- rm ${METAMAIL}/audio.$$ ++ cat > $TmpAudio ++ /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end $TmpAudio ++ rm $TmpAudio + exit 0 + fi + elif test -f /usr/bin/audioplay + then + # Solaris 2.0 +- /usr/bin/audioconvert -i raw,voice -f sun $* | /usr/bin/audioplay ++ /usr/bin/audioconvert -i raw,voice -f sun "$@" | /usr/bin/audioplay + exit $? + elif test -f /bin/audioplay + then + # Solaris 2.0 +- /bin/audioconvert -i raw,voice -f sun $* | /bin/audioplay ++ /bin/audioconvert -i raw,voice -f sun "$@" | /bin/audioplay + exit $? + elif test -d /usr/sony + then +@@ -212,7 +218,7 @@ + then + if test ! -z "${SOX:-}" + then +- for ii in $* ++ for ii in "$@" + do + # + # The "approved magic" to translate arbitary sounds +@@ -225,16 +231,16 @@ + $SOX -t auto $ii -c 1 -t au -c 1 -r 8000 $dev + done + else +- cat $* > $dev ++ cat "$@" > $dev + fi + else + if test ! -z "${SOX:-}" + then +- cat > ${METAMAIL}/audio.$$ ++ cat > $TmpAudio + # + # See also above + # +- $SOX -t auto ${METAMAIL}/audio.$$ -c 1 -t au -c 1 -r 8000 $dev ++ $SOX -t auto $TmpAudio -c 1 -t au -c 1 -r 8000 $dev + else + cat > $dev + fi +@@ -253,7 +259,7 @@ + if test $MM_NOTTTY -eq 1 + then + MM_NOTTTY=0; export MM_NOTTTY +- xterm -e $thisprog $* ++ xterm -e $thisprog "$@" + exit 0 + fi + fi +@@ -271,9 +277,9 @@ + mail -s "showaudio: `whoami` called $AUDIOPHONE" $AUDIOLOGMAIL < /dev/null + if test $STDINPUT -eq 1 + then +- cat $AUDIOBINDIR/../GREET.au $* - | $AUDIOBINDIR/play -\# $AUDIOPHONE - ++ cat $AUDIOBINDIR/../GREET.au "$@" - | $AUDIOBINDIR/play -\# $AUDIOPHONE - + else +- cat $AUDIOBINDIR/../GREET.au $* | $AUDIOBINDIR/play -\# $AUDIOPHONE - ++ cat $AUDIOBINDIR/../GREET.au "$@" | $AUDIOBINDIR/play -\# $AUDIOPHONE - + fi + echo All done + exit 0 +@@ -281,9 +287,9 @@ + echo Trying to rsh to $AUDIOPHONEHOST to send audio via telephone + if test $STDINPUT -eq 1 + then +- cat $* - | $RSH $AUDIOPHONEHOST $thisprog -p $AUDIOPHONE - ++ cat "$@" - | $RSH $AUDIOPHONEHOST $thisprog -p $AUDIOPHONE - + else +- cat $* | $RSH $AUDIOPHONEHOST $thisprog -p $AUDIOPHONE - ++ cat "$@" | $RSH $AUDIOPHONEHOST $thisprog -p $AUDIOPHONE - + fi + exit 0 + fi +@@ -302,7 +308,12 @@ + fi + if test $MM_NOTTY -eq 1 + then +- fname=/tmp/mm.aud.$$ ++ if [ -n "`type -p mktemp`" ] ; then ++ fname=`mktemp ${METAMAIL_TMPDIR}/mm.aud.XXXXXX` || exit 1 ++ else ++ fname=${METAMAIL_TMPDIR}/mm.aud.$$ ++ rm -f $fname ++ fi + else + echo -n "Do you want to write the audio out to a file [y] ? " + read ANS +--- bin/showexternal ++++ bin/showexternal 2005-07-01 12:53:06.000000000 +0200 +@@ -28,9 +28,9 @@ + # Brought into line with metamail 2.7 beta release Csh version + # Dave Shield February 1994 + +-if test -f /usr/lib/sendmail ++if test -f /usr/sbin/sendmail + then +- MAILCOMMAND=/usr/lib/sendmail ++ MAILCOMMAND=/usr/sbin/sendmail + else + MAILCOMMAND=/bin/mail + fi +@@ -46,22 +46,35 @@ + METAMAIL_TMPDIR=/tmp + fi + +-bodyfile=$1 ++if [ -n "$METAMAIL_PAGER" ] ++then ++ PAGER="$METAMAIL_PAGER" ++fi ++ ++# Check argument integrity. Don't trust mail headers ++case "$1$2$3$4$5$6$7" in ++ *[\ \ ]*) ++ echo "Illegal white space in arguments -- possibly a mail bomb?\!" ++ echo "Command was:" ++ echo \'$0\' \'$1\' \'$2\' \'$3\' \'$4\' \'$5\' \'$6\' \'$7\' ++ exit 2 ++esac ++bodyfile="$1" + atype=`echo $2 | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` +-name=$3 ++name="$3" + +-site=$4 ++site="$4" + +-dir=$5 ++dir="$5" + +-mode=$6 ++mode="$6" + +-server=$7 ++server="$7" + + if test -z "$server" -a $atype = "mail-server" + then + server=${name}@${site} +- echo WARNING -- old style mailserver syntax, using server $server ++ echo "WARNING -- old style mailserver syntax, using server $server" + fi + + ctype=`grep -i content-type: $bodyfile | sed -e 's/............: //'` +@@ -72,8 +85,8 @@ + username="" + pass="" + TMPDIR=$METAMAIL_TMPDIR/XXXternal.$$ +-trap 'cd $METAMAIL_TMPDIR ; rmdir "$TMPDIR" >/dev/null 2>&1' 1 2 3 15 +-mkdir $TMPDIR ++trap "cd $METAMAIL_TMPDIR/ ; rm -rf $TMPDIR" 1 2 3 7 13 15 ++mkdir $TMPDIR || exit 1 + PUSHED_DIR=`pwd` + cd $TMPDIR + NEWNAME="mm.ext.$$" +@@ -91,7 +104,14 @@ + echo automatically using the FTP protocol to a site on the network. ;; + + mail-server) +- cat > $METAMAIL_TMPDIR/ext.junk.$$ < $TmpExtJunk <> $METAMAIL_TMPDIR/ext.junk.$$ +- more $METAMAIL_TMPDIR/ext.junk.$$ +- rm $METAMAIL_TMPDIR/ext.junk.$$ ;; ++ set +f ++ sed -e 1,/^\$/d < $bodyfile >> $TmpExtJunk ++ if [ -n "$PAGER" ] ; then ++ $PAGER $TmpExtJunk ++ else ++ more $TmpExtJunk ++ fi ++ rm $TmpExtJunk ;; + + *) + NEEDSCONFIRMATION=0 ;; +@@ -132,7 +157,7 @@ + case "$atype" in + anon-ftp ) + username=anonymous +- pass=`whoami`@`hostname` ++ pass=`whoami`@`hostname -f` + ;; + esac + +@@ -168,7 +193,14 @@ + fi + echo OBTAINING MESSAGE BODY USING FTP + echo SITE: $site USER: $username +- ${FTP:-ftp} -n < $TmpFtp < $NEWNAME +- echo To: $server >> $NEWNAME ++ echo To: "$server" >> $NEWNAME + echo "" >> $NEWNAME + sed -e 1,/^\$/d < $bodyfile >> $NEWNAME + $MAILCOMMAND -t < $NEWNAME +--- bin/shownonascii ++++ bin/shownonascii 2005-07-01 12:53:06.000000000 +0200 +@@ -28,7 +28,12 @@ + # Brought into line with metamail 2.7 beta release Csh version + # Dave Shield February 1994 + +-MYFONTDIR=/usr/lib/X11/fonts/misc ++MYFONTDIR=/usr/X11R6/lib/X11/fonts/misc ++ ++if [ -n "$METAMAIL_PAGER" ] ++then ++ PAGER="$METAMAIL_PAGER" ++fi + + CHARSET=$1 + shift +@@ -36,18 +41,23 @@ + if test "$1" = "-e" + then + shift +- CMD="$*" +- RIGHTTERMCMD="$*" ++ CMD='"$@"' ++ RIGHTTERMCMD='"$@"' + else +- CMD="more $* /dev/null" +- RIGHTTERMCMD="more $*" ++ if [ -n "$PAGER" ] ; then ++ more="$PAGER" ++ else ++ more=more ++ fi ++ CMD='$more "$@" /dev/null' ++ RIGHTTERMCMD='$more "$@"' + fi + + if test ! -z "${MM_CHARSET:-}" + then + if test "$MM_CHARSET" = "$CHARSET" + then +- $RIGHTTERMCMD ++ eval $RIGHTTERMCMD + exit 0 + fi + fi +@@ -55,7 +65,7 @@ + do + if test "$f" = "$CHARSET" + then +- $RIGHTTERMCMD ++ eval $RIGHTTERMCMD + exit 0 + fi + done +@@ -66,7 +76,7 @@ + echo has not yet been installed on this machine. What follows + echo "may be partially unreadable, but the English (ASCII) parts" + echo "should still be readable." +- cat $* ++ cat "$@" + exit 0 + fi + +@@ -76,7 +86,7 @@ + echo properly if you are running X11. What follows + echo "may be partially unreadable, but the English (ASCII) parts" + echo "should still be readable." +- cat $* ++ cat "$@" + exit 0 + fi + +@@ -103,4 +113,4 @@ + # Bogus -- need to unsetenv MM_NOTTTY, but can't in Bourne shell. --bobg. + MM_NOTTTY='' + XCHARSET=\*`echo $CHARSET | sed -e s/iso-/iso/` +-xterm -fn $XCHARSET -e $CMD ++eval xterm -fn \$XCHARSET -e $CMD +--- bin/showpartial ++++ bin/showpartial 2005-07-01 12:53:06.000000000 +0200 +@@ -38,18 +38,18 @@ + exit 1 + fi + +-file=$1 ++file="$1" + + # This next line is because message-id can contain weird chars +-id=`echo $2 | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\ ` ++id=`echo "$2" | tr -d \!\$\&\*\(\)\|\'\"\;\/\<\>\\ ` + +-partnum=$3 ++partnum="$3" + + if test -z "$4" + then + totalnum=-1 + else +- totalnum=$4 ++ totalnum="$4" + fi + + if test ! -d $TREEROOT +--- bin/showpicture ++++ bin/showpicture 2005-07-01 12:53:06.000000000 +0200 +@@ -58,7 +58,12 @@ + echo X11, you will be able to see the picture properly. + if test $MM_NOTTY -eq 1 + then +- fname=$METAMAIL_TMPDIR/sp.$$ ++ if [ -n "`type -p mktemp`" ] ; then ++ fname=`mktemp $METAMAIL_TMPDIR/sp.$$.XXXXXX` || exit 1 ++ else ++ fname=$METAMAIL_TMPDIR/sp.$$ ++ rm -f $fname ++ fi + echo "The picture is being automatically stored in the file $fname" + echo "If you do not want this file, please delete it." + else +@@ -90,7 +95,12 @@ + + if test -z "$1" + then +- SQUIRREL=${METAMAIL_TMPDIR}/sp.$$ ++ if [ -n "`type -p mktemp`" ] ; then ++ SQUIRREL=`mktemp ${METAMAIL_TMPDIR}/sp.$$.XXXXXX` || exit 1 ++ else ++ SQUIRREL=${METAMAIL_TMPDIR}/sp.$$ ++ rm -f $SQUIRREL ++ fi + cat > $SQUIRREL + else + SQUIRREL="$*" +--- bin/sun-audio-file ++++ bin/sun-audio-file 2005-07-01 12:53:06.000000000 +0200 +@@ -18,7 +18,13 @@ + then METAMAIL_TMPDIR=/tmp + fi + ++if [ -n "`type -p mktemp`" ] ; then ++ fn=`mktemp ${METAMAIL_TMPDIR}/audio-file.$$.XXXXXX` || exit 1 ++else ++ fn=${METAMAIL_TMPDIR}/audio-file.$$ ++ rm -f $fn ++fi + cd $METAMAIL_TMPDIR +-uudecode < $1 +-audiotool audio-file +-rm -f audio-file $1 ++uudecode -o $fn < "$1" ++audiotool $fn ++rm -f $fn $1 +--- bin/sun-message ++++ bin/sun-message 2005-07-01 12:53:06.000000000 +0200 +@@ -5,12 +5,24 @@ + # then gives the user a short menu of choices: + # display, save or quit. + +-mkdir /tmp/decode.$$ ++mkdir /tmp/decode.$$ || exit 1 + cd /tmp/decode.$$ + +-if test $2 = "uuencode" ++if [ -n "`type -p mktemp`" ] ; then ++ fn=`mktemp uu.XXXXXX` || exit 1 ++else ++ fn=uu.$$ ++ rm -f $fn ++fi ++ ++if [ -n "$METAMAIL_PAGER" ] ++then ++ PAGER="$METAMAIL_PAGER" ++fi ++ ++if test "$2" = "uuencode" + then +- uudecode $1 ++ uudecode -o $fn < "$1" + + echo "The following file was uudecoded:" + echo +@@ -37,7 +49,12 @@ + fi + + case $ans in +- 1) more $fn ;; ++ 1) if [ -n "$PAGER" ] ; then ++ $PAGER $fn ++ else ++ more $fn ++ fi ++ ;; + 2) echo -n "Save as: $HOME/" + read nfn + if test ! -z "${nfn:-}" +@@ -57,5 +74,9 @@ + defans=3 + done + else +- more $1 ++ if [ -n "$PAGER" ] ; then ++ $PAGER "$1" ++ else ++ more "$1" ++ fi + fi +--- bin/sun-message.csh ++++ bin/sun-message.csh 2005-07-01 12:53:06.000000000 +0200 +@@ -5,11 +5,22 @@ + # This is sun-message. It looks at $2 to figure out how to decode $1, then gives the + # user a short menu of choices, display, save, or quit. + # +-mkdir /tmp/decode.$$ ++mkdir /tmp/decode.$$ || exit 1 + cd /tmp/decode.$$ + +-if ($2 == "uuencode") then +- uudecode $1 ++if ( -x /bin/mktemp || -x /usr/bin/mktemp ) then ++ set fn="`mktemp uu.XXXXXX`" || exit 1 ++else ++ set fn="uu.$$" ++ rm -f $fn ++endif ++ ++if ( ${?METAMAIL_PAGER} ) then ++ set PAGER=$METAMAIL_PAGER ++endif ++ ++if ("$2" == "uuencode") then ++ uudecode -o $fn < "$1" + + echo "The following file was uudecoded:" + echo "" +@@ -17,7 +28,6 @@ + set defans = "1" + while (1) + ls -l +- set fn = * + + echo "" + echo "Please choose one:" +@@ -29,20 +39,24 @@ + echo -n "Which do you prefer (1 - 3)? [$defans] " + + set ans = $< +- if (x$ans == x) then ++ if ("x$ans" == "x") then + set ans = $defans + endif +- if ($ans == 3) then ++ if ("$ans" == "3") then + rm $1 + cd /tmp; /bin/rm -rf /tmp/decode.$$ + exit 0 +- else if ($ans == 1) then +- more $fn +- else if ($ans == 2) then ++ else if ("$ans" == "1") then ++ if ( ${?PAGER} ) then ++ ${PAGER} $fn ++ else ++ more $fn ++ endif ++ else if ("$ans" == "2") then + set nfn = "" + echo -n "Save as: $HOME/" + set nfn = $< +- if (x$nfn != x) then ++ if ("x$nfn" != "x") then + /bin/cp $fn ${HOME}/$nfn + else + echo "Not Saved." +@@ -53,7 +67,11 @@ + set defans = "3" + end + else +- more $1 ++ if ( ${?PAGER} ) then ++ ${PAGER} $fn ++ else ++ more $1 ++ endif + endif + + +--- bin/sun-to-mime ++++ bin/sun-to-mime 2005-07-01 12:53:06.000000000 +0200 +@@ -18,10 +18,15 @@ + then METAMAIL_TMPDIR=/tmp + fi + +-TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ ++if [ -n "`type -p mktemp`" ] ; then ++ TMPFILE=`mktemp ${METAMAIL_TMPDIR}/suntomime.$$.XXXXXX` || exit 1 ++else ++ TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ ++ rm -f $TMPFILE ++fi + echo "Content-type: multipart/mixed; boundary=--------" > $TMPFILE + echo "" >> $TMPFILE +-sed -e 's/X-Sun-Data-Type:/Content-type:/' >> $TMPFILE < $1 ++sed -e 's/X-Sun-Data-Type:/Content-type:/' >> $TMPFILE < "$1" + echo "------------" >> $TMPFILE + #metamail -d -z $TMPFILE + metamail -z $TMPFILE +--- bin/sun2mime ++++ bin/sun2mime 2005-07-01 12:53:06.000000000 +0200 +@@ -6,12 +6,19 @@ + # This program is for use with sun-message which takes an arg to figure out how + # (or if) the message is encoded. + # +-if [ x$METAMAIL_TMPDIR = x ]; then ++if [ "x$METAMAIL_TMPDIR" = "x" ]; then + METAMAIL_TMPDIR=/tmp + fi +-TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ + +-/usr/bin/nawk ' ++if [ -n "`type -p mktemp`" ] ; then ++ TMPFILE=`mktemp ${METAMAIL_TMPDIR}/suntomime.$$.XXXXXX` || exit 1 ++else ++ TMPFILE=${METAMAIL_TMPDIR}/suntomime.$$ ++ rm -f $TMPFILE ++fi ++ ++ ++/usr/bin/gawk ' + BEGIN { printf("Content-type: multipart/mixed; boundary=--------\n\n") + RS=""; FS="\n"; mode="HEADER" } + mode == "HEADER" { +@@ -36,7 +43,7 @@ + print + } + END { printf("----------\n") } +-' $1 > $TMPFILE ++' "$1" > $TMPFILE + + metamail -z $TMPFILE + rm -f $TMPFILE +--- bin/uudepipe ++++ bin/uudepipe 2005-07-01 12:53:06.000000000 +0200 +@@ -10,6 +10,11 @@ + # MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY + # OF THIS MATERIAL FOR ANY PURPOSE. IT IS PROVIDED "AS IS", + # WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. +-file=${TMPDIR=/tmp}/UUP$$ ++if [ -n "`type -p mktemp`" ] ; then ++ file=`mktemp ${TMPDIR=/tmp}/UUP$$.XXXXXX` || exit 1 ++else ++ file=${TMPDIR=/tmp}/UUP$$ ++ rm -f $file ++fi + cat ${1-"-"} | sed "s:begin [0-9][0-9]* .*:begin 600 $file:" | uudecode + cat $file && rm -f $file +--- fonts/Makefile ++++ fonts/Makefile 2005-07-01 12:53:06.000000000 +0200 +@@ -30,11 +30,11 @@ + -${DIRBUILDER} + + shownonascii: Xshownonascii +- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xshownonascii > shownonascii ++ sed -e s@/u/nsb/lib/fonts@/usr/X11R6/lib/X11/fonts/mis@ < Xshownonascii > shownonascii + chmod +x shownonascii + + mailto-hebrew: Xmailto-hebrew +- sed -e s@/u/nsb/lib/fonts@`pwd`@ < Xmailto-hebrew > mailto-hebrew ++ sed -e s@/u/nsb/lib/fonts@/usr/X11R6/lib/X11/fonts/mis@ < Xmailto-hebrew > mailto-hebrew + chmod +x mailto-hebrew + + clean: +--- fonts/Xmailto-hebrew ++++ fonts/Xmailto-hebrew 2005-07-01 12:53:06.000000000 +0200 +@@ -1,7 +1,7 @@ + #!/bin/csh -fb + # (The "-fb" might need to be changed to "-f" on some systems) + # +-set MYFONTDIR=/usr/lib/X11/fonts/misc ++set MYFONTDIR=/usr/X11R6/lib/X11/fonts/misc + + if ($?MM_CHARSET) then + if ($MM_CHARSET == iso-8859-8) then +--- fonts/Xshownonascii ++++ fonts/Xshownonascii 2005-07-01 12:53:06.000000000 +0200 +@@ -1,7 +1,11 @@ + #!/bin/csh -fb + # (The "-fb" might need to be changed to "-f" on some systems) + # +-set MYFONTDIR=/usr/lib/X11/fonts/misc ++set MYFONTDIR=/usr/X11R6/lib/X11/fonts/misc ++ ++if ( ${?METAMAIL_PAGER} ) then ++ set PAGER=$METAMAIL_PAGER ++endif + + set CHARSET="$1" + shift +@@ -10,8 +14,13 @@ + set CMD="$*" + set RIGHTTERMCMD="$*" + else +- set CMD="more $* /dev/null" +- set RIGHTTERMCMD="more $*" ++ if ( ${?PAGER} ) then ++ set more="${PAGER}" ++ else ++ set more="more" ++ endif ++ set CMD="$more $* /dev/null" ++ set RIGHTTERMCMD="$more $*" + endif + if ($?MM_CHARSET) then + if ($MM_CHARSET == "$CHARSET") then +@@ -58,7 +67,5 @@ + # think it smart inhibit 8 bit chars in xterms. + # xterm -fn $CHARSET -tm litout -e $CMD + set XCHARSET=\*`echo $CHARSET | sed -e s/iso-/iso/` +-xterm -fn "$XCHARSET" -e $CMD +- +- ++exec xterm -fn "$XCHARSET" -e $CMD + +--- man/mailto.1 ++++ man/mailto.1 2005-07-01 12:53:06.000000000 +0200 +@@ -230,7 +230,7 @@ + dot -- controls whether or not a period alone on a line + should be interpreted as terminating your mail + ignore -- controls whether or not interrupts are ignored +- verbose -- controls the verbosity of output from /usr/lib/sendmail ++ verbose -- controls the verbosity of output from /usr/sbin/sendmail + quiet -- controls the verbosity of output from the mailto program. + keepblind -- controls whether or not a 'blind' copy of the mail is kept. + commasonly -- controls whether or not a space character +--- man/mgrep.1 ++++ man/mgrep.1 2005-07-01 12:53:06.000000000 +0200 +@@ -0,0 +1,41 @@ ++.TH MGREP 1 ++.SH NAME ++mgrep \- search mimencoded files for a regular expression ++.SH SYNOPSIS ++.B mgrep ++[ grep_options ] ++.BI [\ -e\ ] " pattern" ++.IR filename ".\|.\|." ++.SH DESCRIPTION ++.IR Mgrep ++is used to invoke the ++.I grep ++on mimencoded files. All options specified are passed directly to ++.I grep. ++If no file is specified, then the standard input is mimdecoded ++and fed to grep. ++Otherwise the given files are mimdecoded and fed to ++.I grep. ++.PP ++If ++.I mgrep ++is invoked as ++.I megrep ++or ++.I mfgrep ++then ++.I egrep ++or ++.I fgrep ++is used instead of ++.I grep. ++If the GREP environment variable is set, ++.I mgrep ++uses it as the ++.I grep ++program to be invoked. For example: ++ ++ for sh: GREP=fgrep mgrep string files ++ for csh: (setenv GREP fgrep; mgrep string files) ++.SH "SEE ALSO" ++grep(1), egrep(1), fgrep(1) +--- metamail/Makefile ++++ metamail/Makefile 2005-07-01 12:53:06.000000000 +0200 +@@ -41,9 +41,9 @@ + + splitmail.o: shared.c ../config.h + +-mmencode: mmencode.o codes.o ++mmencode: mmencode.o codes.o shared.o + $(RM) -f mmencode +- $(CC) $(LOCALCFLAGS) -o mmencode mmencode.o codes.o $(LDLIBS) ++ $(CC) $(LOCALCFLAGS) -o mmencode mmencode.o codes.o shared.o $(LDLIBS) + + mailto: mailto.o codes.o shared.o + $(RM) -f mailto +@@ -53,9 +53,10 @@ + $(RM) -f splitmail + $(CC) $(LOCALCFLAGS) -o splitmail splitmail.o shared.o $(LDLIBS) + +-metamail: metamail.o codes.o uue.o shared.o putenv.o ++#metamail: metamail.o codes.o uue.o shared.o putenv.o ++metamail: metamail.o codes.o uue.o shared.o + $(RM) -f metamail +- $(CC) $(LOCALCFLAGS) -o metamail metamail.o putenv.o codes.o uue.o shared.o $(LDLIBS) ++ $(CC) $(LOCALCFLAGS) -o metamail metamail.o codes.o uue.o shared.o $(LDLIBS) + + clean: + $(RM) -f metamail mmencode mailto splitmail *.o *.BAK +--- metamail/codes.c ++++ metamail/codes.c 2005-07-01 12:53:06.000000000 +0200 +@@ -19,6 +19,7 @@ + extern char *index(); + static char basis_64[] = + "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; ++void output64chunk(); + + static char index_64[128] = { + -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, +@@ -69,6 +70,7 @@ + #endif + } + ++void + to64(infile, outfile, PortableNewlines) + FILE *infile, *outfile; + int PortableNewlines; +@@ -97,6 +99,7 @@ + fflush(outfile); + } + ++void + output64chunk(c1, c2, c3, pads, outfile) + FILE *outfile; + { +@@ -114,6 +117,7 @@ + } + } + ++int + PendingBoundary(s, Boundaries, BoundaryCt) + char *s; + char **Boundaries; +@@ -140,6 +144,7 @@ + static int CRpending = 0; + + #ifdef NEWLINE_CHAR ++void + almostputc(c, outfile, PortableNewlines) + int c; + FILE *outfile; +@@ -165,6 +170,7 @@ + } + } + #else ++void + almostputc(c, outfile, PortableNewlines) + int c; + FILE *outfile; +@@ -174,6 +180,7 @@ + } + #endif + ++void + from64(infile, outfile, boundaries, boundaryct, PortableNewlines) + FILE *infile, *outfile; + char **boundaries; +@@ -275,6 +282,7 @@ + } + */ + ++void + toqp(infile, outfile) + FILE *infile, *outfile; + { +@@ -350,6 +358,7 @@ + } + } + ++void + fromqp(infile, outfile, boundaries, boundaryct) + FILE *infile, *outfile; + char **boundaries; +@@ -360,7 +369,7 @@ + /* The neednewline hack is necessary because the newline leading into + a multipart boundary is part of the boundary, not the data */ + +- while ((c1 = getc(infile)) != EOF) { ++ while ((int)(c1 = getc(infile)) != EOF) { + if (sawnewline && boundaries && (c1 == '-')) { + char Buf[200]; + unsigned char *s; +--- metamail/mailto.c ++++ metamail/mailto.c 2005-07-01 12:53:47.000000000 +0200 +@@ -60,8 +60,63 @@ + #include + #endif + ++#ifndef LINUX + extern char *malloc(), *realloc(), *index(), *getmyname(); ++#else ++#include ++#include ++#include ++#include ++#include ++extern char *getmyname(); ++#endif ++extern FILE *Fopen(); ++extern void to64(); ++extern void toqp(); ++extern int DoesNeedPortableNewlines(); ++extern int lc2strcmp(); ++extern int lc2strncmp(); ++extern int ExceptionalNewline(); ++extern void from64(); ++extern void fromqp(); ++ + struct mailpart *CreateNewPart(); ++void nomemabort(); ++int tfputs(); ++void cleanexit(); ++void ProcessInitFiles(); ++void InitSignals(); ++int ProcessMailcapFiles(); ++void FputsQuotingLT(); ++void TryClosingStyle(); ++void TryOpeningStyle(); ++void TempCloseStyles(); ++void ReopenStyles(); ++void ToggleStyle(); ++int TranslateInputToEncodedOutput(); ++void EditCurrentMessage(); ++void EndStyle(); ++void StartStyle(); ++void WriteOutMessage(); ++void RestoreCurrentStyles(); ++int WriteDeadLetter(); ++void SwitchToEuropean(); ++void EmitHeader(); ++void EmitHeaderWithAliases(); ++void WriteContentTypeAndEncoding(); ++void WriteCtypeNicely(); ++int WhichEncodingForFile(); ++void SetTextFlags(); ++void BuildCommand(); ++int ContainsEightBitChar(); ++void ProcessOneMailRC(); ++void HandleAliasCommand(); ++void HandleSetCommand(); ++void HeaderFputs(); ++void PutQP(); ++void EmitAddresses(); ++void DeAlias(); ++void fputsquoting(); + + /* The main data structure for the multiple parts of the mail */ + +@@ -138,7 +193,7 @@ + int JustificationState = JUST_LEFT; + + +-EightBitCharHelp() { ++void EightBitCharHelp() { + if (!CharacterSet || !strcmp(CharacterSet, "us-ascii")) { + printf("There are no extended characters available for your US-ASCII terminal.\n\n"); + printf("If you are actually using a terminal or terminal emulator with a richer\ncharacter set, you must use the '-a' option or the 'MM_CHARSET' environment\nvariable to inform this program of that fact.\n"); +@@ -199,13 +254,16 @@ + return(s); + } + +-TildeHelp() { +- char *pager = getenv("PAGER"); ++void TildeHelp() { + char TmpName[100], CmdBuf[150]; ++ char *pager; + FILE *fp; + ++ if ((pager = getenv("METAMAIL_PAGER")) == NULL) ++ pager = getenv("PAGER"); ++ + strcpy(TmpName, tmpname()); +- fp = fopen(TmpName, "w"); ++ fp = Fopen(TmpName, "w"); + if (!fp) fp = stdout; + fprintf(fp, "The following tilde escapes are BSD-mail-compatible:\n"); + fprintf(fp, "~? Show help on tilde escapes\n"); +@@ -298,7 +356,7 @@ + static char standoutbuf[50], standendbuf[50], StartUnderline[50], StopUnderline[50], BoldOn[50], BoldOff[50], KS[50], KE[50]; + static int termcolumns, termrows; + +-InitTerminal() { ++void InitTerminal() { + #ifdef AMIGA + strcpy(standoutbuf, "\x9b\x37m"); /* Enter standout (highlighted) mode */ + strcpy(standendbuf, "\x9b\x30m"); /* Exit standout mode */ +@@ -350,7 +408,7 @@ + #endif + } + +-FinalizeTerminal() { ++void FinalizeTerminal() { + tfputs(standendbuf); + tfputs(BoldOff); + tfputs(StopUnderline); +@@ -375,7 +433,7 @@ + return(p); + } + +-nomemabort() { ++void nomemabort() { + fprintf(stderr, "mailto: Out of memory\n"); + cleanexit(-1); + } +@@ -431,7 +489,7 @@ + + if (V_commasonly) { + ans = malloc(1+strlen(s)); +- if (!ans) nomemabort; ++ if (!ans) nomemabort(); + strcpy(ans, s); + return(ans); + } +@@ -484,7 +542,7 @@ + return(List); + } + +-main(argc, argv) ++int main(argc, argv) + char **argv; + { + char *sdum, *LineBuf, CmdBuf[100]; +@@ -591,7 +649,7 @@ + } + FirstPart = NewPart(); + CurrentPart = FirstPart; +- fpout = fopen(CurrentPart->filename, "w"); ++ fpout = Fopen(CurrentPart->filename, "w"); + if (!fpout) { + fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); + cleanexit(-1); +@@ -678,7 +736,7 @@ + CurrentPart->next = NewPart(); + CurrentPart->next->prev = CurrentPart; + CurrentPart = CurrentPart->next; +- fpout = fopen(CurrentPart->filename, "w"); ++ fpout = Fopen(CurrentPart->filename, "w"); + if (!fpout) { + fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); + cleanexit(-1); +@@ -717,7 +775,7 @@ + CurrentPart = CurrentPart->next; + CurrentPart->istext = 0; + CurrentPart->content_type = "message/rfc822"; +- fpout = fopen(CurrentPart->filename, "w"); ++ fpout = Fopen(CurrentPart->filename, "w"); + if (!fpout) { + fprintf(stderr, "mailto: Cannot open temporary file %s\n", CurrentPart->filename); + break; +@@ -729,7 +787,7 @@ + CurrentPart->next = NewPart(); + CurrentPart->next->prev = CurrentPart; + CurrentPart = CurrentPart->next; +- fpout = fopen(CurrentPart->filename, "w"); ++ fpout = Fopen(CurrentPart->filename, "w"); + if (!fpout) { + fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); + cleanexit(-1); +@@ -808,11 +866,11 @@ + char Cmd[TMPFILE_NAME_SIZE + 15]; + char *s=tmpname(); + fclose(fpout); +- fptmp = fopen(s, "w"); ++ fptmp = Fopen(s, "w"); + WriteOutMessage(fptmp, ToList, Subject, CCList, FirstPart); + TempCloseStyles(fptmp); + fclose(fptmp); +- fpout = fopen(CurrentPart->filename, "a"); ++ fpout = Fopen(CurrentPart->filename, "a"); + if (!fpout) { + fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); + cleanexit(-1); +@@ -896,7 +954,7 @@ + char *fname; + fclose(fpout); + fname = start; +- fptmp = fopen(fname, "w"); ++ fptmp = Fopen(fname, "w"); + WriteOutMessage(fptmp, ToList, Subject, CCList, FirstPart); + TempCloseStyles(fptmp); + if(fclose(fptmp)) { +@@ -904,7 +962,7 @@ + } else { + printf("Wrote draft to %s\n", fname); + } +- fpout = fopen(CurrentPart->filename, "a"); ++ fpout = Fopen(CurrentPart->filename, "a"); + if (!fpout) { + fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); + cleanexit(-1); +@@ -969,7 +1027,7 @@ + CurrentPart = CurrentPart->next; + CurrentPart->istext = 0; + CurrentPart->content_type = "message/rfc822"; +- fpout = fopen(CurrentPart->filename, "w"); ++ fpout = Fopen(CurrentPart->filename, "w"); + if (!fpout) { + fprintf(stderr, "mailto: Cannot open temporary file %s\n", CurrentPart->filename); + break; +@@ -991,7 +1049,7 @@ + CurrentPart->next = NewPart(); + CurrentPart->next->prev = CurrentPart; + CurrentPart = CurrentPart->next; +- fpout = fopen(CurrentPart->filename, "w"); ++ fpout = Fopen(CurrentPart->filename, "w"); + if (!fpout) { + fprintf(stderr, "mailto: Can't open temporary file %s\n", CurrentPart->filename); + cleanexit(-1); +@@ -1028,6 +1086,7 @@ + cleanexit(-1); + } + cleanexit(0); /* Never returns */ ++ return 0; + } + + char *newid() { +@@ -1042,7 +1101,7 @@ + return(idbuf); + } + +-WriteOutMessage(fp, ToList, Subject, CCList, FirstPart) ++void WriteOutMessage(fp, ToList, Subject, CCList, FirstPart) + FILE *fp; + char *ToList, *Subject, *CCList; + struct mailpart *FirstPart; +@@ -1121,7 +1180,7 @@ + } + } + +-WriteContentTypeAndEncoding(fp, part) ++void WriteContentTypeAndEncoding(fp, part) + FILE *fp; + struct mailpart *part; + { +@@ -1160,7 +1219,7 @@ + } + } + +-TranslateInputToEncodedOutput(InputFP, OutputFP, Ecode, ctype) ++int TranslateInputToEncodedOutput(InputFP, OutputFP, Ecode, ctype) + FILE *InputFP, *OutputFP; + int Ecode; + char *ctype; +@@ -1192,7 +1251,7 @@ + kept open across an inserted object -- i.e. the richtext is split into + two parts of a multipart message */ + +-TempCloseStyles(fp) ++void TempCloseStyles(fp) + FILE *fp; + { + int i = StackSize; +@@ -1205,7 +1264,7 @@ + fflush(stdout); + } + +-RestoreCurrentStyles() { ++void RestoreCurrentStyles() { + int i=0; + while (ifilename); + FirstPart = FirstPart->next; +@@ -1408,6 +1460,13 @@ + FinalizeTerminal(); + } + ++void cleanexit(code) ++int code; ++{ ++ finalize(); ++ exit(code); ++} ++ + void + cleanup(signum) + int signum; +@@ -1436,7 +1495,7 @@ + #endif + } + +-InitSignals() { ++void InitSignals() { + signal(SIGINT, cleanup); + #ifndef AMIGA + signal(SIGPIPE, cleanup); +@@ -1456,7 +1515,7 @@ + #endif + } + +-WriteDeadLetter() ++int WriteDeadLetter() + { + FILE *fp; + #ifdef AMIGA +@@ -1473,7 +1532,7 @@ + char DeadFile[1000]; + + sprintf(DeadFile, "%s/dead.letter", gethome()); +- fp = fopen(DeadFile, "w"); ++ fp = Fopen(DeadFile, "w"); + WriteOutMessage(fp, ToList, Subject, CCList, FirstPart); + if(fclose(fp)) { + perror("Could not write ~/dead.letter\n"); +@@ -1587,7 +1646,7 @@ + if (LineBuf[0] == '#') continue; + len = strlen(LineBuf); + if (LineBuf[len-1] == '\n') LineBuf[--len] = '\0'; +- if ((len + strlen(rawentry)) > rawentryalloc) { ++ if ((len + (int)strlen(rawentry)) > rawentryalloc) { + rawentryalloc += MAX_LINELENGTH; + rawentry = realloc(rawentry, rawentryalloc+1); + if (!rawentry) nomemabort(); +@@ -1662,7 +1721,7 @@ + return(mc); + } + +-ProcessMailcapFiles() ++int ProcessMailcapFiles() + { + char *s, *path = getenv("MAILCAPS"), *origpath; + static char *stdpath = STDPATH; +@@ -1773,7 +1832,7 @@ + printf("Cannot read %s, data insertion cancelled\n", sdum); + return(NULL); + } +- fpo = fopen(mp->filename, "w"); ++ fpo = Fopen(mp->filename, "w"); + if (!fpo) { + printf("Cannot open temporary file, data insertion cancelled\n"); + return(NULL); +@@ -1791,7 +1850,9 @@ + 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 (LineBuf[strlen(LineBuf)-1] == '\n') ++ LineBuf[strlen(LineBuf)-1] = '\0'; + if (index(LineBuf, '/')) { + char lc[100], *s, AnsBuf[100]; + strcpy(lc, LineBuf); +@@ -1809,7 +1870,7 @@ + } + 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; +@@ -1866,9 +1927,9 @@ + mp->content_type = mc->contenttype; + mp->encoding_type_needed = WhichEncodingForFile(mp->filename, mp->content_type); + } else { +- char c, LineBuf[1000], *colon, *ctypebuf = NULL, *cencbuf = NULL, *s, *newfilename; ++ char LineBuf[1000], *colon, *ctypebuf = NULL, *cencbuf = NULL, *s, *newfilename; + FILE *fp, *fpout; +- int inheaders=1, bct=0; ++ int c, inheaders=1, bct=0; + + s = LineBuf; + fp = fopen(mp->filename, "r"); +@@ -1936,7 +1997,7 @@ + mp->encoding_type_needed = ENC_NONE; + } + newfilename = tmpname(); +- fpout = fopen(newfilename, "w"); ++ fpout = Fopen(newfilename, "w"); + if (!fpout) { + fprintf(stderr, "Cannot open file %s for writing, no data included.\n", newfilename); + free(CmdBuf); +@@ -1967,7 +2028,7 @@ + return(mp); + } + +-SetTextFlags(mp) ++void SetTextFlags(mp) + struct mailpart *mp; + { + if (!lc2strncmp(mp->content_type, "text/", 5)) { +@@ -1978,7 +2039,7 @@ + } + } + +-WhichEncodingForFile(fname, ctype) ++int WhichEncodingForFile(fname, ctype) + char *fname, *ctype; + { + int c, linesize=0, total=0, unsafechars=0, longlines=0; +@@ -2014,7 +2075,7 @@ + return(ENC_NONE); + } + +-BuildCommand(Buf, controlstring, TmpFileName) ++void BuildCommand(Buf, controlstring, TmpFileName) + char *Buf, *controlstring, *TmpFileName; + { + char *from, *to; +@@ -2052,7 +2113,7 @@ + } + } + +-CtypeMatch(ctype, pat) ++int CtypeMatch(ctype, pat) + char *ctype, *pat; + { + int len; +@@ -2073,7 +2134,7 @@ + return(0); + } + +-EditCurrentMessage(UseVisual) ++void EditCurrentMessage(UseVisual) + int UseVisual; + { + char *editor = NULL; +@@ -2106,7 +2167,7 @@ + ContainsEightBitChar(FirstPart->filename)) { + FirstPart->encoding_type_needed = ENC_QP; + } +- fpout = fopen(FirstPart->filename, "a"); ++ fpout = Fopen(FirstPart->filename, "a"); + free(CmdBuf); + free(CmdBuf2); + return; +@@ -2156,13 +2217,13 @@ + lastmp = mp; + mp = mp->next; + } +- fpout = fopen(lastmp->filename, "a"); ++ fpout = Fopen(lastmp->filename, "a"); + free(CmdBuf); + free(CmdBuf2); + } + + +-ProcessInitFiles() { ++void ProcessInitFiles() { + #ifdef AMIGA + ProcessOneMailRC(mailRC, 0); + #else +@@ -2212,7 +2273,7 @@ + } + } + +-ProcessOneMailRC(fname, IsAndrew) ++void ProcessOneMailRC(fname, IsAndrew) + char *fname; + int IsAndrew; + { +@@ -2246,7 +2307,7 @@ + fclose(fp); + } + +-HandleSetCommand(cmd, DoSet) ++void HandleSetCommand(cmd, DoSet) + char *cmd; + int DoSet; + { +@@ -2290,7 +2351,7 @@ + struct alias *next; + } *FirstAlias = NULL; + +-HandleAliasCommand(aliasline) ++void HandleAliasCommand(aliasline) + char *aliasline; + { + struct alias *tmpalias; +@@ -2319,7 +2380,7 @@ + FirstAlias = tmpalias; + } + +-EmitHeader(fp, hdr, body) ++void EmitHeader(fp, hdr, body) + FILE *fp; + char *hdr; + char *body; +@@ -2357,7 +2418,7 @@ + return(NULL); + } + +-HeaderFputs(s, fp, hdr) ++void HeaderFputs(s, fp, hdr) + char *s; + FILE *fp; + char *hdr; +@@ -2384,7 +2445,7 @@ + PutQP(*s, fp); + ++s; + } +- fputs("?= ", fp); /* close encoded word */ ++ fputs("?=", fp); /* close encoded word */ + firstnonascii=firstbad(s); + } + while (*s) { +@@ -2398,7 +2459,7 @@ + + static char basis_hex[] = "0123456789ABCDEF"; + +-PutQP(c, fp) ++void PutQP(c, fp) + unsigned char c; + FILE *fp; + { +@@ -2407,7 +2468,7 @@ + putc(basis_hex[c&0xF], fp); + } + +-EmitHeaderWithAliases(fp, hdr, names) ++void EmitHeaderWithAliases(fp, hdr, names) + FILE *fp; + char *hdr; + char *names; +@@ -2418,7 +2479,7 @@ + fputs("\n", fp); + } + +-EmitAddresses(fp, names, hdr) ++void EmitAddresses(fp, names, hdr) + FILE *fp; + char *names; + char *hdr; +@@ -2436,7 +2497,7 @@ + } + } + +-DeAlias(name, fp, hdr) ++void DeAlias(name, fp, hdr) + char *name; + FILE *fp; + char *hdr; +@@ -2462,7 +2523,7 @@ + } + + +-WriteCtypeNicely(fp, ct) ++void WriteCtypeNicely(fp, ct) + FILE *fp; + char *ct; + { +@@ -2497,7 +2558,7 @@ + } + } + +-fputsquoting(s, fp) ++void fputsquoting(s, fp) + char *s; + FILE *fp; + { +@@ -2566,28 +2627,29 @@ + } + #endif + +-controlputc(c) ++int controlputc(c) + char c; + { +- fputc(c, stdout); ++ return fputc(c, stdout); + } + + /* Do the equivalent of an fputs for the terminal escape stuff */ + #ifdef AMIGA +-tfputs(s) ++int tfputs(s) + char *s; + { + fputs(s, stdout); + return (0); + } + #else +-tfputs(s) ++int tfputs(s) + char *s; + { + tputs(s, 1, controlputc); ++ return (0); + } + #endif +-ContainsEightBitChar(fname) ++int ContainsEightBitChar(fname) + char *fname; + { + int c, eightBitSeen = 0; +@@ -2607,7 +2669,7 @@ + return(eightBitSeen); + } + +-SwitchToEuropean() { ++void SwitchToEuropean() { + printf("WARNING: You have entered 8-bit characters in what is supposed to be\n"); + printf("plain ASCII text. If you are using a non-ASCII character set, you should\n"); + printf("declare this to be the case with the MM_CHARSET environment variable.\n"); +--- metamail/metamail.c ++++ metamail/metamail.c 2005-07-01 12:53:06.000000000 +0200 +@@ -47,7 +47,17 @@ + + #ifndef AMIGA + #ifdef SYSV ++#ifdef LINUX ++#include ++#include ++#include ++#include ++#include ++#include ++#else + #include ++#endif ++#include + #include + #else /* SYSV */ + #include +@@ -56,7 +66,7 @@ + #endif /* MICROSOFT */ + #endif /* BORLAND */ + +-#ifdef SYSV ++#if defined(SYSV) && !defined(LINUX) + #define LPRTEMPLATE "lp %s" + #define LPRCOMMAND "lp" + #else +@@ -83,12 +93,19 @@ + #define MAX_FILE_NAME_SIZE 256 + #define WRITE_BINARY "w" + #else /* AMIGA */ +-extern char **environ, *gets(); ++#include /* declare gets(3) */ ++extern char **environ; + #define CATCOMMAND "cat" + #define CATTEMPLATE "cat %s" + #define METAMAIL "metamail" ++#ifdef LINUX ++#include ++#define TMPFILE_NAME_SIZE PATH_MAX ++#define MAX_FILE_NAME_SIZE PATH_MAX ++#else + #define TMPFILE_NAME_SIZE 1000 + #define MAX_FILE_NAME_SIZE 1000 ++#endif + #define WRITE_BINARY "w" + #endif /* AMIGA */ + #endif /* MSDOS */ +@@ -100,17 +117,61 @@ + #define CMDSIZE 1200 /* Maximum size of command to execute */ + + #define LINE_BUF_SIZE 2000 +-#ifndef MICROSOFT +-extern char *malloc(); +-extern char *realloc(); +-#endif ++#ifndef LINUX + extern char *getenv(); + extern char *index(); + extern char *rindex(); ++#endif + char fileToDelete[MAX_FILE_NAME_SIZE]; ++void ExitWithError(); ++void RestoreTtyState(); ++int ProcessArguments(); ++int HandleMessage(); ++void PauseForUser(); ++int Read822Prefix(); ++void PrepareMessage(); ++int ProcessMailcapFiles(); ++int ProcessMailcapFile(); ++int SaveSquirrelFile(); ++void MkTmpFileName(); ++int TryBuiltIns(); ++void TranslateInputToOutput(); ++void usage(); ++void StripTrailingSpace(); ++void RunInNewWindow(); ++void CreateNewWindowPrefix(); ++void SetUpEnvironment(); ++int TryMailcapEntry(); ++int IsDirectory(); ++int GetMailcapEntry(); ++int CtypeMatch(); ++int PassesTest(); ++int ExecuteMailcapEntry(); ++void BuildCommand(); ++void SaveTtyState(); ++int NeedToAskBeforeExecuting(); ++int OKToRun(); ++void strcatquoting(); ++int WriteTmpFile(); ++int ExecuteCommand(); ++void maybephead(); ++void phead(); ++void EliminateNastyChars(); ++void strcpynoquotes(); ++int StartRawStdin(); + + char *FindParam(); + extern FILE *popen(); ++extern FILE *Fopen(); ++extern int lc2strncmp(); ++extern int lc2strcmp(); ++extern int ExceptionalNewline(); ++extern void from64(); ++extern int DoesNeedPortableNewlines(); ++extern void fromqp(); ++extern void fromuue (); ++extern int PendingBoundary(); ++ + static char *nomem = "Out of memory!"; + static char *mmversion = MM_VERSTRING; + static char *NoAskDefault = "text,text/plain,text/richtext"; +@@ -295,6 +356,7 @@ + } + } + ++int + main(argc, argv) + int argc; + char **argv; +@@ -387,6 +449,7 @@ + } + } + ++int + HandleMessage(SquirrelFile, nestingdepth) + char *SquirrelFile; + /* SquirrelFile, if non-NULL, is a place to save a recognized body instead of executing it. */ +@@ -423,7 +486,7 @@ + } else { + char *LineBuf, NewSquirrelFile[TMPFILE_NAME_SIZE]; + char *subtype = NULL; +- int currct, result, IsAlternative, WroteSquirrelFile, boundarylen; ++ int currct, result, IsAlternative, WroteSquirrelFile = 0, boundarylen; + + if (SquirrelFile) return(SaveSquirrelFile(SquirrelFile)); + if (boundary[0] == '"') { +@@ -579,7 +642,7 @@ + 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 { +@@ -645,7 +708,7 @@ + if (Fname[0] == 0 || Fname[0] == '\n') { + ConsumeRestOfPart(NULL); + } else { +- fp = fopen(Fname, WRITE_BINARY); ++ fp = Fopen(Fname, WRITE_BINARY); + if (!fp) ExitWithError("Cannot open temporary file"); + TranslateInputToOutput(InputFP, fp, EncodingCode, ContentType); + ecode = fclose(fp); +@@ -661,6 +724,7 @@ + return(-1); /* Unrecognized, really */ + } + ++int + ProcessArguments(argc, argv) + int argc; + char **argv; +@@ -940,11 +1004,13 @@ + return(0); + } + ++void + usage() { + fprintf(stderr, "Usage: metamail [-b] [-B] [-d] [-e] [-h] [-r] [-R] [-p] [-P] [-x] [-y] [-z] [-c content-type] [-E content-transfer-encoding] [-f from-name] [-m mailername] [-s subject] [message-file-name]\n"); + ExitWithError(NULL); + } + ++void + RunInNewWindow(argv, argc, SourceFileNamePtr) + char **argv, **SourceFileNamePtr; + int argc; +@@ -960,7 +1026,7 @@ + /* Create it, ugh. Also needs to affect later command. */ + MkTmpFileName(TmpName); + DeleteSourceFileWhenDone = 1; +- fptmp = fopen(TmpName, WRITE_BINARY); ++ fptmp = Fopen(TmpName, WRITE_BINARY); + if (!fptmp) ExitWithError("Can't open temporary file\n"); + while (fgets(LineBuf, LINE_BUF_SIZE, stdin)) { + fputs(LineBuf, fptmp); +@@ -1026,6 +1092,7 @@ + {"text/plain", CATTEMPLATE, NULL, 0, 1, 0, "plain text", LPRTEMPLATE}, + {NULL, NULL, NULL, 0, 0, 0}}; + ++int + ProcessMailcapFiles(SquirrelFile) + char *SquirrelFile; + { +@@ -1082,6 +1149,7 @@ + #endif /* MICROSOFT */ + } + ++int + TryBuiltIns(SquirrelFile) + char *SquirrelFile; + { +@@ -1094,6 +1162,7 @@ + return(-1); + } + ++int + ProcessMailcapFile(file, SquirrelFile) + char *file, *SquirrelFile; + { +@@ -1166,6 +1235,7 @@ + } + } + ++int + TryMailcapEntry(mc, SquirrelFile) + struct MailcapEntry mc; + char *SquirrelFile; +@@ -1189,12 +1259,13 @@ + return(-1); + } + ++int + SaveSquirrelFile(SquirrelFile) + char *SquirrelFile; + { + int j; + FILE *outfp; +- outfp = fopen(SquirrelFile, WRITE_BINARY); ++ outfp = Fopen(SquirrelFile, WRITE_BINARY); + if (!outfp) { + fprintf(stderr, "Cannot open %s to squirrel away a portion of a multipart/alternative\n", SquirrelFile); + return(-1); +@@ -1214,6 +1285,7 @@ + return(0); + } + ++int + ExecuteMailcapEntry(mc, TmpFileName, ThisContentType) + char *TmpFileName, *ThisContentType; + struct MailcapEntry mc; +@@ -1361,6 +1433,7 @@ + return(0); + } + ++int + PassesTest(mc) + struct MailcapEntry *mc; + { +@@ -1414,6 +1487,7 @@ + return(NULL); + } + ++int + GetMailcapEntry(fp, mc) + FILE *fp; + struct MailcapEntry *mc; +@@ -1431,7 +1505,7 @@ + len = strlen(LineBuf); + if (len == 0) continue; + if (LineBuf[len-1] == '\n') LineBuf[--len] = 0; +- if ((len + strlen(rawentry)) > rawentryalloc) { ++ if ((len + (int)strlen(rawentry)) > rawentryalloc) { + rawentryalloc += 2000; + rawentry = realloc(rawentry, rawentryalloc+1); + if (!rawentry) ExitWithError(nomem); +@@ -1507,6 +1581,7 @@ + return(1); + } + ++void + ExitWithError(txt) + char *txt; + { +@@ -1526,7 +1601,7 @@ + while (t && (*(t+1) == ' ' || *(t+1) == '\t')) { + t = index(t+1, '\n'); + } +- len = t ? (t-s+1) : (strlen(s)+1); ++ len = t ? (t-s+1) : (int)(strlen(s)+1); + newcopy = malloc(len+3);/* two extra bytes for a bizarre bug caused by the fact that FindParam calls FreshHeaderCopy and sometimes tacks on "--". */ + if (!newcopy) ExitWithError(nomem); + strncpy(newcopy, s, len); +@@ -1534,6 +1609,7 @@ + return(newcopy); + } + ++int + Read822Prefix(PrintHeads, nestingdepth) + int PrintHeads, nestingdepth; + { +@@ -1654,6 +1730,7 @@ + return 0; + } + ++void + PrepareMessage() { + int c; + +@@ -1688,6 +1765,7 @@ + SetUpEnvironment(); + } + ++void + SetUpEnvironment() { + int i, j, environsize; + char **newenviron, *mailervar, *summaryvar, *ctypevar, *s; +@@ -1798,7 +1876,7 @@ + nameBuf[(cp - def) + 4] = 0; + cp++; /* Now points to value part of environment string. */ + +- if ((envFile = fopen(nameBuf, "w")) == NULL) { ++ if ((envFile = Fopen(nameBuf, "w")) == NULL) { + return(2); + } + +@@ -1809,6 +1887,7 @@ + } + #endif + ++int + OKToRun(ctype, progname, label) + char *ctype, *progname, *label; + { +@@ -1823,7 +1902,7 @@ + } 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); +@@ -1834,6 +1913,7 @@ + } + } + ++void + EliminateNastyChars(s) + char *s; + { +@@ -1848,6 +1928,7 @@ + } + } + ++void + StripTrailingSpace(s) + char *s; + { +@@ -1900,6 +1981,7 @@ + } + + /* check the header given to see if it matches any in the KeyHeadList */ ++void + maybephead(hdr) + char *hdr; + { +@@ -1934,6 +2016,7 @@ + } + + /* This next routine prints out a mail header, and needs to deal with the new extended charset headers. */ ++void + phead(s) + char *s; + { +@@ -2037,7 +2120,7 @@ + } else { + /* What follows is REALLY bogus, but all my encoding stuff is pipe-oriented right now... */ + MkTmpFileName(TmpFile); +- fp = fopen(TmpFile, WRITE_BINARY); ++ fp = Fopen(TmpFile, WRITE_BINARY); + if (!fp) { + fprintf(stderr, "Could not open temporary file\n"); + } else { +@@ -2068,6 +2151,7 @@ + PrintHeader(txtend + 2, 0); + } + ++void + BuildCommand(Buf, controlstring, TmpFileName, UsedTmpFileName, PartsWritten) + char *Buf, *controlstring, *TmpFileName; + int *UsedTmpFileName; +@@ -2192,7 +2276,7 @@ + strcpy(thispart->fname, TmpFileNameBuf); + WriteTmpFile(thispart->fname, thispart->ctype); + strcat(TmpFileNameBuf, "H"); +- headfp = fopen(TmpFileNameBuf, "w"); ++ headfp = Fopen(TmpFileNameBuf, "w"); + if (headfp) { + fputs(mailheaders+12, headfp); + /* The +12 gets rid of MM_HEADERS=\n */ +@@ -2280,6 +2364,7 @@ + *to = 0; + } + ++void + strcpynoquotes(t,f) + char *t, *f; + { +@@ -2291,6 +2376,7 @@ + } + } + ++int + WriteTmpFile(fname, ctype) + char *fname; + char *ctype; +@@ -2298,7 +2384,7 @@ + FILE *fpout; + int retval = 0; + +- fpout = fopen(fname, WRITE_BINARY); ++ fpout = Fopen(fname, WRITE_BINARY); + if (!fpout) { + perror("WriteTmpFile"); + ExitWithError("Can't create temporary file"); +@@ -2309,7 +2395,7 @@ + return(retval); + } + +- ++void + TranslateInputToOutput(InputFP, OutputFP, Ecode, ctype) + FILE *InputFP, *OutputFP; + int Ecode; +@@ -2337,6 +2423,7 @@ + #endif + } + ++void + CreateNewWindowPrefix(Prefix) + char *Prefix; + { +@@ -2377,18 +2464,28 @@ + int HasSavedTtyState=0; + #if !defined(AMIGA) && !defined(MSDOS) + #ifdef SYSV ++#ifdef LINUX ++static struct termios MyTtyStateIn, MyTtyStateOut; ++#else + static struct termio MyTtyStateIn, MyTtyStateOut; ++#endif + #else + static struct sgttyb MyTtyStateIn, MyTtyStateOut; + #endif + #endif + ++void + SaveTtyState() { + /* Bogus -- would like a good portable way to reset the terminal state here */ + #if !defined(AMIGA) && !defined(MSDOS) + #ifdef SYSV ++#ifdef LINUX ++ tcgetattr(fileno(stdin), &MyTtyStateIn); ++ tcgetattr(fileno(stdout), &MyTtyStateOut); ++#else + ioctl(fileno(stdin), TCGETA, &MyTtyStateIn); + ioctl(fileno(stdout), TCGETA, &MyTtyStateOut); ++#endif + #else + gtty(fileno(stdin), &MyTtyStateIn); + gtty(fileno(stdout), &MyTtyStateOut); +@@ -2397,12 +2494,18 @@ + #endif + } + ++void + RestoreTtyState() { + #if !defined(AMIGA) && !defined(MSDOS) + #ifdef SYSV + if (HasSavedTtyState) { ++#ifdef LINUX ++ tcsetattr(fileno(stdout), TCSANOW, &MyTtyStateOut); ++ tcsetattr(fileno(stdin), TCSANOW, &MyTtyStateIn); ++#else + ioctl(fileno(stdout), TCSETA, &MyTtyStateOut); + ioctl(fileno(stdin), TCSETA, &MyTtyStateIn); ++#endif + } + #else + if (HasSavedTtyState) { +@@ -2413,6 +2516,7 @@ + #endif + } + ++int + NeedToAskBeforeExecuting(type) + char *type; + { +@@ -2424,6 +2528,7 @@ + return(1); + } + ++int + NeedToBeQuiet(cmd) + char *cmd; + { +@@ -2434,6 +2539,7 @@ + return(0); + } + ++int + CtypeMatch(ctype, pat) + char *ctype, *pat; + { +@@ -2460,6 +2566,7 @@ + return(0); + } + ++int + ExecuteCommand(cmd, really) + char *cmd; + int really; +@@ -2485,6 +2592,7 @@ + return(0); + } + ++void + MkTmpFileName(name) + char *name; + { +@@ -2519,7 +2627,7 @@ + FILE *script; + + MkTmpFileName(nameBuf); +- if ((script = fopen(nameBuf, "w")) == NULL) { ++ if ((script = Fopen(nameBuf, "w")) == NULL) { + fprintf(stderr, "Unable to open %s for writing\n", nameBuf); + exit(1); + } +@@ -2641,11 +2749,12 @@ + } + #endif + ++void + strcatquoting(s1, s2) + char *s1; + char *s2; + { +- strcat(s1, s2); ++ (void)strcat(s1, s2); + #ifdef NOTDEF + while (*s1) ++s1; + while (*s2) { +@@ -2656,6 +2765,7 @@ + #endif + } + ++void + PauseForUser() { + #if defined(MSDOS) || defined(AMIGA) + char Buf[100]; +@@ -2680,17 +2790,27 @@ + #endif + } + ++int + StartRawStdin() { + #if !defined(AMIGA) && !defined(MSDOS) + #ifdef SYSV ++#ifdef LINUX ++ struct termios orterm, fterm; ++ tcgetattr(0, &orterm); /* get current (i.e. cooked) termio */ ++#else + struct termio orterm, fterm; + ioctl(0, TCGETA, &orterm); /* get current (i.e. cooked) termio */ ++#endif + fterm = orterm; /* get termio to modify */ + + fterm.c_lflag &= ~ICANON; /* clear ICANON giving raw mode */ + fterm.c_cc[VMIN] = 1; /* set MIN char count to 1 */ + fterm.c_cc[VTIME] = 0; /* set NO time limit */ ++#ifdef LINUX ++ return tcsetattr(0, TCSADRAIN, &fterm); /* modify termio for raw mode */ ++#else + return ioctl(0, TCSETAW, &fterm); /* modify termio for raw mode */ ++#endif + #else + struct sgttyb ts; + gtty(fileno(stdin), &ts); +--- metamail/mmencode.c ++++ metamail/mmencode.c 2005-07-01 12:53:06.000000000 +0200 +@@ -18,14 +18,27 @@ + #include + #endif + ++#include ++#include ++#include ++#include ++ + #define BASE64 1 + #define QP 2 /* quoted-printable */ + ++extern FILE *Fopen(char * Fopen_path, char * Fopen_mode); ++extern void to64(); ++extern void toqp(); ++extern void from64(); ++extern void fromqp(); ++ ++int + main(argc, argv) + int argc; + char **argv; + { + int encode = 1, which = BASE64, i, portablenewlines = 0; ++ struct stat fpstat; + FILE *fp = stdin; + FILE *fpo = stdout; + +@@ -37,7 +50,7 @@ + fprintf(stderr, "mimencode: -o requires a file name.\n"); + exit(-1); + } +- fpo = fopen(argv[i], "w"); ++ fpo = Fopen(argv[i], "w"); + if (!fpo) { + perror(argv[i]); + exit(-1); +@@ -63,14 +76,14 @@ + } else { + #ifdef MSDOS + if (encode) +- fp = fopen(argv[i], "rb"); ++ fp = Fopen(argv[i], "rb"); + else + { +- fp = fopen(argv[i], "rt"); ++ fp = Fopen(argv[i], "rt"); + setmode(fileno(fpo), O_BINARY); + } /* else */ + #else +- fp = fopen(argv[i], "r"); ++ fp = Fopen(argv[i], "r"); + #endif /* MSDOS */ + if (!fp) { + perror(argv[i]); +@@ -81,6 +94,12 @@ + #ifdef MSDOS + if (fp == stdin) setmode(fileno(fp), O_BINARY); + #endif /* MSDOS */ ++ if(fstat(fileno(fp), &fpstat) == -1) { ++ perror("fstat"); ++ exit(3); ++ } ++ if (fpo != stdout) ++ fchmod(fileno(fpo), fpstat.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO)); + if (which == BASE64) { + if (encode) { + to64(fp, fpo, portablenewlines); +--- metamail/putenv.c ++++ metamail/putenv.c 2005-07-01 12:53:06.000000000 +0200 +@@ -23,7 +23,6 @@ + #include + #else + extern int errno; +-#endif + + #if defined(STDC_HEADERS) || defined(USG) || defined(SYSV) + #include +@@ -98,3 +97,4 @@ + + return 0; + } ++#endif +--- metamail/shared.c ++++ metamail/shared.c 2005-07-01 12:53:06.000000000 +0200 +@@ -1,16 +1,25 @@ + #include + #include + #include ++#include ++#include ++#include ++#include ++#include + #ifdef SYSV + #include + #include + #endif + +-extern char *malloc(); ++#include ++ + char **Exceptions; + int *NeedsPortableNewlines; + int ExceptionsAlloced = 0, ExceptionsUsed = 0; ++int lc2strncmp(); ++int lc2strcmp(); + ++int + ExceptionalNewline(contenttype, needsportable) + char *contenttype; + int needsportable; +@@ -40,6 +49,7 @@ + return(0); + } + ++int + DoesNeedPortableNewlines(ctype) + char *ctype; + { +@@ -65,6 +75,7 @@ + return(0); + } + ++int + lc2strncmp(s1, s2, len) + char *s1, *s2; + int len; +@@ -78,6 +89,7 @@ + return((*s1 == *s2) ? 0 : -1); + } + ++int + lc2strcmp(s1, s2) + char *s1, *s2; + { +@@ -118,3 +130,53 @@ + return(hostname); + } + ++ ++/* This fopen wrapper function is designed to avoid /tmp-file race ++ * conditions where a temporary filename is created and somebody ++ * throws a link in your way before the fopen(...,"w"). This ++ * would only happen if another user on the system were actively ++ * trying to trick you into destroying files. ++ * Sorry, but "a" mode is not really handled any safer than fopen, ++ * since I really have no criterium for deciding what files are ++ * OK to write to. */ ++FILE *Fopen(Fopen_path,Fopen_mode) ++char *Fopen_path; char *Fopen_mode; ++{ ++#ifdef MSDOS ++return(fopen(Fopen_path,Fopen_mode)); ++#else ++int Fopen_fd; ++struct stat Fopen_sb; ++int Fopen_appendmode = 0; ++int Fopen_readmode = 0; ++int Fopen_openflags = 0; ++int Fopen_r; ++if ( strchr(Fopen_mode,'r') != (char *)0 ) return(fopen(Fopen_path,Fopen_mode)); ++if ( strchr(Fopen_mode,'a') != (char *)0 ) Fopen_appendmode = 1; ++if ( strchr(Fopen_mode,'+') != (char *)0 ) Fopen_readmode = 1; ++if ( ( Fopen_appendmode && (strchr(Fopen_mode,'w') != (char *)0) ) || ++ ( (! Fopen_appendmode) && (strchr(Fopen_mode,'w') == (char *)0) ) ) ++ { ++ errno = EINVAL ; ++ return( (FILE *)0 ); ++ } ++if ( Fopen_appendmode ) ++ { ++ /* If "a" and file exists, pass it to the real fopen() */ ++ Fopen_r = stat(Fopen_path,&Fopen_sb) ; ++ if ( (Fopen_r != -1) || (errno != ENOENT) ) ++ return( fopen(Fopen_path,Fopen_mode) ); ++ } ++if ( Fopen_readmode ) ++ Fopen_openflags = O_RDWR|O_CREAT|O_EXCL ; ++else ++ Fopen_openflags = O_WRONLY|O_CREAT|O_EXCL ; ++if ( Fopen_appendmode ) Fopen_openflags |= O_APPEND ; ++remove( Fopen_path ); ++/* 0666? We'd better hope their umask is safe... */ ++Fopen_fd = open(Fopen_path,Fopen_openflags,0666); ++if ( Fopen_fd > -1 ) return( fdopen(Fopen_fd,Fopen_mode) ); ++return( (FILE *)0 ); ++#endif ++} ++ +--- metamail/splitmail.c ++++ metamail/splitmail.c 2005-07-01 12:53:06.000000000 +0200 +@@ -26,9 +26,16 @@ + #include + #include + #include ++#include + + #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */ ++#ifndef LINUX + extern char *malloc(), *index(), *getmyname(); ++#else ++#include ++#include ++extern char *getmyname(); ++#endif + + #ifdef AMIGA + #define Prototype extern +@@ -41,11 +48,11 @@ + #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() { ++void usageexit() { + fprintf(stderr, "Usage: splitmail [-d] [-v] [-s splitsize] [-i id-suffix] [-p prefix] [file-name]\n"); + exit(-1); + } +@@ -53,6 +60,11 @@ + char *MonthNames[] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}; + char *DayNames[] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; + ++int ShareThisHeader(); ++void HandleOnePart(); ++int ULstrcmp(); ++int IllegalContentType(); ++ + char * + endofheader(s) + char *s; +@@ -67,6 +79,7 @@ + } + } + ++int + main(argc, argv) + char **argv; + { +@@ -238,11 +251,12 @@ + return(0); + } + +-HandleOnePart(DoDeliver, deliverycmd, prefix, numparts, whichpart, SharedHeaders, SubjectBuf, id, MessageID, bigbuf, OrigID) ++void HandleOnePart(DoDeliver, deliverycmd, prefix, numparts, whichpart, SharedHeaders, SubjectBuf, id, MessageID, bigbuf, OrigID) + int DoDeliver, numparts, whichpart; + char *deliverycmd, *prefix, *SharedHeaders, *SubjectBuf, *id, *MessageID, *bigbuf, *OrigID; + { + FILE *fpout; ++ int fd; + char OutputFile[1000]; + int code; + #if defined(sequent) +@@ -255,7 +269,11 @@ + fpout = popen(deliverycmd, "w"); + } else { + sprintf(OutputFile, "%s%d", prefix, whichpart); +- fpout = fopen(OutputFile, "w"); ++ /* fpout = fopen(OutputFile, "w"); */ ++ remove(OutputFile); ++ fpout = NULL; ++ fd = open(OutputFile, O_WRONLY|O_CREAT|O_EXCL, 0600); ++ if ( fd > -1 ) fpout = fdopen(fd, "w"); + } + if (!fpout) { + fprintf(stderr, "splitmail: Can't open %s for writing\n", DoDeliver ? deliverycmd : OutputFile); +@@ -339,7 +357,7 @@ + NULL + }; + +-ShareThisHeader(s, SubjectBuf, SubjectBufLen, OrigID) ++int ShareThisHeader(s, SubjectBuf, SubjectBufLen, OrigID) + char *s; + char *SubjectBuf; + size_t SubjectBufLen; +@@ -381,7 +399,7 @@ + + static char *tspecials = "()<>@,;:\\\"/[]?.="; + +-IllegalContentType(ctype) ++int IllegalContentType(ctype) + char *ctype; + { + char *ct, *semicolon, *st, *s, *param, *eq, *matcheq; +--- metamail/uue.c ++++ metamail/uue.c 2005-07-01 12:53:06.000000000 +0200 +@@ -1,10 +1,13 @@ + #include ++#include ++ ++int PendingBoundary(); + + /* + * hack to metamail to decode uuencoded bodyparts + * Written by Keith Moore, February 1992 + */ +- ++void + uueget (ptr, outfp, n) + char *ptr; + FILE *outfp; +@@ -29,7 +32,7 @@ + putc (c3, outfp); + } + +- ++int + getline (buf, size, fp) + char *buf; + int size; +@@ -61,7 +64,7 @@ + (0); /* shut lint up */ + } + +- ++void + fromuue (infp, outfp, boundaries, ctptr) + FILE *infp, *outfp; + char **boundaries; +--- richmail/iso2022.c ++++ richmail/iso2022.c 2005-07-01 12:53:06.000000000 +0200 +@@ -41,9 +41,13 @@ + + #include + #include ++#include + #include "richlex.h" + #include "richset.h" + ++extern void controloutput(); ++extern int controlputc(); ++ + /* + * Global data for this module. + */ +@@ -73,7 +77,7 @@ + /* + * Initialise the ISO-2022 character set processor. + */ +-iso2022_init (name) ++void iso2022_init (name) + char *name; + { + SwToAscii = 'B'; +@@ -257,7 +261,7 @@ + /* + * Render the given ISO-2022 character. + */ +-iso2022_render (ch,param) ++int iso2022_render (ch,param) + RCHAR ch; + void *param; + { +@@ -274,7 +278,7 @@ + } + } + (*RichtextPutc) ((int)((ch & 0xFF00) >> 8),param); +- (*RichtextPutc) ((int)(ch & 0xFF),param); ++ return (*RichtextPutc) ((int)(ch & 0xFF),param); + } else { + if (OutCharLen > 1 && ch >= 0x20) { + /* Add extra escape sequences before stray ASCII characters */ +@@ -287,14 +291,14 @@ + (*RichtextPutc) (SI,param); + } + } +- (*RichtextPutc) ((int)(ch & 0xFF),param); ++ return (*RichtextPutc) ((int)(ch & 0xFF),param); + } + } + + /* + * Enter or leave the ISO-2022 encoding. + */ +-iso2022_encoding (newenc) ++int iso2022_encoding (newenc) + int newenc; + { + switch (newenc) { +@@ -306,6 +310,7 @@ + case RICH_ENC_KSC_5601: controloutput("\016",0); break; + default: controloutput("\033(B",0); break; + } ++ return 0; + } + + /* +@@ -372,4 +377,5 @@ + } + OutPrevPrevChar = OutPrevChar; + OutPrevChar = ch; ++ return 0; + } +--- richmail/richlex.c ++++ richmail/richlex.c 2005-07-01 12:53:06.000000000 +0200 +@@ -42,6 +42,7 @@ + -------------------------------------------------------------------------*/ + + #include ++#include + #include + #include "richlex.h" + #include "richset.h" +@@ -89,7 +90,7 @@ + * on the terminal. + */ + #define ISO2022_GENERIC "x-iso-2022-gen-%2x" +-#define ISO2022_CHARSET "x-iso-charset-" ++#define ISO2022_CHARSET "x-iso-charset-%8x" + + /* + * Define the character set shift characters for ISO-2022-KR. +@@ -105,7 +106,7 @@ + /* + * Reset the richtext parsing mechanism. + */ +-richtextreset() ++void richtextreset() + { + StackSize = 0; + FlushStack = 0; +@@ -191,7 +192,7 @@ + * Determine if the current token is one of the singleton + * richtext commands: , , . + */ +-static richtextsingle(TextEnriched) ++static int richtextsingle(TextEnriched) + int TextEnriched; + { + return (charsetsingle (NextToken) || +@@ -416,7 +417,7 @@ + /* + * Output a string via "RichtextPutc". + */ +-static richtextoutstr(str,outparam) ++static void richtextoutstr(str,outparam) + char *str; + void *outparam; + { +@@ -430,7 +431,7 @@ + * Read the input stream, correct the richtext, and write the + * results to the output stream. + */ +-richtextcorrect(inparam,outparam,TextEnriched) ++void richtextcorrect(inparam,outparam,TextEnriched) + void *inparam,*outparam; + int TextEnriched; + { +@@ -459,7 +460,7 @@ + * Change the encoding used for characters not present in + * richtext command sequences. + */ +-richtextencoding(encoding) ++void richtextencoding(encoding) + int encoding; + { + RichtextCharEncoding = encoding; +--- richmail/richlex.h ++++ richmail/richlex.h 2005-07-01 12:53:06.000000000 +0200 +@@ -101,7 +101,7 @@ + /* + * Reset the richtext parsing mechanism. + */ +-extern richtextreset(); ++extern void richtextreset(); + + /* + * Get the next token from the input stream. RICHTEXT_COMMAND +@@ -123,7 +123,7 @@ + * "RichtextPutc" function as the second argument, and "inparam" + * is passed to "richtextlex" during parsing. + */ +-extern richtextcorrect( /* void *inparam,void *outparam,int TextEnriched */ ); ++extern void richtextcorrect( /* void *inparam,void *outparam,int TextEnriched */ ); + + #define RICH_ENC_US_ASCII 0 /* US-ASCII encoding: one-byte */ + #define RICH_ENC_JP_ASCII 1 /* JP-ASCII encoding: one-byte */ +@@ -143,7 +143,7 @@ + * Change the encoding used for characters not present in + * richtext command sequences. + */ +-extern richtextencoding( /* int encoding */ ); ++extern void richtextencoding( /* int encoding */ ); + + /* + * Define a number of macros for decoding multi-byte character +--- richmail/richset.c ++++ richmail/richset.c 2005-07-01 12:53:06.000000000 +0200 +@@ -34,6 +34,7 @@ + -------------------------------------------------------------------------*/ + + #include ++#include + #include "richlex.h" + #include "richset.h" + +@@ -58,7 +59,7 @@ + * a particular base processor. The initialisation function of all + * character set processors is called. + */ +-charsetinit (charset,name) ++void charsetinit (charset,name) + struct charsetproc *charset; + char *name; + { +@@ -76,7 +77,7 @@ + * Initialise the stack, starting with a character set processor with + * a particular name. + */ +-charsetnameinit (name) ++void charsetnameinit (name) + char *name; + { + int temp = 0; +@@ -110,7 +111,7 @@ + /* + * Push a new character set processor onto the stack. + */ +-charsetpush (charset) ++void charsetpush (charset) + struct charsetproc *charset; + { + if (NumCharSets >= MAX_CHAR_SETS) { +@@ -128,7 +129,7 @@ + * if it matches the given processor. Note: the base + * processor is never popped off. + */ +-charsetpop (charset) ++void charsetpop (charset) + struct charsetproc *charset; + { + if (NumCharSets > 1 && CharSets[NumCharSets - 1] == charset) { +@@ -156,7 +157,7 @@ + * Set the details for a character set member in the top-most + * character set. + */ +-charmember (member,ch) ++void charmember (member,ch) + struct charsetmember *member; + RCHAR ch; + { +@@ -167,7 +168,7 @@ + /* + * Set the details for a member of a specific character set. + */ +-charmemberspec (member,ch,charset) ++void charmemberspec (member,ch,charset) + struct charsetmember *member; + RCHAR ch; + struct charsetproc *charset; +@@ -179,7 +180,7 @@ + /* + * Set the details for a output control code character. + */ +-charmemberctrl (member,ch) ++void charmemberctrl (member,ch) + struct charsetmember *member; + RCHAR ch; + { +--- richmail/richset.h ++++ richmail/richset.h 2005-07-01 12:53:06.000000000 +0200 +@@ -58,7 +58,7 @@ + struct charsetproc + { + char *names; +- int (*init) ( /* char *name */ ); ++ void (*init) ( /* char *name */ ); + int (*command) ( /* char *token, int negated */ ); + int (*single) ( /* char *token */ ); + int (*width) ( /* RCHAR c */ ); +@@ -89,25 +89,25 @@ + * a particular base processor. The initialisation function of all + * character set processors is called. + */ +-extern charsetinit ( /* struct charsetproc *charset, char *name */ ); ++extern void charsetinit ( /* struct charsetproc *charset, char *name */ ); + + /* + * Initialise the stack, starting with a character set processor with + * a particular name. + */ +-extern charsetnameinit ( /* char *name */ ); ++extern void charsetnameinit ( /* char *name */ ); + + /* + * Push a new character set processor onto the stack. + */ +-extern charsetpush ( /* struct charsetproc *charset */ ); ++extern void charsetpush ( /* struct charsetproc *charset */ ); + + /* + * Pop the top-most character set processor off the stack + * if it matches the given processor. Note: the base + * processor is never popped off. + */ +-extern charsetpop ( /* struct charsetproc *charset */ ); ++extern void charsetpop ( /* struct charsetproc *charset */ ); + + /* + * See if the character set processor on the top of the stack +@@ -119,18 +119,18 @@ + * Set the details for a character set member in the top-most + * character set. + */ +-extern charmember ( /* struct charsetmember *member, RCHAR ch */ ); ++extern void charmember ( /* struct charsetmember *member, RCHAR ch */ ); + + /* + * Set the details for a member of a specific character set. + */ +-extern charmemberspec ( /* struct charsetmember *member, RCHAR ch, ++extern void charmemberspec ( /* struct charsetmember *member, RCHAR ch, + struct charset *charset */ ); + + /* + * Set the details for a output control code character. + */ +-extern charmemberctrl ( /* struct charsetmember *member, RCHAR ch */ ); ++extern void charmemberctrl ( /* struct charsetmember *member, RCHAR ch */ ); + + /* + * Determine if the given character is a control code character. +--- richmail/richtext.c ++++ richmail/richtext.c 2005-07-01 12:53:07.000000000 +0200 +@@ -16,6 +16,8 @@ + #include + #include + #include ++#include ++#include + #include "richlex.h" + #include "richset.h" + #include +@@ -82,7 +84,18 @@ + extern tputs(); + #endif + +-static outputc(), realoutputc(), MakeWorkingMargins(), Pause(), fputsmovingright(), ResetTerminalCodes(), FinalizeTerminal(), outputstr(), FPUTS(), lc2strcmp(); ++void controloutput(); ++ ++static void outputc(); ++static void realoutputc(); ++static void MakeWorkingMargins(); ++static void Pause(); ++static void fputsmovingright(); ++static void ResetTerminalCodes(); ++static void FinalizeTerminal(); ++static void outputstr(); ++static void FPUTS(); ++static int lc2strcmp(); + + #define OUTC(c) (outputc((RCHAR)(c))) + +@@ -128,7 +141,7 @@ + #endif + } + +-static InitSignals() { ++static void InitSignals() { + signal(SIGINT, cleanup); + #if !defined(AMIGA) + #if !defined(MSDOS) +@@ -149,7 +162,8 @@ + #endif + } + +-static nomemabort() { ++#if 0 ++static void nomemabort() { + fprintf(stderr, "richtext: Out of memory\n"); + FinalizeTerminal(); + #ifdef AMIGA +@@ -158,15 +172,17 @@ + exit(-1); + #endif + } ++#endif + + #ifndef RICHTEXT_LIBRARY + ++int richtext_main(); + /* + * Only include the main function if this module is not being used as a + * library call. + */ + +-main(argc, argv) ++int main(argc, argv) + int argc; + char **argv; + { +@@ -175,7 +191,7 @@ + + #endif + +-richtext_main(argc, argv) ++int richtext_main(argc, argv) + int argc; + char **argv; + { +@@ -341,15 +357,15 @@ + char *cp; + + cp = cb; +- if (dum = tgetstr("ks", &cp)) strcpy (KS, dum); else KS[0] = '\0'; +- if (dum = tgetstr("ke", &cp)) strcpy (KE, dum); else KE[0] = '\0'; +- if (dum = tgetstr("so", &cp)) strcpy (standoutbuf, dum); standoutbuf[0] = '\0'; +- if (dum = tgetstr("se", &cp)) strcpy (standendbuf, dum); standendbuf[0] = '\0'; +- if (dum = tgetstr("md", &cp)) strcpy (BoldOn, dum); else strcpy(BoldOn, standoutbuf); +- if (dum = tgetstr("me", &cp)) strcpy (BoldOff, dum); else strcpy(BoldOff, standendbuf); +- if (dum = tgetstr("us", &cp)) strcpy (StartUnderline, dum); else StartUnderline[0] = '\0'; +- if (dum = tgetstr("ue", &cp)) strcpy (StopUnderline, dum); else StopUnderline[0] = '\0'; +- if (dum = tgetstr("nd", &cp)) strcpy (MoveRight, dum); else { ++ if ((dum = tgetstr("ks", &cp))) strcpy (KS, dum); else KS[0] = '\0'; ++ if ((dum = tgetstr("ke", &cp))) strcpy (KE, dum); else KE[0] = '\0'; ++ if ((dum = tgetstr("so", &cp))) strcpy (standoutbuf, dum); standoutbuf[0] = '\0'; ++ if ((dum = tgetstr("se", &cp))) strcpy (standendbuf, dum); standendbuf[0] = '\0'; ++ if ((dum = tgetstr("md", &cp))) strcpy (BoldOn, dum); else strcpy(BoldOn, standoutbuf); ++ if ((dum = tgetstr("me", &cp))) strcpy (BoldOff, dum); else strcpy(BoldOff, standendbuf); ++ if ((dum = tgetstr("us", &cp))) strcpy (StartUnderline, dum); else StartUnderline[0] = '\0'; ++ if ((dum = tgetstr("ue", &cp))) strcpy (StopUnderline, dum); else StopUnderline[0] = '\0'; ++ if ((dum = tgetstr("nd", &cp))) strcpy (MoveRight, dum); else { + MoveRight[0] = ' '; + MoveRight[1] = '\0'; + } +@@ -654,31 +670,32 @@ + return(0); + } + +-static struct charsetmember OutputBuf[1000] = {0,0}; ++static struct charsetmember OutputBuf[1000]; + static int PendingOutput = 0, PendingControls = 0; + +-controlputc(c) ++int controlputc(c) + int c; + { + charmemberctrl (&OutputBuf[PendingOutput],(RCHAR)c); + ++PendingOutput; + ++PendingControls; ++ return 0; + } + +-static immediate_controlputc(c) ++static int immediate_controlputc(c) + int c; + { +- (*RichtextPutc) (c, stdout); ++ return (*RichtextPutc) (c, stdout); + } + +-controloutput(s, immediate) ++void controloutput(s, immediate) + char *s; + int immediate; + { + tputs(s, 1, immediate ? immediate_controlputc : controlputc); + } + +-static folding_point (buf, pos) ++static int folding_point (buf, pos) + struct charsetmember *buf; + int pos; + { +@@ -690,7 +707,7 @@ + return (0); + } + +-static calc_column (buf, pos) ++static int calc_column (buf, pos) + struct charsetmember *buf; + int pos; + { +@@ -705,7 +722,7 @@ + return (col); + } + +-static FlushOut() { ++static void FlushOut() { + int i, j, x; + static struct charsetmember NewOutputBuf[1000]; + struct charsetmember *s; +@@ -795,7 +812,7 @@ + StopUnderline, 0, BoldOn, BoldOff, 0); + } + +-static outputc(c) ++static void outputc(c) + RCHAR c; + { + struct charsetmember member; +@@ -803,7 +820,7 @@ + realoutputc(member, 0); + } + +-static realoutputc(c, alreadyformatted) ++static void realoutputc(c, alreadyformatted) + struct charsetmember c; + int alreadyformatted; + { +@@ -875,7 +892,7 @@ + } + } + +-static MakeWorkingMargins() { ++static void MakeWorkingMargins() { + int oldworkingleft=workingleft, i; + + workingleft = leftmargin; +@@ -889,7 +906,7 @@ + } + } + +-static Pause() ++static void Pause() + { + int c; + +@@ -903,7 +920,7 @@ + /* Leading spaces should be output as MoveRight, to avoid + having margins that are underlined or reverse video */ + +-static fputsmovingright(s, fp) ++static void fputsmovingright(s, fp) + struct charsetmember *s; + FILE *fp; + { +@@ -923,7 +940,7 @@ + } + } + +-static ResetTerminalCodes(FakeTerminal, standout, underline, bold, standoutbuf, standendbuf, ++static void ResetTerminalCodes(FakeTerminal, standout, underline, bold, standoutbuf, standendbuf, + modifiedstandout, StartUnderline, StopUnderline, modifiedunderline, + BoldOn, BoldOff, modifiedbold) + char *standoutbuf, *standendbuf, *StartUnderline, *StopUnderline, +@@ -951,14 +968,14 @@ + } + } + +-static FinalizeTerminal() { ++static void FinalizeTerminal() { + tputs(standendbuf, 1, immediate_controlputc); + tputs(BoldOff, 1, immediate_controlputc); + tputs(StopUnderline, 1, immediate_controlputc); + FPUTS(KE, stdout); + } + +-static outputstr(s) ++static void outputstr(s) + char *s; + { + while (*s) OUTC(*s++); +@@ -980,14 +997,14 @@ + } + #endif + +-static FPUTS(s,fp) ++static void FPUTS(s,fp) + unsigned char *s; + FILE *fp; + { + while(*s) (*RichtextPutc)((int)(*s++),fp); + } + +-static lc2strcmp(s1, s2) ++static int lc2strcmp(s1, s2) + char *s1, *s2; + { + if (!s1 || !s2) return (-1); +@@ -998,7 +1015,8 @@ + return((*s1 == *s2) ? 0 : -1); + } + +-static lc2strncmp(s1, s2, len) ++#if 0 ++static int lc2strncmp(s1, s2, len) + char *s1, *s2; + int len; + { +@@ -1010,3 +1028,4 @@ + if (len <= 0) return(0); + return((*s1 == *s2) ? 0 : -1); + } ++#endif +--- richmail/richtoatk.c ++++ richmail/richtoatk.c 2005-07-01 12:53:07.000000000 +0200 +@@ -13,9 +13,12 @@ + WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. + */ + #include ++#include + #include + #include "richlex.h" + ++int ignoretoken(); ++ + char *translate(t) + char *t; + { +@@ -25,7 +28,7 @@ + return(t); + } + +-main() { ++int main() { + RCHAR c; + int i, JustDidNewline = 0; + char tok[MAX_TOKEN_SIZE + 1],*token; +@@ -73,10 +76,10 @@ + JustDidNewline = 0; + } + } +- fputs("\n \n\\enddata{text, 42}\n", stdout); ++ return fputs("\n \n\\enddata{text, 42}\n", stdout); + } + +-ignoretoken(t) ++int ignoretoken(t) + char *t; + { + if (*t == '/') ++t; +@@ -86,12 +89,12 @@ + return(0); + } + +-controlputc(c) ++void controlputc(c) + int c; + { + } + +-controloutput(s, immediate) ++void controloutput(s, immediate) + char *s; + int immediate; + { +--- richmail/usascii.c ++++ richmail/usascii.c 2005-07-01 12:53:07.000000000 +0200 +@@ -34,6 +34,7 @@ + -------------------------------------------------------------------------*/ + + #include ++#include + #include + #include "richlex.h" + #include "richset.h" +@@ -41,7 +42,7 @@ + /* + * Initialise the US-ASCII character set processor. + */ +-usascii_init (name) ++void usascii_init (name) + char *name; + { + if (name) +@@ -98,20 +99,21 @@ + /* + * Render the given US-ASCII character. + */ +-usascii_render (ch,param) ++int usascii_render (ch,param) + RCHAR ch; + void *param; + { +- (*RichtextPutc) ((int)ch,param); ++ return (*RichtextPutc) ((int)ch,param); + } + + /* + * Enter or leave the US-ASCII encoding. + */ +-usascii_encoding (newenc) ++int usascii_encoding (newenc) + int newenc; + { + /* Nothing to be done in this version */ ++ return 0; + } + + /* +@@ -119,10 +121,10 @@ + */ + struct charsetproc usascii_charset = + {"us-ascii", +- usascii_init, +- usascii_command, +- usascii_single, +- usascii_width, +- usascii_fold, +- usascii_render, +- usascii_encoding}; ++ &usascii_init, ++ &usascii_command, ++ &usascii_single, ++ &usascii_width, ++ &usascii_fold, ++ &usascii_render, ++ &usascii_encoding}; diff --git a/metamail-2.7-19.tar.gz b/metamail-2.7-19.tar.gz new file mode 100644 index 0000000..fbc32be --- /dev/null +++ b/metamail-2.7-19.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f6f74d5f6bda8e73d84498eb876f25277f8a4dfca870ab76bd9be2807e69b1f +size 162101 diff --git a/metamail.changes b/metamail.changes new file mode 100644 index 0000000..7b89e74 --- /dev/null +++ b/metamail.changes @@ -0,0 +1,193 @@ +------------------------------------------------------------------- +Thu Feb 23 18:57:11 CET 2006 - werner@suse.de + +- Fix for buffer overflow (bug #153145) + +------------------------------------------------------------------- +Wed Jan 25 21:38:14 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Tue Jan 17 00:11:45 CET 2006 - schwab@suse.de + +- Don't strip binaries. + +------------------------------------------------------------------- +Fri Jul 1 12:37:19 CEST 2005 - werner@suse.de + +- Remove -fsigned-char (bug #93881) + +------------------------------------------------------------------- +Fri Jun 10 14:31:16 CEST 2005 - werner@suse.de + +- Use declaration from stdio.h for gets(3) + +------------------------------------------------------------------- +Thu May 6 16:45:09 CEST 2004 - hmacht@suse.de + +- added # norootforbuild in specfile + +------------------------------------------------------------------- +Fri Mar 19 14:48:10 CET 2004 - werner@suse.de + +- Fix date issue with locale: be always RFC 822 conform (#35828) + +------------------------------------------------------------------- +Tue Mar 2 13:20:30 CET 2004 - werner@suse.de + +- Fix security fix: sizeof(char*) is not equal to sizeof(char[250]) + +------------------------------------------------------------------- +Mon Feb 9 16:16:52 CET 2004 - werner@suse.de + +- Security fix format-string bug and buffer overflow (bug #34369) + +------------------------------------------------------------------- +Fri Jan 23 17:17:44 CET 2004 - werner@suse.de + +- Fix declarations of the stuff to make gcc happy + +------------------------------------------------------------------- +Fri Jun 13 11:06:38 CEST 2003 - coolo@suse.de + +- use BuildRoot +- really package mgrep (not just the man page :) +- use %_mandir + +------------------------------------------------------------------- +Tue Dec 17 16:39:20 CET 2002 - werner@suse.de + +- New: mgrep which does similar to zgrep on mimencoded data + +------------------------------------------------------------------- +Tue Sep 17 17:34:28 CEST 2002 - ro@suse.de + +- removed bogus self-provides + +------------------------------------------------------------------- +Sat Jul 13 23:07:40 CEST 2002 - schwab@suse.de + +- mmencode: don't change mode of stdout. + +------------------------------------------------------------------- +Mon Oct 1 16:55:41 CEST 2001 - schwab@suse.de + +- Fix quoting in shell scripts. + +------------------------------------------------------------------- +Tue May 22 12:29:28 CEST 2001 - werner@suse.de + +- Remove space after ?= closing phrase + +------------------------------------------------------------------- +Wed Mar 7 17:09:27 CET 2001 - uli@suse.de + +- added xf86 to neededforbuild + +------------------------------------------------------------------- +Wed Mar 7 12:39:54 CET 2001 - werner@suse.de + +- Be sure that font directory exists + +------------------------------------------------------------------- +Fri Dec 22 15:36:06 CET 2000 - werner@suse.de + +- If terminal attributes will be restored then do this immediately + +------------------------------------------------------------------- +Fri Dec 22 13:17:35 CET 2000 - werner@suse.de + +- Declare standard functions +- Use putenv of glibc +- Print commando is lpr +- Use limits.h +- Use termios interface of glibc + +------------------------------------------------------------------- +Mon Nov 27 14:58:43 CET 2000 - sndirsch@suse.de + +- removed /usr/X11R6/lib/X11/fonts/misc/heb8x13B.pcf.gz + from filelist (font already included in xf86 package) + +------------------------------------------------------------------- +Fri Nov 17 13:06:18 CET 2000 - kukuk@suse.de + +- fix Requires: sharutil -> sharutils + +------------------------------------------------------------------- +Mon Nov 13 10:42:50 CET 2000 - ro@suse.de + +- don't redeclare killpg + +------------------------------------------------------------------- +Wed Oct 11 18:09:34 CEST 2000 - werner@suse.de + +- Fix bug within metasend (bug# 4099) + +------------------------------------------------------------------- +Wed Jun 7 15:46:21 CEST 2000 - ro@suse.de + +- doc relocation + +------------------------------------------------------------------- +Thu Mar 2 18:30:26 CET 2000 - werner@suse.de + +- /usr/man -> /usr/share/man + +------------------------------------------------------------------- +Tue Oct 19 23:59:02 MEST 1999 - werner@suse.de + +- If -o is used for mmencoding the file permissions should + be the same as the input file +- Use Fopen within mmencode.c +- sendmail is stored in /usr/sbin/ +- MAILCAPDIR is /etc +- showexternal: check for broken arguments +- mailto.c: don't be fooled by newlines +- Use RPM_OPT_FLAGS + +------------------------------------------------------------------- +Mon Sep 13 17:23:57 CEST 1999 - bs@suse.de + +- ran old prepare_spec on spec file to switch to new prepare_spec. + +------------------------------------------------------------------- +Tue Aug 24 19:15:17 MEST 1999 - uli@suse.de + +- added -fsigned-char to CFLAGS (PPC) + +---------------------------------------------------------------------------- +Fri Jul 17 14:25:28 MET DST 1998 - werner@suse.de + +- Add C source fixes of RedHat against temp exploits +- Make sh and shell scripts using mktemp for temp files +- Use PAGER if set +- Use -o of uudecode to avoid attacks over net + +---------------------------------------------------------------------------- +Tue May 27 20:03:59 MEST 1997 - florian@suse.de + + +- fix shell script "audiosend" + + + +---------------------------------------------------------------------------- +Sat Apr 26 19:14:59 MEST 1997 - florian@suse.de + + +- update to new version 2.7-19 from debian + + +---------------------------------------------------------------------------- +Tue Oct 22 22:14:08 MEST 1996 - florian@suse.de + + +- Bisherige Anpassungen mit der neusten debian-Version vergleichen + und zusammenbringen. + +- Die extra Fonts sind momentan nicht mehr dabei, + sollten aber auch nicht fehlen... + + diff --git a/metamail.spec b/metamail.spec new file mode 100644 index 0000000..72aeed9 --- /dev/null +++ b/metamail.spec @@ -0,0 +1,192 @@ +# +# spec file for package metamail (Version 2.7.19) +# +# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: metamail +BuildRequires: xorg-x11 xorg-x11-devel +License: BSD, Other License(s), see package +Group: Productivity/Networking/Email/Utilities +Requires: sharutils +Autoreqprov: on +Version: 2.7.19 +Release: 1038 +Summary: MIME Mail Handler +Source: metamail-2.7-19.tar.gz +Patch: metamail-2.7-19.dif +Patch1: metamail-2.7-19-security.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +%description +Metamail is required for reading multimedia mail messages (such as +those using the Andrew toolkit) with elm. + + + +%prep +%setup -n metamail-2.7-19 +%patch -P 1 -b .security +%patch -P 0 + +%build + make + make -C fonts + +%install + mkdir -p $RPM_BUILD_ROOT/usr/bin $RPM_BUILD_ROOT%_mandir/man{1,4} + make INSTROOT=$RPM_BUILD_ROOT/usr INSTALL=install install-all +# mkdir -p $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc +# install -m 444 fonts/heb8x13B.pcf $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc/ +# gzip -9f $RPM_BUILD_ROOT/usr/X11R6/lib/X11/fonts/misc/heb8x13B.pcf + +%files +%defattr(-,root,root) +%doc README mailers.txt +#/usr/X11R6/lib/X11/fonts/misc/heb8x13B.pcf.gz +/usr/bin/audiocompose +/usr/bin/audiosend +/usr/bin/extcompose +/usr/bin/getfilename +/usr/bin/mailserver +/usr/bin/mailto +/usr/bin/mailto-hebrew +/usr/bin/metamail +/usr/bin/metasend +/usr/bin/mimeit +/usr/bin/mimencode +/usr/bin/mmencode +/usr/bin/mgrep +/usr/bin/patch-metamail +/usr/bin/rcvAppleSingle +/usr/bin/richtext +/usr/bin/richtoatk +/usr/bin/showaudio +/usr/bin/showexternal +/usr/bin/shownonascii +/usr/bin/showpartial +/usr/bin/showpicture +/usr/bin/sndAppleSingle +/usr/bin/splitmail +/usr/bin/sun-audio-file +/usr/bin/sun-message +/usr/bin/sun-message.csh +/usr/bin/sun-to-mime +/usr/bin/sun2mime +/usr/bin/uudepipe +/usr/bin/uuenpipe +%doc %{_mandir}/man1/audiocompose.1.gz +%doc %{_mandir}/man1/audiosend.1.gz +%doc %{_mandir}/man1/extcompose.1.gz +%doc %{_mandir}/man1/getfilename.1.gz +%doc %{_mandir}/man1/mailto-hebrew.1.gz +%doc %{_mandir}/man1/mailto.1.gz +%doc %{_mandir}/man1/metamail.1.gz +%doc %{_mandir}/man1/metasend.1.gz +%doc %{_mandir}/man1/mgrep.1.gz +%doc %{_mandir}/man1/mime.1.gz +%doc %{_mandir}/man1/mimencode.1.gz +%doc %{_mandir}/man1/mmencode.1.gz +%doc %{_mandir}/man1/patch-metamail.1.gz +%doc %{_mandir}/man1/richtext.1.gz +%doc %{_mandir}/man1/showaudio.1.gz +%doc %{_mandir}/man1/showexternal.1.gz +%doc %{_mandir}/man1/shownonascii.1.gz +%doc %{_mandir}/man1/showpartial.1.gz +%doc %{_mandir}/man1/showpicture.1.gz +%doc %{_mandir}/man1/splitmail.1.gz +%doc %{_mandir}/man4/mailcap.4.gz + +%changelog -n metamail +* Thu Feb 23 2006 - werner@suse.de +- Fix for buffer overflow (bug #153145) +* Wed Jan 25 2006 - mls@suse.de +- converted neededforbuild to BuildRequires +* Tue Jan 17 2006 - schwab@suse.de +- Don't strip binaries. +* Fri Jul 01 2005 - werner@suse.de +- Remove -fsigned-char (bug #93881) +* Fri Jun 10 2005 - werner@suse.de +- Use declaration from stdio.h for gets(3) +* Thu May 06 2004 - hmacht@suse.de +- added # norootforbuild in specfile +* Fri Mar 19 2004 - werner@suse.de +- Fix date issue with locale: be always RFC 822 conform (#35828) +* Tue Mar 02 2004 - werner@suse.de +- Fix security fix: sizeof(char*) is not equal to sizeof(char[250]) +* Mon Feb 09 2004 - werner@suse.de +- Security fix format-string bug and buffer overflow (bug #34369) +* Fri Jan 23 2004 - werner@suse.de +- Fix declarations of the stuff to make gcc happy +* Fri Jun 13 2003 - coolo@suse.de +- use BuildRoot +- really package mgrep (not just the man page :) +- use %%_mandir +* Tue Dec 17 2002 - werner@suse.de +- New: mgrep which does similar to zgrep on mimencoded data +* Tue Sep 17 2002 - ro@suse.de +- removed bogus self-provides +* Sat Jul 13 2002 - schwab@suse.de +- mmencode: don't change mode of stdout. +* Mon Oct 01 2001 - schwab@suse.de +- Fix quoting in shell scripts. +* Tue May 22 2001 - werner@suse.de +- Remove space after ?= closing phrase +* Wed Mar 07 2001 - uli@suse.de +- added xf86 to neededforbuild +* Wed Mar 07 2001 - werner@suse.de +- Be sure that font directory exists +* Fri Dec 22 2000 - werner@suse.de +- If terminal attributes will be restored then do this immediately +* Fri Dec 22 2000 - werner@suse.de +- Declare standard functions +- Use putenv of glibc +- Print commando is lpr +- Use limits.h +- Use termios interface of glibc +* Mon Nov 27 2000 - sndirsch@suse.de +- removed /usr/X11R6/lib/X11/fonts/misc/heb8x13B.pcf.gz + from filelist (font already included in xf86 package) +* Fri Nov 17 2000 - kukuk@suse.de +- fix Requires: sharutil -> sharutils +* Mon Nov 13 2000 - ro@suse.de +- don't redeclare killpg +* Wed Oct 11 2000 - werner@suse.de +- Fix bug within metasend (bug# 4099) +* Wed Jun 07 2000 - ro@suse.de +- doc relocation +* Thu Mar 02 2000 - werner@suse.de +- /usr/man -> /usr/share/man +* Tue Oct 19 1999 - werner@suse.de +- If -o is used for mmencoding the file permissions should + be the same as the input file +- Use Fopen within mmencode.c +- sendmail is stored in /usr/sbin/ +- MAILCAPDIR is /etc +- showexternal: check for broken arguments +- mailto.c: don't be fooled by newlines +- Use RPM_OPT_FLAGS +* Mon Sep 13 1999 - bs@suse.de +- ran old prepare_spec on spec file to switch to new prepare_spec. +* Tue Aug 24 1999 - uli@suse.de +- added -fsigned-char to CFLAGS (PPC) +* Fri Jul 17 1998 - werner@suse.de +- Add C source fixes of RedHat against temp exploits +- Make sh and shell scripts using mktemp for temp files +- Use PAGER if set +- Use -o of uudecode to avoid attacks over net +* Tue May 27 1997 - florian@suse.de +- fix shell script "audiosend" +* Sat Apr 26 1997 - florian@suse.de +- update to new version 2.7-19 from debian +* Thu Jan 02 1997 - florian@suse.de +- Bisherige Anpassungen mit der neusten debian-Version vergleichen + und zusammenbringen. +- Die extra Fonts sind momentan nicht mehr dabei, + sollten aber auch nicht fehlen... diff --git a/ready b/ready new file mode 100644 index 0000000..473a0f4