summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-07-05 09:08:42 +0000
committerJim Meyering <jim@meyering.net>2006-07-05 09:08:42 +0000
commit36a288e41a6534c816090dce1a6ed139a60e87b7 (patch)
tree3793eee5eef96a014ea95df1fe9ca3a8b0e291e8
parent7669f3998d2adb0618548dcf95b5ef01a51fac9e (diff)
downloadcoreutils-36a288e41a6534c816090dce1a6ed139a60e87b7.tar.xz
* src/copy.c (copy_internal): Don't work around old NFS clients like
SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting a banal failure as a recursive move-into-self failure. Reported by Florent Bayle in <http://bugs.debian.org/376749>.
-rw-r--r--ChangeLog6
-rw-r--r--THANKS1
-rw-r--r--src/copy.c13
3 files changed, 8 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index f5c09a5ce..a319030ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-07-05 Jim Meyering <jim@meyering.net>
+ * src/copy.c (copy_internal): Don't work around old NFS clients like
+ SunOS-4.1.4 and Irix 5.3 that set errno to values like EIO and
+ ENOTEMPTY upon failed rename. Otherwise, we risk misinterpreting
+ a banal failure as a recursive move-into-self failure.
+ Reported by Florent Bayle in <http://bugs.debian.org/376749>.
+
* src/c99-to-c89.diff: Regenerate, to remove fuzz.
2006-07-03 Jim Meyering <jim@meyering.net>
diff --git a/THANKS b/THANKS
index 132032fed..3224a2ab8 100644
--- a/THANKS
+++ b/THANKS
@@ -154,6 +154,7 @@ Felix Lee flee@teleport.com
Felix Rauch Valenti frauch@cse.unsw.edu.au
Ferdinand fw@scenic.mine.nu
Fletcher Mattox fletcher@cs.utexas.edu
+Florent Bayle florent@sarcelle.net
Florin Iucha fiucha@hsys.mic.ro
Francesco Montorsi fr_m@hotmail.com
François Pinard pinard@iro.umontreal.ca
diff --git a/src/copy.c b/src/copy.c
index a6ea3e6b6..c958eb687 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -1385,18 +1385,7 @@ copy_internal (char const *src_name, char const *dst_name,
/* This happens when attempting to rename a directory to a
subdirectory of itself. */
- if (errno == EINVAL
-
- /* When src_name is on an NFS file system, some types of
- clients, e.g., SunOS4.1.4 and IRIX-5.3, set errno to EIO
- instead. Testing for this here risks misinterpreting a real
- I/O error as an attempt to move a directory into itself, so
- FIXME: consider not doing this. */
- || errno == EIO
-
- /* And with SunOS-4.1.4 client and OpenBSD-2.3 server,
- we get ENOTEMPTY. */
- || errno == ENOTEMPTY)
+ if (errno == EINVAL)
{
/* FIXME: this is a little fragile in that it relies on rename(2)
failing with a specific errno value. Expect problems on