Diff for /servers/slapd/back-ldap/modrdn.c between versions 1.38 and 1.38.2.4

version 1.38, 2004/11/13 13:43:30 version 1.38.2.4, 2005/08/09 21:04:02
Line 1 Line 1
 /* modrdn.c - ldap backend modrdn function */  /* modrdn.c - ldap backend modrdn function */
 /* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/modrdn.c,v 1.37 2004/10/01 09:16:38 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/back-ldap/modrdn.c,v 1.43 2005/08/02 20:48:30 ando Exp $ */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
  * Copyright 1999-2004 The OpenLDAP Foundation.   * Copyright 1999-2005 The OpenLDAP Foundation.
  * Portions Copyright 1999-2003 Howard Chu.   * Portions Copyright 1999-2003 Howard Chu.
  * Portions Copyright 2000-2003 Pierangelo Masarati.   * Portions Copyright 2000-2003 Pierangelo Masarati.
  * All rights reserved.   * All rights reserved.
Line 43  ldap_back_modrdn( Line 43  ldap_back_modrdn(
         int             rc = LDAP_SUCCESS;          int             rc = LDAP_SUCCESS;
         char            *newSup = NULL;          char            *newSup = NULL;
   
         lc = ldap_back_getconn( op, rs );          lc = ldap_back_getconn( op, rs, LDAP_BACK_SENDERR );
         if ( !lc || !ldap_back_dobind( lc, op, rs ) ) {          if ( !lc || !ldap_back_dobind( lc, op, rs, LDAP_BACK_SENDERR ) ) {
                 return( -1 );                  return rs->sr_err;
         }          }
   
         if ( op->orr_newSup ) {          if ( op->orr_newSup ) {
Line 56  ldap_back_modrdn( Line 56  ldap_back_modrdn(
         }          }
   
         ctrls = op->o_ctrls;          ctrls = op->o_ctrls;
 #ifdef LDAP_BACK_PROXY_AUTHZ  
         rc = ldap_back_proxy_authz_ctrl( lc, op, rs, &ctrls );          rc = ldap_back_proxy_authz_ctrl( lc, op, rs, &ctrls );
         if ( rc != LDAP_SUCCESS ) {          if ( rc != LDAP_SUCCESS ) {
                 send_ldap_result( op, rs );                  send_ldap_result( op, rs );
                 rc = -1;                  rc = -1;
                 goto cleanup;                  goto cleanup;
         }          }
 #endif /* LDAP_BACK_PROXY_AUTHZ */  
   
 retry:  retry:
         rs->sr_err = ldap_rename( lc->lc_ld, op->o_req_ndn.bv_val,          rs->sr_err = ldap_rename( lc->lc_ld, op->o_req_ndn.bv_val,
                         op->orr_newrdn.bv_val, newSup,                          op->orr_newrdn.bv_val, newSup,
                         op->orr_deleteoldrdn, ctrls, NULL, &msgid );                          op->orr_deleteoldrdn, ctrls, NULL, &msgid );
         rc = ldap_back_op_result( lc, op, rs, msgid, 1 );          rc = ldap_back_op_result( lc, op, rs, msgid, LDAP_BACK_SENDRESULT );
         if ( rs->sr_err == LDAP_SERVER_DOWN && do_retry ) {          if ( rs->sr_err == LDAP_SERVER_DOWN && do_retry ) {
                 do_retry = 0;                  do_retry = 0;
                 if ( ldap_back_retry( lc, op, rs ) ) {                  if ( ldap_back_retry( lc, op, rs, LDAP_BACK_SENDERR ) ) {
                         goto retry;                          goto retry;
                 }                  }
         }          }
   
 cleanup:  cleanup:
 #ifdef LDAP_BACK_PROXY_AUTHZ  
         (void)ldap_back_proxy_authz_ctrl_free( op, &ctrls );          (void)ldap_back_proxy_authz_ctrl_free( op, &ctrls );
 #endif /* LDAP_BACK_PROXY_AUTHZ */  
           if ( lc != NULL ) {
                   ldap_back_release_conn( op, rs, lc );
           }
   
         return rc;          return rc;
 }  }

Removed from v.1.38  
changed lines
  Added in v.1.38.2.4


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org