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

Re: (ITS#4038) crash in slapi_entry_attr_set_charptr



On Sat, 24 Sep 2005 06:28 pm, Pierangelo Masarati wrote:
> I see.  After trying your piece of code, I noted that
> slapi_entry_attr_set_charptr() calls attr_free on data that is supposed
> to be read-only, because it is the entry structure that is contained in
> the cache of back-bdb.  I'm not enough familiar with SLAPI code but
> either you specified an incorrect type of preoperation, or SLAPI code
> should have provided a duplicate of the entry to allow you to modify it.

Thanks. I'm not very familiar with SLAPI either (and can't find a canonical 
set of docs for the OpenLDAP implementation of it), but your comments 
provided enough information to work around the problem. I now call 
slapi_entry_dup() to get a copy of the entry, and then modify the copy.

Feel free to close this issue, although there is a more general issue of SLAPI 
documentation here.

Andrew