1 /* delete.c - shell backend delete function */
8 #include <sys/socket.h>
20 struct shellinfo *si = (struct shellinfo *) be->be_private;
23 if ( si->si_delete == NULL ) {
24 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
25 "delete not implemented" );
29 if ( (op->o_private = forkandexec( si->si_delete, &rfp, &wfp ))
31 send_ldap_result( conn, op, LDAP_OPERATIONS_ERROR, NULL,
32 "could not fork/exec" );
36 /* write out the request to the delete process */
37 fprintf( wfp, "DELETE\n" );
38 fprintf( wfp, "msgid: %d\n", op->o_msgid );
39 print_suffixes( wfp, be );
40 fprintf( wfp, "dn: %s\n", dn );
43 /* read in the results and send them along */
44 read_and_send_results( be, conn, op, rfp, NULL, 0 );