X-Git-Url: https://git.subgeniuskitty.com/unix-history/.git/blobdiff_plain/ca3f0029599ce23e529d539129c66e76c01aff05..ca8907b2bb768fe1112070406459914c8335dd35:/usr/src/usr.bin/mail/temp.c diff --git a/usr/src/usr.bin/mail/temp.c b/usr/src/usr.bin/mail/temp.c index 9f9f24a37c..735f21cead 100644 --- a/usr/src/usr.bin/mail/temp.c +++ b/usr/src/usr.bin/mail/temp.c @@ -8,7 +8,7 @@ * Give names to all the temporary files that we will need. */ -static char *SccsId = "@(#)temp.c 1.1 %G%"; +static char *SccsId = "@(#)temp.c 2.2 %G%"; char tempMail[14]; char tempQuit[14]; @@ -20,7 +20,7 @@ char tempMesg[14]; tinit() { register char *cp, *cp2; - char uname[9]; + char uname[PATHSIZE]; register int err = 0; register int pid; @@ -34,23 +34,25 @@ tinit() if (strlen(myname) != 0) { uid = getuserid(myname); - if (uid == -1) - goto youlose; + if (uid == -1) { + printf("\"%s\" is not a user of this system\n", + myname); + exit(1); + } } else { uid = getuid() & UIDMASK; if (username(uid, uname) < 0) { copy("ubluit", myname); -youlose: err++; if (rcvmode) { printf("Who are you!?\n"); exit(1); } } - copy(uname, myname); + else + copy(uname, myname); } - mailname = mailspace; cp = value("HOME"); if (cp == NOSTR) cp = ".";