* lib/commonio.c: Ignore the return value of umask() when the mask
is set to the old value.
This commit is contained in:
parent
b18d46e68d
commit
0833bc3cc0
@ -1,3 +1,8 @@
|
|||||||
|
2008-09-13 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* lib/commonio.c: Ignore the return value of umask() when the mask
|
||||||
|
is set to the old value.
|
||||||
|
|
||||||
2008-09-11 Nicolas François <nicolas.francois@centraliens.net>
|
2008-09-11 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* NEWS, etc/login.defs: New CREATE_HOME variable to tell useradd
|
* NEWS, etc/login.defs: New CREATE_HOME variable to tell useradd
|
||||||
|
@ -186,7 +186,7 @@ static FILE *fopen_set_perms (const char *name, const char *mode,
|
|||||||
|
|
||||||
mask = umask (0777);
|
mask = umask (0777);
|
||||||
fp = fopen (name, mode);
|
fp = fopen (name, mode);
|
||||||
umask (mask);
|
(void) umask (mask);
|
||||||
if (NULL == fp) {
|
if (NULL == fp) {
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ static int create_backup (const char *backup, FILE * fp)
|
|||||||
|
|
||||||
mask = umask (077);
|
mask = umask (077);
|
||||||
bkfp = fopen (backup, "w");
|
bkfp = fopen (backup, "w");
|
||||||
umask (mask);
|
(void) umask (mask);
|
||||||
if (NULL == bkfp) {
|
if (NULL == bkfp) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user