int nmatch,
regmatch_t *matches,
int count,
- AccessControlState *state );
+ AccessControlState *state,
+ slap_access_t access );
static int regex_matches(
struct berval *pat, char *str, char *buf,
}
control = slap_acl_mask( a, &mask, op,
- e, desc, val, MAXREMATCHES, matches, count, state );
+ e, desc, val, MAXREMATCHES, matches, count, state, access );
if ( control != ACL_BREAK ) {
break;
int nmatch,
regmatch_t *matches,
int count,
- AccessControlState *state )
+ AccessControlState *state,
+ slap_access_t access )
{
int i;
Access *b;
char accessmaskbuf[ACCESSMASK_MAXLEN];
#endif /* DEBUG */
const char *attr;
- slap_mask_t a2pmask = ACL_ACCESS2PRIV( *mask );
+ slap_mask_t a2pmask = ACL_ACCESS2PRIV( access );
assert( a != NULL );
assert( mask != NULL );
*mask = modmask;
}
- a2pmask = *mask;
-
Debug( LDAP_DEBUG_ACL,
"<= acl_mask: [%d] mask: %s\n",
i, accessmask2str(*mask, accessmaskbuf, 1), 0 );
bvalsp = a->a_nvals;
}
}
- }
- if ( bvalsp ) {
- p->bvals = slap_set_join( p->cookie, p->bvals,
- ( '|' | SLAP_SET_RREF ), bvalsp );
+ if ( bvalsp ) {
+ p->bvals = slap_set_join( p->cookie, p->bvals,
+ ( '|' | SLAP_SET_RREF ), bvalsp );
+ }
}
} else {
if ( rc != LDAP_SUCCESS ) {
Debug( LDAP_DEBUG_TRACE,
"%s acl_set_gather: DN=\"%s\" normalize failed\n",
- cp->asc_op->o_log_prefix, op2.o_req_dn.bv_val, 0 );
+ cp->asc_op->o_log_prefix, ludp->lud_dn, 0 );
goto url_done;
}
AclSetCookie cookie;
if ( default_set_attribute == NULL ) {
- ber_dupbv_x( &set, subj, op->o_tmpmemctx );
+ set = *subj;
} else {
struct berval subjdn, ndn = BER_BVNULL;
acl_set_gather,
(SetCookie *)&cookie, &set,
&op->o_ndn, &e->e_nname, NULL ) > 0 );
- slap_sl_free( set.bv_val, op->o_tmpmemctx );
+ if ( set.bv_val != subj->bv_val ) {
+ slap_sl_free( set.bv_val, op->o_tmpmemctx );
+ }
}
return(rc);