slap_access_t access_level;
const char *attr;
regmatch_t matches[MAXREMATCHES];
- int st_same_attr = 0;
assert( op != NULL );
assert( e != NULL );
ret = 0;
control = ACL_BREAK;
- if ( st_same_attr ) {
-#if 0
- assert( state->as_vd_acl != NULL );
-#endif
-
+ if ( state && state->as_vd_ad == desc ) {
a = state->as_vd_acl;
count = state->as_vd_acl_count;
- if ( !ACL_IS_INVALID( state->as_vd_acl_mask ) ) {
- mask = state->as_vd_acl_mask;
- AC_MEMCPY( matches, state->as_vd_acl_matches, sizeof(matches) );
- goto vd_access;
- }
} else {
if ( state ) state->as_vi_acl = NULL;
a = NULL;
- ACL_PRIV_ASSIGN( mask, *maskp );
count = 0;
- memset( matches, '\0', sizeof( matches ) );
}
+ ACL_PRIV_ASSIGN( mask, *maskp );
+ memset( matches, '\0', sizeof( matches ) );
while ( ( a = slap_acl_get( a, &count, op, e, desc, val,
MAXREMATCHES, matches, state ) ) != NULL )
slap_mask_t mask;
slap_access_t access_level;
const char *attr;
- int st_same_attr = 0;
static AccessControlState state_init = ACL_STATE_INIT;
assert( e != NULL );
return state->as_result;
}
-#if 0
- else if ( ( state->as_recorded & ACL_STATE_RECORDED_VD ) &&
- val != NULL && state->as_vd_acl == NULL )
- {
- return state->as_result;
- }
-#endif
- st_same_attr = 1;
} else {
*state = state_init;
}
-
- state->as_vd_ad = desc;
}
Debug( LDAP_DEBUG_ACL,
state->as_result = ret;
}
state->as_recorded |= ACL_STATE_RECORDED;
+ state->as_vd_ad = desc;
}
if ( be_null ) op->o_bd = NULL;
if ( maskp ) ACL_PRIV_ASSIGN( *maskp, mask );
state->as_recorded |= ACL_STATE_RECORDED_VD;
state->as_vd_acl = prev;
state->as_vd_acl_count = *count - 1;
- ACL_INVALIDATE( state->as_vd_acl_mask );
}
if ( a->acl_attrval_style == ACL_STYLE_REGEX ) {
AccessControl *as_vd_acl;
AttributeDescription *as_vd_ad;
- slap_mask_t as_vd_acl_mask;
slap_acl_state_t as_recorded;
- regmatch_t as_vd_acl_matches[MAXREMATCHES];
int as_vd_acl_count;
int as_result;
} AccessControlState;
-#define ACL_STATE_INIT { NULL, NULL, NULL, 0UL, \
- ACL_STATE_NOT_RECORDED, { { 0, 0 } }, 0, 0 }
+#define ACL_STATE_INIT { NULL, NULL, NULL, \
+ ACL_STATE_NOT_RECORDED, 0, 0 }
/*
* Backend-info