]> git.sur5r.net Git - openldap/commitdiff
get posixgroup.c compiling again
authorLuke Howard <lukeh@padl.com>
Wed, 30 Mar 2011 13:35:27 +0000 (00:35 +1100)
committerLuke Howard <lukeh@padl.com>
Wed, 30 Mar 2011 13:35:27 +0000 (00:35 +1100)
contrib/slapd-modules/acl/posixgroup.c

index e44e4468f5e825048b98c33a4b5cb79ace8701f0..9cbee5e652d14361570a1fd4970794b90bdccce6 100644 (file)
@@ -164,7 +164,7 @@ pg_dynacl_unparse(
 static int
 pg_dynacl_mask(
        void                    *priv,
-       struct slap_op          *op,
+       Operation               *op,
        Entry                   *target,
        AttributeDescription    *desc,
        struct berval           *val,
@@ -190,7 +190,7 @@ pg_dynacl_mask(
                rc = LDAP_SUCCESS;
 
        } else {
-               user_be = op->o_bd = select_backend( &op->o_ndn, 0, 0 );
+               user_be = op->o_bd = select_backend( &op->o_ndn, 0 );
                if ( op->o_bd == NULL ) {
                        op->o_bd = be;
                        return 0;
@@ -207,13 +207,17 @@ pg_dynacl_mask(
        if ( pg->pg_style == ACL_STYLE_EXPAND ) {
                char            buf[ 1024 ];
                struct berval   bv;
+               AclRegexMatches amatches = { 0 };
+
+               amatches.dn_count = nmatch;
+               AC_MEMCPY( amatches.dn_data, matches, sizeof( amatches.dn_data ) );
 
                bv.bv_len = sizeof( buf ) - 1;
                bv.bv_val = buf;
 
                if ( acl_string_expand( &bv, &pg->pg_pat,
-                               target->e_nname.bv_val,
-                               nmatch, matches ) )
+                               &target->e_nname,
+                               NULL, &amatches ) )
                {
                        goto cleanup;
                }
@@ -234,7 +238,7 @@ pg_dynacl_mask(
                rc = LDAP_SUCCESS;
 
        } else {
-               group_be = op->o_bd = select_backend( &group_ndn, 0, 0 );
+               group_be = op->o_bd = select_backend( &group_ndn, 0 );
                if ( op->o_bd == NULL ) {
                        goto cleanup;
                }