diff options
author | Craig A. Berry <craigberry@mac.com> | 2013-12-01 17:16:47 -0600 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2013-12-02 22:45:36 -0600 |
commit | f0d85c30acfcf77bee20b9f00a787e5b796dff9c (patch) | |
tree | a1a38c601d1b5119a6849b8666539b16add2a7dd /doio.c | |
parent | 1dcae8b8dd1e2aa373ab045fee3d4f95d34f0b3c (diff) | |
download | perl-f0d85c30acfcf77bee20b9f00a787e5b796dff9c.tar.gz |
Check unlink on directory for all users, not just root.
For cross-platform consistency, it makes more sense to reject
unlink attempts on directories in the same way for all users
rather than only for root. geteuid() always returns zero on
Windows, never returns zero on VMS, and is a poor indicator
of privilege on modern unixen, so the code really hasn't been
working as intended on all platforms anyway.
Diffstat (limited to 'doio.c')
-rw-r--r-- | doio.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1816,7 +1816,7 @@ nothing in the core. if (!IS_SAFE_PATHNAME(s, len, "unlink")) { tot--; } - else if (PerlProc_geteuid() || PL_unsafe) { + else if (PL_unsafe) { if (UNLINK(s)) tot--; } |