* src/vipw.c: Likewise for the backup file.
This commit is contained in:
parent
5331930716
commit
a65c2c9b18
@ -5,6 +5,7 @@
|
|||||||
* src/useradd.c: Likewise for the default file, faillog, lastlog,
|
* src/useradd.c: Likewise for the default file, faillog, lastlog,
|
||||||
and mail spool.
|
and mail spool.
|
||||||
* src/usermod.c: Likewise for the faillog and lastlog file.
|
* src/usermod.c: Likewise for the faillog and lastlog file.
|
||||||
|
* src/vipw.c: Likewise for the backup file.
|
||||||
|
|
||||||
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
@ -112,7 +112,8 @@ static int create_backup_file (FILE * fp, const char *backup, struct stat *sb)
|
|||||||
unlink (backup);
|
unlink (backup);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (fclose (bkfp) != 0) {
|
if ( (fsync (fileno (bkfp)) != 0)
|
||||||
|
|| (fclose (bkfp) != 0)) {
|
||||||
unlink (backup);
|
unlink (backup);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user