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/rpath.py


From: Andrew Ferguson
Subject: [Rdiff-backup-commits] rdiff-backup CHANGELOG rdiff_backup/rpath.py
Date: Wed, 08 Aug 2007 21:08:45 +0000

CVSROOT:        /sources/rdiff-backup
Module name:    rdiff-backup
Changes by:     Andrew Ferguson <owsla> 07/08/08 21:08:45

Modified files:
        .              : CHANGELOG 
        rdiff_backup   : rpath.py 

Log message:
        Handle failed attempts to set the sticky bit

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/CHANGELOG?cvsroot=rdiff-backup&r1=1.237&r2=1.238
http://cvs.savannah.gnu.org/viewcvs/rdiff-backup/rdiff_backup/rpath.py?cvsroot=rdiff-backup&r1=1.109&r2=1.110

Patches:
Index: CHANGELOG
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/CHANGELOG,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -b -r1.237 -r1.238
--- CHANGELOG   31 Jul 2007 14:51:14 -0000      1.237
+++ CHANGELOG   8 Aug 2007 21:08:45 -0000       1.238
@@ -1,6 +1,10 @@
 New in v1.1.13 (????/??/??)
 ---------------------------
 
+Gracefully handle situations where rdiff-backup tries to set the sticky
+bit on non-directory files on systems that don't support that action.
+Thanks to Jim Nasby for the bug report. (Andrew Ferguson)
+
 Prevent the extended filenames / UTF-8 test from raising an exception
 on broken CIFS configurations which transform some characters to '?'.
 Problem reported by Luca Cappe. (Andrew Ferguson)

Index: rdiff_backup/rpath.py
===================================================================
RCS file: /sources/rdiff-backup/rdiff-backup/rdiff_backup/rpath.py,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -b -r1.109 -r1.110
--- rdiff_backup/rpath.py       12 Jul 2007 04:06:11 -0000      1.109
+++ rdiff_backup/rpath.py       8 Aug 2007 21:08:45 -0000       1.110
@@ -829,7 +829,19 @@
 
        def chmod(self, permissions):
                """Wrapper around os.chmod"""
+               try:
                self.conn.os.chmod(self.path, permissions & 
Globals.permission_mask)
+               except OSError, exc:
+                       if exc[0] == errno.EFTYPE and not self.isdir():
+                               # Some systems throw this error if try to set 
sticky bit
+                               # on a non-directory. Remove sticky bit and try 
again.
+                               log.Log("Unable to set permissions of %s to %o 
- trying again"
+                                               "without sticky bit (%o)" % 
(self.path, permissions,
+                                               permissions & 06777), 2)
+                               self.conn.os.chmod(self.path, permissions
+                                                                               
          & 06777 & Globals.permission_mask)
+                       else:
+                               raise
                self.data['perms'] = permissions
 
        def settime(self, accesstime, modtime):




reply via email to

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