From f0f77945de9c8ac19dfad1d61d018ffc4078131a Mon Sep 17 00:00:00 2001 From: bescoto Date: Fri, 21 Mar 2003 17:48:06 +0000 Subject: --windows-mode now disables ownership switching git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@309 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/CHANGELOG | 3 +++ rdiff-backup/rdiff_backup/Main.py | 1 + rdiff-backup/rdiff_backup/SetConnections.py | 3 ++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG index 5aea3f0..e2a7336 100644 --- a/rdiff-backup/CHANGELOG +++ b/rdiff-backup/CHANGELOG @@ -6,6 +6,9 @@ Kempe for report.) Added --list-at-time option at request of Farkas Levente. +Don't change ownership if --windows-mode option is given. (Bug report +by Keith Edmunds.) + New in v0.11.4 (2003/03/15) --------------------------- diff --git a/rdiff-backup/rdiff_backup/Main.py b/rdiff-backup/rdiff_backup/Main.py index 2cf55ae..76527ce 100644 --- a/rdiff-backup/rdiff_backup/Main.py +++ b/rdiff-backup/rdiff_backup/Main.py @@ -148,6 +148,7 @@ def parse_cmdlineoptions(arglist): Globals.set('chars_to_quote', "A-Z:") Globals.set('quoting_enabled', 1) Globals.set('preserve_hardlinks', 0) + Globals.set('change_ownership', 0) else: Log.FatalError("Unknown option %s" % opt) def isincfilename(path): diff --git a/rdiff-backup/rdiff_backup/SetConnections.py b/rdiff-backup/rdiff_backup/SetConnections.py index 62cff00..e5d081e 100644 --- a/rdiff-backup/rdiff_backup/SetConnections.py +++ b/rdiff-backup/rdiff_backup/SetConnections.py @@ -203,7 +203,8 @@ def BackupInitConnections(reading_conn, writing_conn): writing_conn.Globals.set("isbackup_writer", 1) UpdateGlobal("backup_reader", reading_conn) UpdateGlobal("backup_writer", writing_conn) - if writing_conn.os.getuid() == 0: UpdateGlobal('change_ownership', 1) + if writing_conn.os.getuid() == 0 and Globals.change_ownership != 0: + UpdateGlobal('change_ownership', 1) def CloseConnections(): """Close all connections. Run by client""" -- cgit v1.2.1