]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/add.c
Debug output: printed soc_cname, should be soc_cname.bv_val
[openldap] / servers / slapd / back-ldbm / add.c
index 9bb32cd762d2c5bb639b4e1e1d0010c35c25e45f..39b03af185049c18647e2d3224afd6a9a163c0d7 100644 (file)
@@ -2,7 +2,7 @@
 /* $OpenLDAP$ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *
- * Copyright 1998-2004 The OpenLDAP Foundation.
+ * Copyright 1998-2005 The OpenLDAP Foundation.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@ ldbm_back_add(
                op->o_req_dn.bv_val, 0, 0);
        
        rs->sr_err = entry_schema_check( op->o_bd, op->oq_add.rs_e, NULL,
-               &rs->sr_text, textbuf, textlen );
+               get_manageDIT(op), &rs->sr_text, textbuf, textlen );
 
        if ( rs->sr_err != LDAP_SUCCESS ) {
                Debug( LDAP_DEBUG_TRACE, "entry failed schema check: %s\n",
@@ -55,13 +55,14 @@ ldbm_back_add(
                send_ldap_result( op, rs );
                return rs->sr_err;
        }
+       rs->sr_text = NULL;
 
 #ifdef LDBM_SUBENTRIES
        subentry = is_entry_subentry( op->oq_add.rs_e );
 #endif
 
        if ( !access_allowed( op, op->oq_add.rs_e,
-                               entry, NULL, ACL_WRITE, NULL ) )
+                               entry, NULL, ACL_WADD, NULL ) )
        {
                Debug( LDAP_DEBUG_TRACE, "no write access to entry\n", 0,
                    0, 0 );
@@ -130,7 +131,7 @@ ldbm_back_add(
                        return rs->sr_err;
                }
 
-               if ( ! access_allowed( op, p, children, NULL, ACL_WRITE, NULL ) ) {
+               if ( ! access_allowed( op, p, children, NULL, ACL_WADD, NULL ) ) {
                        /* free parent and writer lock */
                        cache_return_entry_w( &li->li_cache, p ); 
                        ldap_pvt_thread_rdwr_wunlock(&li->li_giant_rwlock);