1 /* bind.c - shell backend bind function */
24 struct shellinfo *si = (struct shellinfo *) be->be_private;
30 if ( si->si_bind == NULL ) {
31 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
32 "bind not implemented" );
36 if ( (op->o_private = forkandexec( si->si_bind, &rfp, &wfp ))
38 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
39 "could not fork/exec" );
43 /* write out the request to the bind process */
44 fprintf( wfp, "BIND\n" );
45 fprintf( wfp, "msgid: %ld\n", op->o_msgid );
46 print_suffixes( wfp, be );
47 fprintf( wfp, "dn: %s\n", dn );
48 fprintf( wfp, "method: %d\n", method );
49 fprintf( wfp, "credlen: %lu\n", cred->bv_len );
50 fprintf( wfp, "cred: %s\n", cred->bv_val ); /* XXX */
53 /* read in the results and send them along */
54 rc = read_and_send_results( be, conn, op, rfp, NULL, 0 );