Determines if an entry contains the specified attribute. If the entry contains the attribute, the function returns a pointer to the attribute.
#include "slapi-plugin.h" int slapi_entry_attr_find( const Slapi_Entry *e, const char *type, Slapi_Attr **attr );
This function takes the following parameters:
Entry that you want to check.
Name of the attribute that you want to check.
Pointer to the attribute, if the attribute is in the entry.
This function returns 0 if the entry contains the specified attribute; otherwise it returns -1.
Do not free the returned attr. It is a pointer to the internal entry data structure. It is usually wise to make a copy of the returned attr, using slapi_attr_dup(), to avoid dangling pointers if the entry is freed while the pointer to attr is still being used.