From: Pierangelo Masarati Date: Sat, 15 Nov 2008 10:42:18 +0000 (+0000) Subject: fix previous commit (related to ITS#5804) X-Git-Tag: ACLCHECK_0~1104 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a86fae235b3af625a9c63dbe6f788318a428b2fd;p=openldap fix previous commit (related to ITS#5804) --- diff --git a/servers/slapd/acl.c b/servers/slapd/acl.c index 377b5b9b4f..6243a3edf6 100644 --- a/servers/slapd/acl.c +++ b/servers/slapd/acl.c @@ -120,7 +120,7 @@ slap_access_always_allowed( ( sizeof ( (m)->dn_data ) / sizeof( *(m)->dn_data ) ) #define MATCHES_VALMAXCOUNT(m) \ ( sizeof ( (m)->val_data ) / sizeof( *(m)->val_data ) ) -#define MATCHES_MEMSET(m) { \ +#define MATCHES_MEMSET(m) do { \ memset( (m)->dn_data, '\0', sizeof( (m)->dn_data ) ); \ memset( (m)->val_data, '\0', sizeof( (m)->val_data ) ); \ (m)->dn_count = MATCHES_DNMAXCOUNT( (m) ); \ @@ -1809,7 +1809,7 @@ slap_acl_mask( * an API update */ (void)da->da_mask( da->da_private, op, e, desc, - val, matches.dn_count, matches.dn_data, + val, matches->dn_count, matches->dn_data, &grant, &deny ); tgrant |= grant; diff --git a/servers/slapd/proto-slap.h b/servers/slapd/proto-slap.h index da6425096b..86ecb4e9ea 100644 --- a/servers/slapd/proto-slap.h +++ b/servers/slapd/proto-slap.h @@ -46,13 +46,6 @@ LDAP_SLAPD_F (int) dynacl_aci_init LDAP_P(( void )); /* * acl.c */ -typedef struct AclRegexMatches { - int dn_count; - regmatch_t dn_data[MAXREMATCHES]; - int val_count; - regmatch_t val_data[MAXREMATCHES]; -} AclRegexMatches; - LDAP_SLAPD_F (int) access_allowed_mask LDAP_P(( Operation *op, Entry *e, AttributeDescription *desc, struct berval *val, diff --git a/servers/slapd/slap.h b/servers/slapd/slap.h index 9a699456d3..4faacb0076 100644 --- a/servers/slapd/slap.h +++ b/servers/slapd/slap.h @@ -1547,6 +1547,13 @@ typedef struct AccessControlState { #define ACL_STATE_INIT { NULL, NULL, NULL, \ ACL_STATE_NOT_RECORDED, 0, 0, 0 } +typedef struct AclRegexMatches { + int dn_count; + regmatch_t dn_data[MAXREMATCHES]; + int val_count; + regmatch_t val_data[MAXREMATCHES]; +} AclRegexMatches; + /* * Backend-info * represents a backend