diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-08-01 13:40:11 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2009-08-01 13:40:11 -0400 |
commit | c27bb69e547de6c17f49b6703a61a009fb862be2 (patch) | |
tree | 45bebd171b5c4408d0919f2ccea5d7b345adc211 /src/share | |
parent | cd341f153d21960fa9727de48c6f6a6b2c9bc684 (diff) |
attempting to resolve MS #675
Diffstat (limited to 'src/share')
-rwxr-xr-x | src/share/checkperms | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/share/checkperms b/src/share/checkperms index 731790e..c93113e 100755 --- a/src/share/checkperms +++ b/src/share/checkperms @@ -81,6 +81,14 @@ sub permissions_ok { return sprintf("improper other writability on '%s'", $path); } + # see the rationalization in secure_filename() in auth.c in the + # OpenSSH sources for an explanation of this bailout (see also + # monkeysphere #675): + if ($path eq $user->dir) { + debug("stopping at the %s's home directory '%s'\n", $user->name, $path); + return undef; + } + my $nextlevel = dirname($path); if ($path eq $nextlevel) { # we bottom out at the root (/ in UNIX) return undef; |