]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/add.c
Remove abandon cruft
[openldap] / servers / slapd / back-ldbm / add.c
index 1a8424f53d0cf709ab99496ce9e980314289c31c..059abb031189cfb3ed8d1572005687e892c08922 100644 (file)
@@ -97,14 +97,13 @@ ldbm_back_add(
                        if ( matched != NULL ) {
                                matched_dn = ch_strdup( matched->e_dn );
                                refs = is_entry_referral( matched )
-                                       ? get_entry_referrals( be, conn, op, matched,
-                                               e->e_dn, LDAP_SCOPE_DEFAULT )
+                                       ? get_entry_referrals( be, conn, op, matched )
                                        : NULL;
                                cache_return_entry_r( &li->li_cache, matched );
 
                        } else {
                                refs = referral_rewrite( default_referral,
-                                       NULL, e->e_dn, LDAP_SCOPE_DEFAULT );
+                                       NULL, &e->e_name, LDAP_SCOPE_DEFAULT );
                        }
 
 #ifdef NEW_LOGGING
@@ -176,8 +175,7 @@ ldbm_back_add(
                        /* parent is a referral, don't allow add */
                        char *matched_dn = ch_strdup( p->e_dn );
                        struct berval **refs = is_entry_referral( p )
-                               ? get_entry_referrals( be, conn, op, p,
-                                       e->e_dn, LDAP_SCOPE_DEFAULT )
+                               ? get_entry_referrals( be, conn, op, p )
                                : NULL;
 
                        /* free parent and writer lock */
@@ -205,9 +203,8 @@ ldbm_back_add(
                }
 
                /* no parent, must be adding entry to root */
-               if ( !be_isroot( be, op->o_ndn ) ) {
-                       if ( be_issuffix( be, "" ) 
-                                       || be_isupdate( be, op->o_ndn ) ) {
+               if ( !be_isroot( be, &op->o_ndn ) ) {
+                       if ( be_issuffix( be, "" ) || be_isupdate( be, &op->o_ndn ) ) {
                                p = (Entry *)&slap_entry_root;
                                
                                rc = access_allowed( be, conn, op, p,