49.4. slapi_operation_is_flag_set()

Description

This function determines whether the specified flag is set in the operation. The code sample below demonstrates how ACL checks for internal operations are skipped if the plug-in specifies to not check for access control.

if (operation_is_flag_set(operation, SLAPI_OP_FLAG_NO_ACCESS_CHECK)) 
return LDAP_SUCCESS; 
// Success indicates that access is allowed.
Syntax

#include "slapi-plugin.h"
int slapi_operation_is_flag_set(Slapi_Operation *op, unsigned long flag)

Parameter

This function takes the following parameters:

op
Operation data structure.
flag
Flag to check. There are three possible flags:
SLAPI_OP_FLAG_NO_ACCESS_CHECK flag, which specifies that access control should not be checked.
SLAPI_OPERATION_FLAG_INTERNAL flag, which is set for any internal operation.
SLAPI_OP_FLAG_NEVER_CHAIN flag, which specifies that disables chaining.
Returns

This function returns 0 if the flag is not set and a non-zero value if the flag is set.