* src/vipw.c: Likewise for the backup file.
This commit is contained in:
1 parent
5331930716
commit
a65c2c9b18
2 files changed
+3
-1
No files matched your search
+2
-1
@@ -112,7 +112,8 @@ static int create_backup_file (FILE * fp, const char *backup, struct stat *sb)
|
||||
unlink (backup);
|
||||
return -1;
|
||||
}
|
||||
if (fclose (bkfp) != 0) {
|
||||
if ( (fsync (fileno (bkfp)) != 0)
|
||||
|| (fclose (bkfp) != 0)) {
|
||||
unlink (backup);
|
||||
return -1;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user