From: nekral-guest Date: Sat, 13 Sep 2008 11:55:50 +0000 (+0000) Subject: * lib/commonio.c: Ignore the return value of umask() when the mask X-Git-Tag: 4.1.3~168 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0833bc3cc0d3636864a5431f3f77e8b81848b380;p=shadow * lib/commonio.c: Ignore the return value of umask() when the mask is set to the old value. --- 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; }