[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: (ITS#4038) crash in slapi_entry_attr_set_charptr
On Sat, 24 Sep 2005 01:36 am, Pierangelo Masarati wrote:
> On Thu, 2005-09-22 at 05:01 +0000, andrewb@cse.unsw.edu.au wrote:
> > Â Â Â Â /* check if the entry contains the "gecos" attribute */
> > Â Â Â Â if (entry == NULL || slapi_entry_attr_find(entry, "gecos", &attr)
> > != 0) return 0;
>
> If the intention of this bit of code is to skip entries that already
> contain the "gecos" attribute then it's incorrect, since reading the
> code it appears that slapi_entry_attr_find() returns 0 if the requested
> attribute is __present__.
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.
Andrew