summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2004-05-18 06:46:30 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2004-05-18 06:46:30 +0000
commitb0c898f70573bfc982ebf6caa9af892182df5080 (patch)
treefdb1e0b79b15b1ec0a5a39d5055fcfdb0d4556e2
parent977ad2081502ace96ac0bd2485b524ee6d9fd1ad (diff)
downloadrdiff-backup-b0c898f70573bfc982ebf6caa9af892182df5080.tar.gz
Check all groups for permission
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@529 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
-rw-r--r--rdiff-backup/CHANGELOG3
-rw-r--r--rdiff-backup/rdiff_backup/Globals.py1
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py4
3 files changed, 6 insertions, 2 deletions
diff --git a/rdiff-backup/CHANGELOG b/rdiff-backup/CHANGELOG
index 5cbefd8..4b9158d 100644
--- a/rdiff-backup/CHANGELOG
+++ b/rdiff-backup/CHANGELOG
@@ -10,6 +10,9 @@ Fix by Dean Gaudet for --calculate-average mode (it broke somewhere in
Fix for regress warning code: rdiff-backup should warn you if you are
trying to back up a directory into itself.
+Now when determining group permissions check supplementary groups as
+well as main group. (Bug report by Ryan Castle.)
+
New in v0.13.4 (2004/01/31)
---------------------------
diff --git a/rdiff-backup/rdiff_backup/Globals.py b/rdiff-backup/rdiff_backup/Globals.py
index cfb0e1a..3c8584a 100644
--- a/rdiff-backup/rdiff_backup/Globals.py
+++ b/rdiff-backup/rdiff_backup/Globals.py
@@ -49,6 +49,7 @@ server = None
# vary depending on the connection.
process_uid = os.getuid()
process_gid = os.getgid()
+process_groups = os.getgroups()
# If true, when copying attributes, also change target's uid/gid
change_ownership = None
diff --git a/rdiff-backup/rdiff_backup/rpath.py b/rdiff-backup/rdiff_backup/rpath.py
index f069964..d2547bf 100644
--- a/rdiff-backup/rdiff_backup/rpath.py
+++ b/rdiff-backup/rdiff_backup/rpath.py
@@ -840,8 +840,8 @@ class RPath(RORPath):
return uid == 0 or uid == self.data['uid']
def isgroup(self):
- """Return true if current process is in group of rp"""
- return self.conn.Globals.get('process_gid') == self.data['gid']
+ """Return true if process has group of rp"""
+ return self.data['gid'] in self.conn.Globals.get('process_groups')
def delete(self):
"""Delete file at self.path. Recursively deletes directories."""