* lib/commonio.c: Call fsync before closing the backup file. This
ensures that the backup file is flushed to the storage medium.
This commit is contained in:
parent
df7abc5447
commit
5dd5f51700
@ -1,3 +1,8 @@
|
|||||||
|
2009-03-21 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
|
* lib/commonio.c: Call fsync before closing the backup file. This
|
||||||
|
ensures that the backup file is flushed to the storage medium.
|
||||||
|
|
||||||
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
2009-03-15 Nicolas François <nicolas.francois@centraliens.net>
|
||||||
|
|
||||||
* src/groupmod.c: Embed gshadow related cleanup in #ifdef
|
* src/groupmod.c: Embed gshadow related cleanup in #ifdef
|
||||||
|
@ -251,7 +251,8 @@ static int create_backup (const char *backup, FILE * fp)
|
|||||||
fclose (bkfp);
|
fclose (bkfp);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
if (fclose (bkfp) != 0) {
|
if ( (fsync (fileno (bkfp)) != 0)
|
||||||
|
|| (fclose (bkfp) != 0)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user