[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
back-meta needs NVALUES support (ITS#2716)
Full_Name: Howard Chu
Version: HEAD
OS:
URL:
Submission from: (NULL) (24.126.120.178)
Submitted by: hyc
I just noticed that back-meta doesn't initialize the a_nvals field in attributes
of entries that it returns during a search. This violates the rule that all
entries inside slapd must have attr->a_nvals non-NULL, and will cause segfaults
if anyone applies ACLs to a back-meta backend.
The code in slapd/add.c:slap_entry2mods() that deals with attribute
normalization shouldn't be there, the attributes should already be normalized
when an entry is passed to it. (Move that work into back-meta, or put it into
its own function to be shared by any other backend that needs it. back-ldap
already does the right thing, and most of the other backends that talk to
external data sources use str2entry() which also does the right thing.)
Also note that currently there is a difference in behavior between attribute
values in a Modification vs in an Entry: in a Mod we set sm_nvalues to NULL if
there is no normalizer for the attribute. In an entry we set a_nvals equal to
a_vals. (Perhaps we should change Mods to be consistent with Entries, but there
will be a few loose ends to chase down if we change this now.)