X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fback-sql%2Fmodrdn.c;h=1ae9e9372503a02ab6fc6a51fe547b2366e9a430;hb=8fe328dd518d02e8eea9f36068e13671c9cb8093;hp=1e6805a7fd3ff7220443c50de6b465143265fc90;hpb=9066d1429095c0648097fd9c9ded110c28e85e85;p=openldap diff --git a/servers/slapd/back-sql/modrdn.c b/servers/slapd/back-sql/modrdn.c index 1e6805a7fd..1ae9e93725 100644 --- a/servers/slapd/back-sql/modrdn.c +++ b/servers/slapd/back-sql/modrdn.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1999-2007 The OpenLDAP Foundation. + * Copyright 1999-2012 The OpenLDAP Foundation. * Portions Copyright 1999 Dmitry Kovalev. * Portions Copyright 2002 Pierangelo Masarati. * All rights reserved. @@ -107,13 +107,9 @@ backsql_modrdn( Operation *op, SlapReply *rs ) goto done; } -#ifdef BACKSQL_ARBITRARY_KEY - Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(): entry id=%s\n", - e_id.eid_id.bv_val, 0, 0 ); -#else /* ! BACKSQL_ARBITRARY_KEY */ - Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(): entry id=%ld\n", - e_id.eid_id, 0, 0 ); -#endif /* ! BACKSQL_ARBITRARY_KEY */ + Debug( LDAP_DEBUG_TRACE, + " backsql_modrdn(): entry id=" BACKSQL_IDFMT "\n", + BACKSQL_IDARG(e_id.eid_id), 0, 0 ); if ( get_assert( op ) && ( test_filter( op, &r, get_assertion( op ) ) @@ -171,15 +167,9 @@ backsql_modrdn( Operation *op, SlapReply *rs ) slap_anlist_all_attributes, BACKSQL_ISF_GET_ENTRY ); -#ifdef BACKSQL_ARBITRARY_KEY - Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(): " - "old parent entry id is %s\n", - bsi.bsi_base_id.eid_id.bv_val, 0, 0 ); -#else /* ! BACKSQL_ARBITRARY_KEY */ - Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(): " - "old parent entry id is %ld\n", - bsi.bsi_base_id.eid_id, 0, 0 ); -#endif /* ! BACKSQL_ARBITRARY_KEY */ + Debug( LDAP_DEBUG_TRACE, + " backsql_modrdn(): old parent entry id is " BACKSQL_IDFMT "\n", + BACKSQL_IDARG(bsi.bsi_base_id.eid_id), 0, 0 ); if ( rs->sr_err != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, "backsql_modrdn(): " @@ -234,15 +224,9 @@ backsql_modrdn( Operation *op, SlapReply *rs ) n_id = bsi.bsi_base_id; -#ifdef BACKSQL_ARBITRARY_KEY - Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(): " - "new parent entry id=%s\n", - n_id.eid_id.bv_val, 0, 0 ); -#else /* ! BACKSQL_ARBITRARY_KEY */ - Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(): " - "new parent entry id=%ld\n", - n_id.eid_id, 0, 0 ); -#endif /* ! BACKSQL_ARBITRARY_KEY */ + Debug( LDAP_DEBUG_TRACE, + " backsql_modrdn(): new parent entry id=" BACKSQL_IDFMT "\n", + BACKSQL_IDARG(n_id.eid_id), 0, 0 ); if ( !access_allowed( op, &n, slap_schema.si_ad_children, NULL, ACL_WADD, NULL ) ) { @@ -320,7 +304,7 @@ backsql_modrdn( Operation *op, SlapReply *rs ) rc = backsql_BindParamBerVal( sth, 1, SQL_PARAM_INPUT, &realnew_dn ); if ( rc != SQL_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, - " backsql_add_attr(): " + " backsql_modrdn(): " "error binding DN parameter for objectClass %s\n", oc->bom_oc->soc_cname.bv_val, 0, 0 ); backsql_PrintErrors( bi->sql_db_env, dbh, @@ -336,7 +320,7 @@ backsql_modrdn( Operation *op, SlapReply *rs ) rc = backsql_BindParamID( sth, 2, SQL_PARAM_INPUT, &n_id.eid_id ); if ( rc != SQL_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, - " backsql_add_attr(): " + " backsql_modrdn(): " "error binding parent ID parameter for objectClass %s\n", oc->bom_oc->soc_cname.bv_val, 0, 0 ); backsql_PrintErrors( bi->sql_db_env, dbh, @@ -352,7 +336,7 @@ backsql_modrdn( Operation *op, SlapReply *rs ) rc = backsql_BindParamID( sth, 3, SQL_PARAM_INPUT, &e_id.eid_keyval ); if ( rc != SQL_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, - " backsql_add_attr(): " + " backsql_modrdn(): " "error binding entry ID parameter for objectClass %s\n", oc->bom_oc->soc_cname.bv_val, 0, 0 ); backsql_PrintErrors( bi->sql_db_env, dbh, @@ -368,7 +352,7 @@ backsql_modrdn( Operation *op, SlapReply *rs ) rc = backsql_BindParamID( sth, 4, SQL_PARAM_INPUT, &e_id.eid_id ); if ( rc != SQL_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, - " backsql_add_attr(): " + " backsql_modrdn(): " "error binding ID parameter for objectClass %s\n", oc->bom_oc->soc_cname.bv_val, 0, 0 ); backsql_PrintErrors( bi->sql_db_env, dbh, @@ -455,7 +439,7 @@ backsql_modrdn( Operation *op, SlapReply *rs ) e_id = bsi.bsi_base_id; - rs->sr_err = entry_schema_check( op, &r, NULL, 0, 0, + rs->sr_err = entry_schema_check( op, &r, NULL, 0, 0, NULL, &rs->sr_text, textbuf, sizeof( textbuf ) ); if ( rs->sr_err != LDAP_SUCCESS ) { Debug( LDAP_DEBUG_TRACE, " backsql_modrdn(\"%s\"): "