* debian/patches/401_cppw_src.dpatch: Call fsync before closing the backup

file descriptor. This ensures that the backup file will be available on
    the storage medium.
This commit is contained in:
nekral-guest
2009-03-21 20:40:52 +00:00
parent b98c5149da
commit d56e6d08bc
2 changed files with 6 additions and 2 deletions

3
debian/changelog vendored
View File

@@ -53,6 +53,9 @@ shadow (1:4.1.3-1) unstable; urgency=low
* debian/patches/507_32char_grnames.dpatch: Patch removed. Replaced by the
--with-group-name-max-length=32 configure option.
* debian/patches/592_manpages_typos: No more needed.
* debian/patches/401_cppw_src.dpatch: Call fsync before closing the backup
file descriptor. This ensures that the backup file will be available on
the storage medium.
-- Nicolas FRANCOIS (Nekral) <nicolas.francois@centraliens.net> Sat, 14 Mar 2009 18:44:29 +0100

View File

@@ -9,7 +9,7 @@ Index: shadow-4.1.0/src/cppw.c
===================================================================
--- /dev/null
+++ shadow-4.1.0/src/cppw.c
@@ -0,0 +1,198 @@
@@ -0,0 +1,199 @@
+/*
+ cppw, cpgr copy with locking given file over the password or group file
+ with -s will copy with locking given file over shadow or gshadow file
@@ -86,7 +86,8 @@ Index: shadow-4.1.0/src/cppw.c
+ unlink(backup);
+ return -1;
+ }
+ if (fclose(bkfp)) {
+ if ( (fsync (bkfp) != 0)
+ || (fclose(bkfp) != 0)) {
+ unlink(backup);
+ return -1;
+ }