front-end.
.SH WARNING
.B "This backend's calling conventions have changed since OpenLDAP 2.0."
-The operations receive a new "opid:" (operation ID) line, to be used
-instead of "msgid:".
-The "msgid:" line will be removed in a future version.
-Also, abandon now gets a new "abandonid:" line.
+The abandon operation now gets a new "pid:" line.
+The "msgid:" lines will be removed in a future version.
.SH CONFIGURATION
These
.B slapd.conf
.B abandon <pathname> <argument>...
.nf
ABANDON
-opid: <operation ID>
msgid: <message ID of operation to abandon>
<repeat { "suffix:" <database suffix DN> }>
-abandonid: <operation ID of operation to abandon>
+pid: <process ID of operation to abandon>
.fi
.TP
.B add <pathname> <argument>...
.nf
ADD
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
<entry in LDIF format>
.fi
.B bind <pathname> <argument>...
.nf
BIND
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
dn: <DN>
method: <method number>
.B compare <pathname> <argument>...
.nf
COMPARE
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
dn: <DN>
<attribute>: <value>
.B delete <pathname> <argument>...
.nf
DELETE
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
dn: <DN>
.fi
.B modify <pathname> <argument>...
.nf
MODIFY
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
dn: <DN>
<repeat {
.B modrdn <pathname> <argument>...
.nf
MODRDN
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
dn: <DN>
newrdn: <new RDN>
.B search <pathname> <argument>...
.nf
SEARCH
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
base: <base DN>
scope: <0-2, see ldap.h>
.B unbind <pathname> <argument>...
.nf
UNBIND
-opid: <operation ID>
-msgid: <message ID>
+msgid: <message id>
<repeat { "suffix:" <database suffix DN> }>
dn: <bound DN>
.fi
.LP
-An
-.I operation ID
-is a "connection ID/message ID" string identifying an operation.
-.LP
Note that you need only supply configuration lines for those commands you
want the backend to handle.
Operations for which a command is not supplied will be refused with an
break;
}
}
- if( pid == -1 ) {
- LDAP_STAILQ_FOREACH( o, &conn->c_pending_ops, o_next ) {
- if ( o->o_msgid == msgid ) {
- pid = (pid_t) o->o_private;
- break;
- }
- }
- }
- ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
+ }
+ ldap_pvt_thread_mutex_unlock( &conn->c_mutex );
+
+ if ( pid == -1 ) {
+ Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n", msgid, 0, 0 );
+ return 0;
+ }
- if ( pid != -1 ) {
- Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n",
+ /* no abandon command defined - just kill the process handling it */
+ if ( si->si_abandon == NULL ) {
+ Debug( LDAP_DEBUG_ARGS, "shell killing pid %d\n",
(int) pid, 0, 0 );
- kill( pid, SIGTERM );
- } else {
- Debug( LDAP_DEBUG_ARGS, "shell could not find op %d\n",
- msgid, 0, 0 );
- }
+ kill( pid, SIGTERM );
return 0;
}
/* write out the request to the abandon process */
fprintf( wfp, "ABANDON\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %d\n", msgid );
print_suffixes( wfp, be );
- fprintf( wfp, "abandonid: %ld/%d\n", op->o_connid, msgid );
+ fprintf( wfp, "pid: %ld\n", (long) pid );
fclose( wfp );
/* no result from abandon */
/* write out the request to the add process */
fprintf( wfp, "ADD\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
ldap_pvt_thread_mutex_lock( &entry2str_mutex );
/* write out the request to the bind process */
fprintf( wfp, "BIND\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "dn: %s\n", dn->bv_val );
/* write out the request to the compare process */
fprintf( wfp, "COMPARE\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "dn: %s\n", dn->bv_val );
/* write out the request to the delete process */
fprintf( wfp, "DELETE\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "dn: %s\n", dn->bv_val );
/* write out the request to the modify process */
fprintf( wfp, "MODIFY\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "dn: %s\n", dn->bv_val );
/* write out the request to the modrdn process */
fprintf( wfp, "MODRDN\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "dn: %s\n", dn->bv_val );
/* write out the request to the search process */
fprintf( wfp, "SEARCH\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "base: %s\n", base->bv_val );
/* write out the request to the unbind process */
fprintf( wfp, "UNBIND\n" );
- fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
print_suffixes( wfp, be );
fprintf( wfp, "dn: %s\n", (conn->c_dn.bv_len ? conn->c_dn.bv_val : "") );