Author: sthibault
Date: 2010-02-23 19:00:37 +0000 (Tue, 23 Feb 2010)
New Revision: 4205

Added:
   glibc-package/trunk/debian/patches/any/submitted-remove.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
patches/any/submitted-remove.diff: New patch to fix remove() on directory on 
non-Linux ports.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog        2010-02-23 10:24:41 UTC (rev 
4204)
+++ glibc-package/trunk/debian/changelog        2010-02-23 19:00:37 UTC (rev 
4205)
@@ -3,6 +3,8 @@
   [ Samuel Thibault ]
   * patches/hurd-i386/local-pthread.diff: Refresh patch.
   * Update debian/testsuite-checking/expected-results-i486-gnu-libc.
+  * patches/any/submitted-remove.diff: New patch to fix remove() on
+    directory on non-Linux ports.
 
   [ Aurelien Jarno ]
   * debian/control.in/*: add ${misc:Depends} to all binary packages.

Added: glibc-package/trunk/debian/patches/any/submitted-remove.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/submitted-remove.diff                
                (rev 0)
+++ glibc-package/trunk/debian/patches/any/submitted-remove.diff        
2010-02-23 19:00:37 UTC (rev 4205)
@@ -0,0 +1,25 @@
+Only Linux' unlink() uses EISDIR when the entry to remove() is a directory
+Reported by Ludovic Courtès
+
+2010-02-23  Samuel Thibault  <samuel.thiba...@ens-lyon.org>
+
+       * sysdeps/posix/remove.c (remove): Check __unlink()'s result against
+       EPERM too.
+
+---
+ remove.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/sysdeps/posix/remove.c b/sysdeps/posix/remove.c
+index c44af92..61fa5f3 100644
+--- a/sysdeps/posix/remove.c
++++ b/sysdeps/posix/remove.c
+@@ -28,7 +28,7 @@ remove (file)
+   /* First try to unlink since this is more frequently the necessary action. 
*/
+   if (__unlink (file) != 0
+       /* If it is indeed a directory...  */
+-      && (errno != EISDIR
++      && ((errno != EISDIR && errno != EPERM)
+         /* ...try to remove it.  */
+         || __rmdir (file) != 0))
+     /* Cannot remove the object for whatever reason.  */

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series   2010-02-23 10:24:41 UTC (rev 
4204)
+++ glibc-package/trunk/debian/patches/series   2010-02-23 19:00:37 UTC (rev 
4205)
@@ -237,3 +237,4 @@
 any/submitted-stack-guard-quick-randomization.diff
 any/submitted-leading-zero-stack-guard.diff
 any/submitted-stat-issock.diff
+any/submitted-remove.diff


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/e1njzzs-00080g...@alioth.debian.org

Reply via email to