1 /* bind.c - shell backend bind function */
27 struct shellinfo *si = (struct shellinfo *) be->be_private;
33 if ( si->si_bind == NULL ) {
34 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
35 "bind not implemented", NULL, NULL );
39 if ( (op->o_private = (void *) forkandexec( si->si_bind, &rfp, &wfp ))
41 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
42 "could not fork/exec", NULL, NULL );
46 /* write out the request to the bind process */
47 fprintf( wfp, "BIND\n" );
48 fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
49 print_suffixes( wfp, be );
50 fprintf( wfp, "dn: %s\n", dn );
51 fprintf( wfp, "method: %d\n", method );
52 fprintf( wfp, "credlen: %lu\n", cred->bv_len );
53 fprintf( wfp, "cred: %s\n", cred->bv_val ); /* XXX */
56 /* read in the results and send them along */
57 rc = read_and_send_results( be, conn, op, rfp, NULL, 0 );