[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: slapacl back-port to 2.1?

> On Tue, 4 May 2004 at 11:23pm, Pierangelo Masarati wrote:
>> patch access_allowed() to take the extra
>> arg that allows to get the access mask.
> My problem right now, is in seeing that you renamed access_allowed to
> access_allowed_mask in acl.c, but not seeing how you connected all the
> references to access_allowed from all the back-X routines to the new
> function...
> I think I'm missing something very basic.

There's a define in proto-slap.h that passes a NULL
as the new argument when not required (e.g. by
regular usage).  This was the least impacting way
I could find to avoid duplication of code/bugs thru
access check and simultaneously getting the mask
instead of the go/nogo.

Another way could be to change access_allowed into
a routine that returns the mask, and implement
access_allowed as a wrapper that compares the
returned mask to the requested access.

Mmmmh, this sounds even cleaner...


Pierangelo Masarati

    SysNet - via Dossi,8 27100 Pavia Tel: +390382573859 Fax: +390382476497