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

Re: (ITS#4038) crash in slapi_entry_attr_set_charptr

On Fri, 2005-09-23 at 22:55 +0000, andrewb@cse.unsw.edu.au wrote:

> No, the intention is to find entries which contain the "gecos" attribute, and 
> replace the value of that attribute on those entries only. That part of the 
> code seems to work correctly -- entries wihout a "gecos" attribute are 
> returned unmodified.

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.
A third option is that you didn't follow the right procedure in
modifying the data.


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