]> granicus.if.org Git - shadow/commitdiff
* lib/commonio.c: Ignore the return value of umask() when the mask
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 13 Sep 2008 11:55:50 +0000 (11:55 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 13 Sep 2008 11:55:50 +0000 (11:55 +0000)
is set to the old value.

ChangeLog
lib/commonio.c

index 4447851e3a9228e6494a56761729290fc33bb33e..65dc8edc5357ed677f3e0d78e72a671197baf1a4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 5451da0fba9c5e7ebd369d86ed58e381d08df54a..0e9da37f87494975e2927223a5f908a925543226 100644 (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;
        }