summaryrefslogtreecommitdiff
path: root/rdiff-backup/rdiff_backup
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 /rdiff-backup/rdiff_backup
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
Diffstat (limited to 'rdiff-backup/rdiff_backup')
-rw-r--r--rdiff-backup/rdiff_backup/Globals.py1
-rw-r--r--rdiff-backup/rdiff_backup/rpath.py4
2 files changed, 3 insertions, 2 deletions
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."""