https://bugzilla.redhat.com/show_bug.cgi?id=450989
Resolves: bug 450989
Bug Description: The memberOf plug-in is currently hardcoded to use
the "member" and "memberOf" attributes for group membership. These
attributes should be configurable.
Reviewed by: ???
Files: see diff
Branch: HEAD
Fix Description: The fix allows these attributes to be configured in the
plug-in
configuration entry. The configuration can be dynamically changed
over LDAP
with the server running. We ensure that the configuration doesn't
change while
a memberOf operation is in progress by obtaining the memberOf lock
while the
changes are applied. I also made the filter that is used to check if
a group
membership change is made a part of the configuration struct since it
is based
off of one of the configurable attributes.
In addition to the above changes, I removed an unnecessary function
that was
wrapping slapi_str2filter(). The previous code was doing a malloc of
the filter
string, needlessly duplicating the string, then creating the
Slapi_Filter (which
does a malloc as well). The two copies of the filter string were then
just
free'd. This was inefficient, so I removed the wrapper function so
that we
simply malloc the filter string and pass it to slapi_str2filter() to
allocate
the Slapi_Filter. This saves us one malloc/free.
Platforms tested: F9 i386
Flag Day: No.
Doc impact: Yes, the config attributes will need to be doc'd.
https://bugzilla.redhat.com/attachment.cgi?id=309023&action=diff
https://bugzilla.redhat.com/attachment.cgi?id=309024
https://bugzilla.redhat.com/attachment.cgi?id=309025