* Copyright (c) 1980 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and that due credit is given
* to the University of California at Berkeley. The name of the University
* may not be used to endorse or promote products derived from this
* software without specific prior written permission. This software
* is provided ``as is'' without express or implied warranty.
static char sccsid
[] = "@(#)v7.local.c 5.5 (Berkeley) %G%";
* Local routines that are installation dependent.
* Locate the user's mailbox file (ie, the place where new, unread
static char buf
[PATHSIZE
];
strcpy(copy("/usr/spool/mail/", buf
), user
);
* Get rid of the queued mail.
if (value("keep") != NOSTR
)
close(creat(mailname
, 0666));
if (remove(mailname
) < 0)
close(creat(mailname
, 0666));
* Discover user login name.
if (uid
== getuid() && (np
= getenv("USER")) != NOSTR
) {
strncpy(namebuf
, np
, PATHSIZE
);
return(getname(uid
, namebuf
));