From: John Kohl Date: Wed, 20 Mar 1991 18:12:47 +0000 (+0000) Subject: fix name clash on tmpfile X-Git-Tag: krb5-1.0-alpha4~45 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=741187e36c0abf1ed8af9123b4d66d0e0ab15b4c;p=krb5.git fix name clash on tmpfile git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@1928 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/appl/popper/pop_enter.c b/src/appl/popper/pop_enter.c index 72d9ce29f..1206f6b40 100644 --- a/src/appl/popper/pop_enter.c +++ b/src/appl/popper/pop_enter.c @@ -22,12 +22,13 @@ void notify_recipient(); #define POP_MAILDIR "/usr/spool/pop" char buffer[BUFSIZ]; -char tmpfile[512]; /* tmp file */ +char xtmpfile[512]; /* tmp file */ int newmail; /* fd for temp message */ int maildrop; /* file descriptor for drop */ extern int errno; - +extern int sys_nerr; +extern char *sys_errlist[]; main (argc, argv) @@ -61,7 +62,7 @@ main (argc, argv) } close(newmail); - unlink(tmpfile); + unlink(xtmpfile); exit(status); } @@ -72,10 +73,10 @@ get_message() { int nchar; - sprintf(tmpfile, "/tmp/tpop.%d", getpid()); - if((newmail = open(tmpfile, O_RDWR|O_CREAT, 0600)) == -1) + sprintf(xtmpfile, "/tmp/tpop.%d", getpid()); + if((newmail = open(xtmpfile, O_RDWR|O_CREAT, 0600)) == -1) { - fprintf(stderr, "unable to open temporary file, \"%s\".\n", tmpfile); + fprintf(stderr, "unable to open temporary file, \"%s\".\n", xtmpfile); return(-1); } @@ -88,7 +89,7 @@ get_message() int -open_drop(drop) +open_drop(name) char *name; { char dropfile[512];