26.19. slapi_vattr_filter_test()

Tests a filter against a single entry.
Description

This function supports the case where the filter specifies virtual attributes. Performance for a real-attribute-only filter is the same as that for slapi_filter_test().

Syntax

#include "slapi-plugin.h"
int slapi_vattr_filter_test( Slapi_PBlock *pb, Slapi_Entry *e, struct slapi_filter *f, int verify_access);

Parameters

This function takes the following parameters:

pb
Parameter block containing information about the filter.
e
Entry against which the filter is to be tested.
f
Filter against which the entry is to be tested.
verify_access
Access control:
  • 0 if access checking is not to be done; that is, bypass any access control.
  • 1 if access checking must be done; that is, verify that the current user has access rights to search the specified entry.
Returns

This function returns one of the following values:

  • 0 if the filter matched.
  • -1 if the filter did not match.
  • An LDAP error code (an integer greater than zero) if an error occurs.