summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-03-26 01:02:13 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-03-26 01:02:13 +0000
commit62b94cab6043f6c55d8069c9af6c6423246e0375 (patch)
tree31499b56539360ff37934b6aed090df33d206408 /rdiff-backup/testing
parentc8b2f7c62f0c8e8483fd5e10ef3fea0e72d442ea (diff)
downloadrdiff-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/testing')
-rw-r--r--rdiff-backup/testing/securitytest.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/rdiff-backup/testing/securitytest.py b/rdiff-backup/testing/securitytest.py
index e816b97..f8796ff 100644
--- a/rdiff-backup/testing/securitytest.py
+++ b/rdiff-backup/testing/securitytest.py
@@ -56,6 +56,16 @@ class SecurityTest(unittest.TestCase):
SetConnections.CloseConnections()
+ def test_vet_rpath_root(self):
+ """Test vetting when restricted to root"""
+ remote_cmd = "../rdiff-backup --server --restrict-update-only /"
+ conn = SetConnections.init_connection(remote_cmd)
+ for rp in [RPath(Globals.local_connection, "blahblah"),
+ RPath(conn, "foo/bar")]:
+ conn.Globals.set("TEST_var", rp)
+ assert conn.Globals.get("TEST_var").path == rp.path
+ SetConnections.CloseConnections()
+
def secure_rdiff_backup(self, in_dir, out_dir, in_local, restrict_args,
extra_args = "", success = 1, current_time = None):
"""Run rdiff-backup locally, with given restrict settings"""