HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
38 Functions for managing roles
This chapter contains reference information on routines that help you deal with roles.
Table 38-1 Routines for roles
DescriptionFunction
Checks if the entry pointed to by entry_to_check contains the role indicated
by role_dn.
“slapi_role_check()”
Allows registering of another function, other than the default, to use in
“slapi_role_check()” .
“slapi_register_role_check()”
38.1 slapi_role_check()
Checks if the entry pointed to by entry_to_check contains the role indicated by role_dn.
Syntax
#include "slapi-plugin.h"
int slapi_role_check(Slapi_Entry *entry_to_check, Slapi_DN *role_dn,int *present);
Parameters This function takes the following parameters:
The entry in which the presence of a role is to be checked.
entry_to_check
The DN of the role for which to check.
role_dn
Pointer to an integer where the result, present or not present, will be placed.
present
Returns This function returns one of the following values:
0 for success; if role_dnis present in entry_to_check, present is set to 0.
A nonzero value (error condition) if the presence of the role is undetermined.
38.2 slapi_register_role_check()
Allows registering of another function, other than the default, to use in “slapi_role_check()”. It
is strongly recommended that the default should be used.
Syntax
#include "slapi-plugin.h"
void slapi_register_role_check(roles_check_fn_type check_fn);
Parameters This function takes the following parameter:
Function for registering.
check_fn
38.1 slapi_role_check() 307