]> git.sur5r.net Git - openldap/commitdiff
fix previous commit (related to ITS#5804)
authorPierangelo Masarati <ando@openldap.org>
Sat, 15 Nov 2008 10:42:18 +0000 (10:42 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sat, 15 Nov 2008 10:42:18 +0000 (10:42 +0000)
servers/slapd/acl.c
servers/slapd/proto-slap.h
servers/slapd/slap.h

index 377b5b9b4ff131f73aec7619e6153b2ceecb9028..6243a3edf68210d9333a2be111c227fc5707581d 100644 (file)
@@ -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;
index da6425096b81566e07feaefd8a4d19b26b595f73..86ecb4e9eac3d06e154228f4bba48e2c4b114cf2 100644 (file)
@@ -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,
index 9a699456d3eced23274a6c3d7753e2f0c3ad896e..4faacb00763b22541161d2403eac70e59b1efcf8 100644 (file)
@@ -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