mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-28 22:36:24 +01:00
Fix default mailpath
This commit is contained in:
parent
5c95f7a6dc
commit
cddeed288c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=7482
@ -460,10 +460,15 @@ int getuserinfo(void)
|
||||
else
|
||||
(void) Strncpy(uinfo.homedir, pw->pw_dir);
|
||||
cp = getenv("MAIL");
|
||||
#ifndef __FreeBSD__
|
||||
if (cp == NULL)
|
||||
cp = getenv("mail");
|
||||
if (cp == NULL)
|
||||
(void) sprintf(str, "/usr/spool/mail/%s", uinfo.username);
|
||||
#else
|
||||
if (cp == NULL)
|
||||
(void) sprintf(str, "/var/mail/%s", uinfo.username);
|
||||
#endif
|
||||
else
|
||||
(void) Strncpy(str, cp);
|
||||
cp = str;
|
||||
|
Loading…
Reference in New Issue
Block a user