]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/acl.c
Fix ITS#3424
[openldap] / servers / slapd / acl.c
index 64a939cac1421830f23781af16cfa2224cc83c47..d7cb98d2aee0ebf847f00a000a07f6ba9ef56737 100644 (file)
@@ -2025,27 +2025,18 @@ aci_set_gather( SetCookie *cookie, struct berval *name, AttributeDescription *de
        
        p.cookie = cookie;
        
+       op2.o_hdr = cp->op->o_hdr;
        op2.o_tag = LDAP_REQ_SEARCH;
-       op2.o_protocol = LDAP_VERSION3;
        op2.o_ndn = op2.o_bd->be_rootndn;
        op2.o_callback = &cb;
        op2.o_time = slap_get_time();
        op2.o_do_not_cache = 1;
        op2.o_is_auth_check = 0;
-       op2.o_threadctx = cp->op->o_threadctx;
-       op2.o_tmpmemctx = cp->op->o_tmpmemctx;
-       op2.o_tmpmfuncs = cp->op->o_tmpmfuncs;
-#ifdef LDAP_SLAPI
-       op2.o_pb = cp->op->o_pb;
-#endif
-       op2.o_conn = cp->op->o_conn;
-       op2.o_connid = cp->op->o_connid;
        ber_dupbv_x( &op2.o_req_dn, &op2.o_req_ndn, cp->op->o_tmpmemctx );
        op2.ors_slimit = SLAP_NO_LIMIT;
        op2.ors_tlimit = SLAP_NO_LIMIT;
        op2.ors_attrs = anlistp;
        op2.ors_attrsonly = 0;
-       op2.o_sync_slog_size = -1;
 
        cb.sc_private = &p;
 
@@ -2854,28 +2845,11 @@ static slap_dynacl_t    dynacl_aci = {
        NULL
 };
 
-#endif /* SLAPD_ACI_ENABLED */
+#endif /* SLAP_DYNACL */
 
-int
-aci_init( void )
-{
-       slap_dynacl_t   *known_dynacl[] = {
-#ifdef SLAPD_ACI_ENABLED
-               &dynacl_aci,
-#endif  /* SLAPD_ACI_ENABLED */
-               NULL
-       };
-       int             i, rc;
+#endif /* SLAPD_ACI_ENABLED */
 
-       for ( i = 0; known_dynacl[ i ]; i++ ) {
-               rc = slap_dynacl_register( known_dynacl[ i ] ); 
-               if ( rc ) {
-                       return rc;
-               }
-       }
-       
-       return 0;
-}
+#ifdef SLAP_DYNACL
 
 /*
  * dynamic ACL infrastructure
@@ -2935,23 +2909,26 @@ slap_dynacl_get( const char *name )
 int
 acl_init( void )
 {
+       int             i, rc;
 #ifdef SLAP_DYNACL
-       int             rc;
-
-       da_list = NULL;
-
+       slap_dynacl_t   *known_dynacl[] = {
 #ifdef SLAPD_ACI_ENABLED
-       rc = aci_init();
-       if ( rc ) {
-               return rc;
+               &dynacl_aci,
+#endif  /* SLAPD_ACI_ENABLED */
+               NULL
+       };
+
+       for ( i = 0; known_dynacl[ i ]; i++ ) {
+               rc = slap_dynacl_register( known_dynacl[ i ] ); 
+               if ( rc ) {
+                       return rc;
+               }
        }
-#endif /* SLAPD_ACI_ENABLED */
 #endif /* SLAP_DYNACL */
 
        return 0;
 }
 
-
 static int
 string_expand(
        struct berval   *bv,