Skip to content
Snippets Groups Projects
Commit 654f21b2 authored by Juan Gomez's avatar Juan Gomez
Browse files

Implemented newSuperior handling.

parent 6cd76805
No related branches found
No related tags found
No related merge requests found
......@@ -60,6 +60,9 @@ perl_back_modrdn(
XPUSHs(sv_2mortal(newSVpv( dn , 0 )));
XPUSHs(sv_2mortal(newSVpv( newrdn , 0 )));
XPUSHs(sv_2mortal(newSViv( deleteoldrdn )));
if ( newSuperior != NULL ) {
XPUSHs(sv_2mortal(newSVpv( newSuperior , 0 )));
}
PUTBACK ;
count = perl_call_method("modrdn", G_SCALAR);
......
......@@ -57,6 +57,9 @@ shell_back_modrdn(
fprintf( wfp, "dn: %s\n", dn );
fprintf( wfp, "newrdn: %s\n", newrdn );
fprintf( wfp, "deleteoldrdn: %d\n", deleteoldrdn ? 1 : 0 );
if (newSuperior != NULL) {
fprintf( wfp, "newSuperior: %s\n", newSuperior );
}
fclose( wfp );
/* read in the results and send them along */
......
/* modrdn.c - tcl modify rdn routines
*
* $Id: tcl_modrdn.c,v 1.5 1999/02/28 04:55:49 bcollins Exp $
* $Id: tcl_modrdn.c,v 1.6 1999/03/05 02:42:46 gomez Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
......@@ -55,10 +55,17 @@ tcl_back_modrdn (
suf_tcl = Tcl_Merge (i, be->be_suffix);
command = (char *) ch_malloc (strlen (ti->ti_modrdn) + strlen (suf_tcl)
+ strlen (dn) + strlen (newrdn) + 64);
sprintf (command, "%s MODRDN {%ld} {%s} {%s} {%s} %d",
ti->ti_add, op->o_msgid, suf_tcl, dn, newrdn, deleteoldrdn
? 1 : 0);
+ strlen (dn) + strlen (newrdn)
+ (newSuperior ? strlen(newSuperior) : 0) + 64);
if ( newSuperior ) {
sprintf (command, "%s MODRDN {%ld} {%s} {%s} {%s} %d {%s}",
ti->ti_add, op->o_msgid, suf_tcl, dn, newrdn,
deleteoldrdn ? 1 : 0, newSuperior );
} else {
sprintf (command, "%s MODRDN {%ld} {%s} {%s} {%s} %d",
ti->ti_add, op->o_msgid, suf_tcl, dn, newrdn,
deleteoldrdn ? 1 : 0 );
}
Tcl_Free (suf_tcl);
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment