]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/modrdn.c
Import cache_delete_entry_internal/dntree&idtree delete fix from -devel.
[openldap] / servers / slapd / back-shell / modrdn.c
index 9fd793317d19e6de0f0cf1d64722c60f4047512e..ad7cc5ad4123b6c2001adb22cb9041996f180542 100644 (file)
@@ -1,13 +1,16 @@
 /* modrdn.c - shell backend modrdn function */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
 #include "slap.h"
 #include "shell.h"
 
-void
+int
 shell_back_modrdn(
     Backend    *be,
     Connection *conn,
@@ -23,19 +26,19 @@ shell_back_modrdn(
        if ( si->si_modrdn == NULL ) {
                send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
                    "modrdn not implemented" );
-               return;
+               return( -1 );
        }
 
        if ( (op->o_private = forkandexec( si->si_modrdn, &rfp, &wfp ))
            == -1 ) {
                send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
                    "could not fork/exec" );
-               return;
+               return( -1 );
        }
 
        /* write out the request to the modrdn process */
        fprintf( wfp, "MODRDN\n" );
-       fprintf( wfp, "msgid: %d\n", op->o_msgid );
+       fprintf( wfp, "msgid: %ld\n", op->o_msgid );
        print_suffixes( wfp, be );
        fprintf( wfp, "dn: %s\n", dn );
        fprintf( wfp, "newrdn: %s\n", newrdn );
@@ -45,4 +48,5 @@ shell_back_modrdn(
        /* read in the results and send them along */
        read_and_send_results( be, conn, op, rfp, NULL, 0 );
        fclose( rfp );
+       return( 0 );
 }