projects
/
debian
/
tar
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported Upstream version 1.24
[debian/tar]
/
gnu
/
unlink.c
diff --git
a/gnu/unlink.c
b/gnu/unlink.c
index 568d2cdce4a58caa2516a5943cfc18dc7f08fa5a..827ea875b7812e345111e0f8a5a02273ce053691 100644
(file)
--- a/
gnu/unlink.c
+++ b/
gnu/unlink.c
@@
-82,6
+82,16
@@
rpl_unlink (char const *name)
}
}
if (!result)
}
}
if (!result)
- result = unlink (name);
+ {
+#if UNLINK_PARENT_BUG
+ if (len >= 2 && name[len - 1] == '.' && name[len - 2] == '.'
+ && (len == 2 || ISSLASH (name[len - 3])))
+ {
+ errno = EISDIR; /* could also use EPERM */
+ return -1;
+ }
+#endif
+ result = unlink (name);
+ }
return result;
}
return result;
}