* lib/commonio.c: Ignore the return value of umask() when the mask

is set to the old value.
This commit is contained in:
nekral-guest 2008-09-13 11:55:50 +00:00
parent b18d46e68d
commit 0833bc3cc0
2 changed files with 7 additions and 2 deletions

View File

@ -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>
* NEWS, etc/login.defs: New CREATE_HOME variable to tell useradd

View File

@ -186,7 +186,7 @@ static FILE *fopen_set_perms (const char *name, const char *mode,
mask = umask (0777);
fp = fopen (name, mode);
umask (mask);
(void) umask (mask);
if (NULL == fp) {
return NULL;
}
@ -233,7 +233,7 @@ static int create_backup (const char *backup, FILE * fp)
mask = umask (077);
bkfp = fopen (backup, "w");
umask (mask);
(void) umask (mask);
if (NULL == bkfp) {
return -1;
}