[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [rdiff-backup-users] hasfullperms(), isgroup() and funny indexes
From: |
Martin Pool |
Subject: |
Re: [rdiff-backup-users] hasfullperms(), isgroup() and funny indexes |
Date: |
Tue, 18 May 2004 17:56:22 +1000 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On 17 May 2004, Ben Escoto <address@hidden> wrote:
> >>>>> Ben Escoto <address@hidden>
> >>>>> wrote the following on Mon, 17 May 2004 18:37:16 -0700
>
> > Someone please correct this if it's wrong. I really haven't used
> > groups much---the above is just my intuitive understanding.
>
> Oops, as Ryan suggested, this is all wrong. (The group stuff on my
> laptop seems to be broken, so I didn't notice this.) I guess all the
> groups are checked for permission. I just changed isgroup() in
> rpath.py from
>
> return self.conn.Globals.get('process_gid') == self.data['gid']
>
> to
>
> return self.data['gid'] in self.conn.Globals.get('process_groups')
>
> Hopefully this fixes the problem.
The process groups is a bit strange: a process has a primary group
and a set of supplementary groups. The primary group is not
necessarily in the list of supplementary groups, which is what I
suppose process_groups holds. So you need to check both.
But why don't you just use access() to see if you have access?
--
Martin
signature.asc
Description: Digital signature