24.11. slapi_entry_attr_find()
#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:
|
e
| Entry that you want to check. |
|
type
| Name of the attribute that you want to check. |
|
attr
| Pointer to the attribute, if the attribute is in the entry. |
This function returns one of the following values:
- 0 if the entry contains the specified attribute.
- -1 if the entry does not contain the specified attribute.
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.

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.