1 diff -d -r -u -P mm2.7.orig/src/bin/mailserver mm2.7/src/bin/mailserver
2 --- mm2.7.orig/src/bin/mailserver Mon Jun 15 00:30:47 1998
3 +++ mm2.7/src/bin/mailserver Mon Jun 15 18:54:01 1998
8 -set TmpFile=/tmp/ms.$$
9 +# Generate temporary file name:
10 +if ( -x /bin/mktemp ) then
11 + set TmpFile=`/bin/mktemp /tmp/ms.XXXXXXX` || exit 1
12 +else if ( -x /usr/bin/mktemp ) then
13 + set TmpFile=`/usr/bin/mktemp /tmp/ms.XXXXXXX` || exit 1
15 + set TmpFile=/tmp/ms.$$
19 while ("$FOORAW" != "")
20 set FOO=(` echo "$FOORAW" | tr "[" "x"`)
23 was sent to: $FromName
27 diff -d -r -u -P mm2.7.orig/src/bin/showaudio mm2.7/src/bin/showaudio
28 --- mm2.7.orig/src/bin/showaudio Mon Jun 15 00:30:47 1998
29 +++ mm2.7/src/bin/showaudio Mon Jun 15 19:06:25 1998
32 exec /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end $*
34 - cat > ${METAMAIL_TMPDIR}/audio.$$
35 - /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end ${METAMAIL_TMPDIR}/audio.$$
36 - rm ${METAMAIL_TMPDIR}/audio.$$
37 + # Generate temporary file name:
38 + if ( -x /bin/mktemp ) then
39 + set TmpAudio=`/bin/mktemp ${METAMAIL_TMPDIR}/audio.XXXXXXX` || exit 1
40 + else if ( -x /usr/bin/mktemp ) then
41 + set TmpAudio=`/usr/bin/mktemp ${METAMAIL_TMPDIR}/audio.XXXXXXX` || exit 1
43 + set TmpAudio=${METAMAIL_TMPDIR}/audio.$$
47 + /usr/sbin/sfplay -i mu-law chan 1 rate 8000 end $TmpAudio
51 else if (-d /usr/sony) then
54 if (! $?MM_NOTTTY) set MM_NOTTTY=0
55 if ($MM_NOTTTY == 1) then
56 - set fname=/tmp/mm.aud.$$
57 + # Generate unique file name:
58 + if ( -x /bin/mktemp ) then
59 + set fname=`/bin/mktemp /tmp/mm.aud.XXXXXXX` || exit 1
60 + else if ( -x /usr/bin/mktemp ) then
61 + set fname=`/usr/bin/mktemp /tmp/mm.aud.XXXXXXX` || exit 1
63 + set fname=/tmp/mm.aud.$$
67 echo -n "Do you want to write the audio out to a file [y] ? "
69 diff -d -r -u -P mm2.7.orig/src/bin/sun-message.csh mm2.7/src/bin/sun-message.csh
70 --- mm2.7.orig/src/bin/sun-message.csh Mon Jun 15 00:30:47 1998
71 +++ mm2.7/src/bin/sun-message.csh Mon Jun 15 19:02:09 1998
73 # $2 is untrustworthy data. Quote it.
77 + echo "Error: cannot create temporary directory"
82 if (! $?METAMAIL_PAGER) then
83 diff -u -d -r -P mm2.7.orig/src/metamail/splitmail.c mm2.7/src/metamail/splitmail.c
84 --- mm2.7.orig/src/metamail/splitmail.c Sun Jun 14 12:00:20 1998
85 +++ mm2.7/src/metamail/splitmail.c Sun Jun 14 12:01:09 1998
92 #define MINCHUNKSIZE 20000 /* Better be enough to hold the headers, or we die! */
93 extern char *malloc(), *index(), *getmyname();
95 char *deliverycmd, *prefix, *SharedHeaders, *SubjectBuf, *id, *MessageID, *bigbuf, *OrigID;
99 char OutputFile[1000];
103 fpout = popen(deliverycmd, "w");
105 sprintf(OutputFile, "%s%d", prefix, whichpart);
106 - fpout = fopen(OutputFile, "w");
107 + remove(OutputFile);
109 + fd = open(OutputFile, O_WRONLY|O_CREAT|O_EXCL, 0600);
110 + if ( fd > -1 ) fpout = fdopen(fd, "w");
113 fprintf(stderr, "splitmail: Can't open %s for writing\n", DoDeliver ? deliverycmd : OutputFile);