summaryrefslogtreecommitdiff
path: root/AUTHORS
diff options
context:
space:
mode:
authorEvan Zacks <zackse@cpan.org>2013-11-26 09:56:11 -0500
committerCraig A. Berry <craigberry@mac.com>2013-12-02 22:45:36 -0600
commit1dcae8b8dd1e2aa373ab045fee3d4f95d34f0b3c (patch)
treebe70583afa6fd8bdb89c3e26763f7148652961ab /AUTHORS
parent448f81ea464c80a9a14d972e68f7649d1ed12d8a (diff)
downloadperl-1dcae8b8dd1e2aa373ab045fee3d4f95d34f0b3c.tar.gz
Make unlink on directory as root set errno.
If unlink is called on an existing directory while running as root without -U (PL_unsafe), the unlink call fails but does not set $!, because unlink(2) is not actually called in this case. If unlink is called as a user (or as root with -U), unlink(2) is invoked, so attempting to remove a directory would set errno to EISDIR as expected. If running as root without -U (PL_unsafe is false), lstat and S_ISDIR are called instead. If the lstat succeeds and S_ISDIR returns true, the argument is skipped without warning and without setting $!, meaning Perl's unlink can return failure while leaving the previous value of errno in place. This commit sets errno to EISDIR for this case.
Diffstat (limited to 'AUTHORS')
-rw-r--r--AUTHORS1
1 files changed, 1 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
index 1e0a166ca3..9bf9b04fed 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -373,6 +373,7 @@ Eryq <eryq@zeegee.com>
Etienne Grossman <etienne@isr.isr.ist.utl.pt>
Eugene Alterman <Eugene.Alterman@bremer-inc.com>
Evan Miller <eam@frap.net>
+Evan Zacks <zackse@cpan.org>
Fabien Tassin <tassin@eerie.fr>
Father Chrysostomos <sprout@cpan.org>
Felipe Gasper <felipe@felipegasper.com>