When creating record file, use umask 077 instead of the default.
MFC after: 2 weeks
This commit is contained in:
parent
5e2c0d2d47
commit
c0d0b76655
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312663
@ -566,8 +566,13 @@ savemail(char name[], FILE *fi)
|
|||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
int i;
|
int i;
|
||||||
time_t now;
|
time_t now;
|
||||||
|
mode_t saved_umask;
|
||||||
|
|
||||||
if ((fo = Fopen(name, "a")) == NULL) {
|
saved_umask = umask(077);
|
||||||
|
fo = Fopen(name, "a");
|
||||||
|
umask(saved_umask);
|
||||||
|
|
||||||
|
if (fo == NULL) {
|
||||||
warn("%s", name);
|
warn("%s", name);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user