diff options
author | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-08-18 17:43:20 +0000 |
---|---|---|
committer | ben <ben@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109> | 2002-08-18 17:43:20 +0000 |
commit | 138291d78ab8fbf63f3a5a299afcc186641e45ba (patch) | |
tree | a2ff44dca2f714422eece5d7f58921cb28057694 /rdiff-backup/rdiff_backup/Security.py | |
parent | 5165ed8454768cae04330ac3b060f66b6595a17d (diff) | |
download | rdiff-backup-138291d78ab8fbf63f3a5a299afcc186641e45ba.tar.gz |
Fixed the remote destination restore and no increment restore bugs.
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@184 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/rdiff_backup/Security.py')
-rw-r--r-- | rdiff-backup/rdiff_backup/Security.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/rdiff-backup/rdiff_backup/Security.py b/rdiff-backup/rdiff_backup/Security.py index 7f193aa..95b8296 100644 --- a/rdiff-backup/rdiff_backup/Security.py +++ b/rdiff-backup/rdiff_backup/Security.py @@ -10,8 +10,8 @@ """Functions to make sure remote requests are kosher""" -import sys -import Globals, tempfile +import sys, tempfile +import Globals, Main from rpath import * class Violation(Exception): @@ -67,6 +67,8 @@ def set_security_level(action, cmdpairs): rdir = tempfile.gettempdir() elif islocal(cp1): sec_level = "read-only" + rdir = Main.restore_get_root(RPath(Globals.local_connection, + getpath(cp1)))[0].path else: assert islocal(cp2) sec_level = "all" @@ -89,7 +91,8 @@ def set_security_level(action, cmdpairs): else: assert 0, "Unknown action %s" % action Globals.security_level = sec_level - Globals.restrict_path = rdir + Globals.restrict_path = RPath(Globals.local_connection, + rdir).normalize().path def set_allowed_requests(sec_level): """Set the allowed requests list using the security level""" @@ -111,7 +114,9 @@ def set_allowed_requests(sec_level): "Time.setcurtime_local", "Resume.ResumeCheck", "HLSourceStruct.split_initial_dsiter", - "HLSourceStruct.get_diffs_and_finalize"]) + "HLSourceStruct.get_diffs_and_finalize", + "RPathStatic.gzip_open_local_read", + "RPathStatic.open_local_read"]) if sec_level == "update-only": allowed_requests. \ extend(["Log.open_logfile_local", "Log.close_logfile_local", |