[Pkg-shadow-commits] r2580 - in debian/trunk/debian: . patches

nekral-guest at alioth.debian.org nekral-guest at alioth.debian.org
Sat Mar 21 20:40:52 UTC 2009


Author: nekral-guest
Date: 2009-03-21 20:40:52 +0000 (Sat, 21 Mar 2009)
New Revision: 2580

Modified:
   debian/trunk/debian/changelog
   debian/trunk/debian/patches/401_cppw_src.dpatch
Log:
  * 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.


Modified: debian/trunk/debian/changelog
===================================================================
--- debian/trunk/debian/changelog	2009-03-21 20:29:58 UTC (rev 2579)
+++ debian/trunk/debian/changelog	2009-03-21 20:40:52 UTC (rev 2580)
@@ -53,6 +53,9 @@
   * 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 at centraliens.net>  Sat, 14 Mar 2009 18:44:29 +0100
 

Modified: debian/trunk/debian/patches/401_cppw_src.dpatch
===================================================================
--- debian/trunk/debian/patches/401_cppw_src.dpatch	2009-03-21 20:29:58 UTC (rev 2579)
+++ debian/trunk/debian/patches/401_cppw_src.dpatch	2009-03-21 20:40:52 UTC (rev 2580)
@@ -9,7 +9,7 @@
 ===================================================================
 --- /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 @@
 +    unlink(backup);
 +    return -1;
 +  }
-+  if (fclose(bkfp)) {
++  if (   (fsync (bkfp) != 0)
++      || (fclose(bkfp) != 0)) {
 +    unlink(backup);
 +    return -1;
 +  }




More information about the Pkg-shadow-commits mailing list