e->e_dn, attr );
#endif
- assert( be != NULL );
assert( e != NULL );
assert( attr != NULL );
assert( access > ACL_NONE );
+ if ( op == NULL ) {
+ /* no-op call */
+ return 1;
+ }
+
+ if ( be == NULL ) be = &backends[0];
+ assert( be != NULL );
+
/* grant database root access */
if ( be != NULL && be_isroot( be, op->o_ndn ) ) {
#ifdef NEW_LOGGING
int i;
Attribute *a;
- if ( be != NULL && ! access_allowed( be, conn, op, e,
+ if ( !access_allowed( be, conn, op, e,
ava->aa_desc, ava->aa_value, ACL_SEARCH ) )
{
return LDAP_INSUFFICIENT_ACCESS;
AttributeDescription *desc
)
{
- if ( be != NULL && ! access_allowed( be, conn, op, e,
- desc, NULL, ACL_SEARCH ) )
+ if ( !access_allowed( be, conn, op, e, desc, NULL, ACL_SEARCH ) )
{
return LDAP_INSUFFICIENT_ACCESS;
}
#endif
- if ( be != NULL && ! access_allowed( be, conn, op, e,
+ if ( !access_allowed( be, conn, op, e,
f->f_sub_desc, NULL, ACL_SEARCH ) )
{
return LDAP_INSUFFICIENT_ACCESS;