rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/increment.py


From: Andrew Ferguson
Subject: [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/increment.py
Date: Sat, 14 Jun 2008 16:35:25 +0000

CVSROOT:        /sources/rdiff-backup
Module name:    rdiff-backup
Changes by:     Andrew Ferguson <owsla> 08/06/14 16:35:25

Modified files:
        .              : CHANGELOG 
        rdiff_backup   : increment.py 

Log message:
        Fix another case where rdiff-backup fails because it has insufficient
        permissions on a file it owns.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.273&r2=1.274
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/increment.py?cvsroot=rdiff-backup&r1=1.35&r2=1.36

Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.273
retrieving revision 1.274
diff -u -b -r1.273 -r1.274
--- CHANGELOG   11 Jun 2008 20:10:58 -0000      1.273
+++ CHANGELOG   14 Jun 2008 16:35:25 -0000      1.274
@@ -1,6 +1,10 @@
 New in v1.1.16 (????/??/??)
 ---------------------------
 
+Fix another case where rdiff-backup fails because it has insufficient
+permissions on a file it owns. Thanks to Peter Schuller for the test
+case. (Andrew Ferguson)
+
 Don't abort if can't read extended attributes or ACL because the path is
 considered bad by the EA/ACL subsystem; print a warning instead. Problem
 reported by Farkas Levente. (Andrew Ferguson)

Index: rdiff_backup/increment.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/increment.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -b -r1.35 -r1.36
--- rdiff_backup/increment.py   23 Nov 2005 23:16:32 -0000      1.35
+++ rdiff_backup/increment.py   14 Jun 2008 16:35:25 -0000      1.36
@@ -79,13 +79,22 @@
        if compress: diff = get_inc(incpref, "diff.gz")
        else:  diff = get_inc(incpref, "diff")
 
-       if Globals.process_uid != 0 and not new.readable():
+       old_new_perms, old_mirror_perms = (None, None)
+
+       if Globals.process_uid != 0:
                # Check for unreadable files
+               if not new.readable():
                old_new_perms = new.getperms()
                new.chmod(0400 | old_new_perms)
+               if not mirror.readable():
+                       old_mirror_perms = mirror.getperms()
+                       mirror.chmod(0400 | old_mirror_perms)
+       
                Rdiff.write_delta(new, mirror, diff, compress)
-               new.chmod(old_new_perms)
-       else: Rdiff.write_delta(new, mirror, diff, compress)
+
+       if old_new_perms: new.chmod(old_new_perms)
+       if old_mirror_perms: mirror.chmod(old_mirror_perms)
+
        rpath.copy_attribs_inc(mirror, diff)
        return diff
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]