version 1.3, 1996/10/26 05:11:05 |
version 1.4, 1997/05/30 08:51:45 |
|
|
* mail is queued). |
* mail is queued). |
*/ |
*/ |
void |
void |
findmail(user, buf) |
findmail(user, buf, buflen) |
char *user, *buf; |
char *user, *buf; |
|
int buflen; |
{ |
{ |
char *mbox; |
char *mbox; |
|
|
if (!(mbox = getenv("MAIL"))) |
if (!(mbox = getenv("MAIL"))) |
(void)sprintf(buf, "%s/%s", _PATH_MAILDIR, user); |
(void)snprintf(buf, sizeof buf, "%s/%s", _PATH_MAILDIR, user); |
else |
else { |
(void)strcpy(buf, mbox); |
(void)strncpy(buf, mbox, sizeof buf - 1); |
|
buf[sizeof buf - 1] = '\0'; |
|
} |
} |
} |
|
|
/* |
/* |
|
|
return np; |
return np; |
if ((np = getname(uid = getuid())) != NOSTR) |
if ((np = getname(uid = getuid())) != NOSTR) |
return np; |
return np; |
printf("Cannot associate a name with uid %d\n", uid); |
printf("Cannot associate a name with uid %u\n", (unsigned)uid); |
return NOSTR; |
return NOSTR; |
} |
} |