diff options
author | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-03-26 01:02:13 +0000 |
---|---|---|
committer | bescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2005-03-26 01:02:13 +0000 |
commit | 62b94cab6043f6c55d8069c9af6c6423246e0375 (patch) | |
tree | 31499b56539360ff37934b6aed090df33d206408 /rdiff-backup/rdiff_backup/Security.py | |
parent | c8b2f7c62f0c8e8483fd5e10ef3fea0e72d442ea (diff) | |
download | rdiff-backup-62b94cab6043f6c55d8069c9af6c6423246e0375.tar.gz |
Added Dean Gaudet's fix to "--restrict /" option
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@561 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/Security.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/Security.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rdiff-backup/rdiff_backup/Security.py b/rdiff-backup/rdiff_backup/Security.py index 4715f7e..57e3d2f 100644 --- a/rdiff-backup/rdiff_backup/Security.py +++ b/rdiff-backup/rdiff_backup/Security.py @@ -196,6 +196,7 @@ def vet_rpath(rpath): """Require rpath not to step outside retricted directory""" if Globals.restrict_path and rpath.conn is Globals.local_connection: normalized, restrict = rpath.normalize().path, Globals.restrict_path + if restrict == "/": return components = normalized.split("/") # 3 cases for restricted dir /usr/foo: /var, /usr/foobar, /usr/foo/.. if (not normalized.startswith(restrict) or |