From ac1c7dc4c578fcd583d2ca1d6feb6caef184c30b Mon Sep 17 00:00:00 2001 From: owsla Date: Sat, 31 Jan 2009 18:11:18 +0000 Subject: Improve error message if regress operation fails due to Security Violation. git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@1018 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 ++- rdiff-backup/rdiff_backup/Main.py | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 032dfe3..559aa80 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -1,7 +1,8 @@ New in v1.3.2 (????/??/??) --------------------------- - +Improve error message if regress operation fails due to Security Violation. +Thanks to Grzegorz Marszalek for the bug report. (Andrew Ferguson) New in v1.3.1 (2009/01/27) diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index c697542..62aae83 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -919,4 +919,9 @@ def checkdest_if_necessary(dest_rp): if need_check == 1: Log("Previous backup seems to have failed, regressing " "destination now.", 2) - dest_rp.conn.regress.Regress(dest_rp) + try: + dest_rp.conn.regress.Regress(dest_rp) + except Security.Violation: + Log.FatalError("Security violation while attempting to regress " + "destination, perhaps due to --restrict-read-only " + "or --restrict-update-only.") -- cgit v1.2.1