Chapter 38. Functions for Managing Roles

This chapter contains reference information on routines that help you deal with roles.

Table 38.1. Routines for Roles

Function Description
slapi_role_check() Checks if the entry pointed to by entry_to_check contains the role indicated by role_dn.
slapi_register_role_check() Allows registering of another function, other than the default, to use in slapi_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:

entry_to_check
The entry in which the presence of a role is to be checked.
role_dn
The DN of the role for which to check.
present
Pointer to an integer where the result, present or not present, will be placed.
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 non-zero value (error condition) if the presence of the role is undetermined.