diff --git a/ChangeLog b/ChangeLog index 4447851e..65dc8edc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2008-09-13 Nicolas François + + * lib/commonio.c: Ignore the return value of umask() when the mask + is set to the old value. + 2008-09-11 Nicolas François * NEWS, etc/login.defs: New CREATE_HOME variable to tell useradd diff --git a/lib/commonio.c b/lib/commonio.c index 5451da0f..0e9da37f 100644 --- a/lib/commonio.c +++ b/lib/commonio.c @@ -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; }