]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-shell/unbind.c
Don't reeval expression
[openldap] / servers / slapd / back-shell / unbind.c
index 8cbd1116b988d21785f45ee85efda9435aa92aca..d5d936106e6a865b083709476c271dd7545e8e6e 100644 (file)
@@ -1,7 +1,7 @@
 /* unbind.c - shell backend unbind function */
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 
@@ -26,15 +26,11 @@ shell_back_unbind(
        FILE                    *rfp, *wfp;
 
        if ( si->si_unbind == NULL ) {
-               send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
-                   "unbind not implemented", NULL, NULL );
                return 0;
        }
 
        if ( (op->o_private = (void *) forkandexec( si->si_unbind, &rfp, &wfp ))
            == (void *) -1 ) {
-               send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
-                   "could not fork/exec", NULL, NULL );
                return 0;
        }
 
@@ -42,7 +38,7 @@ shell_back_unbind(
        fprintf( wfp, "UNBIND\n" );
        fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
        print_suffixes( wfp, be );
-       fprintf( wfp, "dn: %s\n", (conn->c_dn ? conn->c_dn : "") );
+       fprintf( wfp, "dn: %s\n", (conn->c_dn.bv_len ? conn->c_dn.bv_val : "") );
        fclose( wfp );
 
        /* no response to unbind */