Smail for System V/AT (286)
Wietse Z. Venema
wietse at wzv.UUCP
Fri Oct 14 09:33:36 AEST 1988
In article <399 at bdt.UUCP> david at bdt.UUCP (David Beckemeyer) writes:
>
>Now that I've finally got a reliable feed of comp.mail.maps
>and I've got pathalias working, I'm anxious to get smail
>installed. But the version I have (smail 2.5 09/15/87)
>to work. It compiles OK but core dumps when run. Before
>I start hacking it, I though I'd check to see if this is
>the correct version for System V/AT.
The problem is a stack overflow in main() due to too many local
variables. The following patch fixes the problem. I also have included
a patch to the code that captures diagnostic messages from the local
mailer /bin/lmail.
Wietse
#! /bin/sh
# This is a shell archive. Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file". To overwrite existing
# files, type "sh file -c". You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g.. If this archive is complete, you
# will see the following message at the end:
# "End of shell archive."
# Contents: uport.patch smail.patch
# Wrapped by wietse at wzv on Fri Oct 14 00:30:05 1988
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
if test -f 'uport.patch' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'uport.patch'\"
else
echo shar: Extracting \"'uport.patch'\" \(785 characters\)
sed "s/^X//" >'uport.patch' <<'END_OF_FILE'
X*** main.c.orig Fri Sep 25 14:44:57 1987
X--- main.c Fri Apr 22 21:48:48 1988
X***************
X*** 97,106 ****
X int argc;
X char *argv[];
X {
X! char *hostv[MAXARGS]; /* UUCP neighbor */
X! char *userv[MAXARGS]; /* address given to host */
X! int costv[MAXARGS]; /* cost of resolved route */
X! enum eform formv[MAXARGS]; /* invalid, local, or uucp */
X char *p;
X int c;
X int printaddr = 0; /* or set by -A */
X--- 97,106 ----
X int argc;
X char *argv[];
X {
X! static char *hostv[MAXARGS]; /* UUCP neighbor */
X! static char *userv[MAXARGS]; /* address given to host */
X! static int costv[MAXARGS]; /* cost of resolved route */
X! static enum eform formv[MAXARGS]; /* invalid, local, or uucp */
X char *p;
X int c;
X int printaddr = 0; /* or set by -A */
END_OF_FILE
if test 785 -ne `wc -c <'uport.patch'`; then
echo shar: \"'uport.patch'\" unpacked with wrong size!
fi
# end of 'uport.patch'
fi
if test -f 'smail.patch' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \"'smail.patch'\"
else
echo shar: Extracting \"'smail.patch'\" \(818 characters\)
sed "s/^X//" >'smail.patch' <<'END_OF_FILE'
XThe following patch for smail 2.5 prevents the local (SysV) mailer
Xfrom clobbering its standard output with its standard error.
X
X Wietse Venema
X
X*** deliver.c- Fri Sep 25 14:44:51 1987
X--- deliver.c Sat Apr 23 17:02:14 1988
X***************
X*** 106,114 ****
X (void) unlink(stderrfile);
X (void) strcpy(stderrfile, "/tmp/stderrXXXXXX");
X (void) mktemp(stderrfile);
X! (void) freopen(stderrfile, "w", stderr);
X if(debug != YES) {
X! (void) freopen(stderrfile, "w", stdout);
X }
X
X *lend = *rend = *send = '\0';
X--- 106,114 ----
X (void) unlink(stderrfile);
X (void) strcpy(stderrfile, "/tmp/stderrXXXXXX");
X (void) mktemp(stderrfile);
X! (void) freopen(stderrfile, "a", stderr);
X if(debug != YES) {
X! (void) freopen(stderrfile, "a", stdout);
X }
X
X *lend = *rend = *send = '\0';
END_OF_FILE
if test 818 -ne `wc -c <'smail.patch'`; then
echo shar: \"'smail.patch'\" unpacked with wrong size!
fi
# end of 'smail.patch'
fi
echo shar: End of shell archive.
exit 0
--
work: wswietse at eutrc3.uucp | Eindhoven University of Technology
ditto: wswietse at heitue5.bitnet | Mathematics and Computing Science
home: wietse at wzv.uucp | 5600 MB Eindhoven, The Netherlands
More information about the Comp.unix.microport
mailing list