Resolves: bug 457260
Bug Description: The dnaFilter configuration setting is supposed to be
against an entry to determine if a particular managed range applies to
I have found that it is not used properly. Here's what I have observed:
- Configure two managed ranges. One is for the uidNumber for
"objectclass=posixAccount" entries. The second is for the gidNumber
- Add a new "posixAccount" entry without specifying a "uidNumber"
"gidNumber" attribute value.
The user will be successfully added, and both "uidNumber" and
will be generated for the new entry, even though the configuration
only the "uidNumber" should be generated.
Reviewed by: ???
Files: see diff
Fix Description: The problem is related to the way we load the dnaFilter
the configuration entries. Our cached configuration entries in the
contain a string representation of the filter in addition to a
based off of that string. The problem is that we call
create the Slapi_Filter, but we store the pointer to it in our char *
that is supposed to be the filter string.
This fix simply stores the Slapi_Filter in the proper member of the
struct. With this fix, the test in comment#1 properly rejects adding
"posixAccount" with no "gidNumber" attribute specified. If one
specifies a "gidNumber" when adding the entry, the entry is added
and the "uidNumber" value is generated by the DNA plug-in.
Platforms tested: Fedora 8 x86_64
Flag Day: no
Doc impact: no