1 /* unbind.c - shell backend unbind function */
8 #include <sys/socket.h>
22 struct shellinfo *si = (struct shellinfo *) be->be_private;
25 if ( si->si_unbind == NULL ) {
26 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
27 "unbind not implemented" );
31 if ( (op->o_private = forkandexec( si->si_unbind, &rfp, &wfp ))
33 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
34 "could not fork/exec" );
38 /* write out the request to the unbind process */
39 fprintf( wfp, "UNBIND\n" );
40 fprintf( wfp, "msgid: %d\n", op->o_msgid );
41 print_suffixes( wfp, be );
42 fprintf( wfp, "dn: %s\n", dn );
45 /* no response to unbind */