mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-24 13:24:56 +08:00
Patch: Non-unique msgid for abandon in back-<shell,tcl> (ITS#1793)
================ Written by Hallvard B. Furuseth and placed into the public domain. This software is not subject to any license of the University of Oslo. ================ Here is a patch which does what I described. Of course, someone has to decide if that is the right solution:-) - Add an "opid:" line to the input to back-shell commands. - Add an "abandonid: <opid> line to back-shell/abandon input. - Replace message id with opid in back-tcl arguments. - Add an abandonid = <opid> argument to back-tcl/abandon. An opid (operation ID) is a "connection ID/message ID" string. I would have liked to use another name to avoid confusion with struct slap_op->o_opid, but I could not think of another apt word. This also fixes ITS#1784 and ITS#1792. Since calling conventions changed anyway, I fixed back-shell by adding abandonid: and making opid: always be the ID of the current operation. Hallvard B. Furuseth <h.b.furuseth@usit.uio.no>, May 2002.
This commit is contained in:
parent
2ab8810555
commit
15e6a98bba
@ -13,6 +13,12 @@ executes external programs to implement operations, and is designed to
|
|||||||
make it easy to tie an existing database to the
|
make it easy to tie an existing database to the
|
||||||
.B slapd
|
.B slapd
|
||||||
front-end.
|
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.
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
These
|
These
|
||||||
.B slapd.conf
|
.B slapd.conf
|
||||||
@ -30,14 +36,17 @@ Each option is followed by the input lines that the program receives:
|
|||||||
.B abandon <pathname> <argument>...
|
.B abandon <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
ABANDON
|
ABANDON
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID of operation to abandon>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
|
abandonid: <operation ID of operation to abandon>
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B add <pathname> <argument>...
|
.B add <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
ADD
|
ADD
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
<entry in LDIF format>
|
<entry in LDIF format>
|
||||||
.fi
|
.fi
|
||||||
@ -45,7 +54,8 @@ msgid: <message id>
|
|||||||
.B bind <pathname> <argument>...
|
.B bind <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
BIND
|
BIND
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
dn: <DN>
|
dn: <DN>
|
||||||
method: <method number>
|
method: <method number>
|
||||||
@ -56,7 +66,8 @@ cred: <credentials>
|
|||||||
.B compare <pathname> <argument>...
|
.B compare <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
COMPARE
|
COMPARE
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
dn: <DN>
|
dn: <DN>
|
||||||
<attribute>: <value>
|
<attribute>: <value>
|
||||||
@ -65,7 +76,8 @@ dn: <DN>
|
|||||||
.B delete <pathname> <argument>...
|
.B delete <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
DELETE
|
DELETE
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
dn: <DN>
|
dn: <DN>
|
||||||
.fi
|
.fi
|
||||||
@ -73,7 +85,8 @@ dn: <DN>
|
|||||||
.B modify <pathname> <argument>...
|
.B modify <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
MODIFY
|
MODIFY
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
dn: <DN>
|
dn: <DN>
|
||||||
<repeat {
|
<repeat {
|
||||||
@ -86,7 +99,8 @@ dn: <DN>
|
|||||||
.B modrdn <pathname> <argument>...
|
.B modrdn <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
MODRDN
|
MODRDN
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
dn: <DN>
|
dn: <DN>
|
||||||
newrdn: <new RDN>
|
newrdn: <new RDN>
|
||||||
@ -97,7 +111,8 @@ deleteoldrdn: <0 or 1>
|
|||||||
.B search <pathname> <argument>...
|
.B search <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
SEARCH
|
SEARCH
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
base: <base DN>
|
base: <base DN>
|
||||||
scope: <0-2, see ldap.h>
|
scope: <0-2, see ldap.h>
|
||||||
@ -112,11 +127,16 @@ attrs: <"all" or space-separated attribute list>
|
|||||||
.B unbind <pathname> <argument>...
|
.B unbind <pathname> <argument>...
|
||||||
.nf
|
.nf
|
||||||
UNBIND
|
UNBIND
|
||||||
msgid: <message id>
|
opid: <operation ID>
|
||||||
|
msgid: <message ID>
|
||||||
<repeat { "suffix:" <database suffix DN> }>
|
<repeat { "suffix:" <database suffix DN> }>
|
||||||
dn: <bound DN>
|
dn: <bound DN>
|
||||||
.fi
|
.fi
|
||||||
.LP
|
.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
|
Note that you need only supply configuration lines for those commands you
|
||||||
want the backend to handle.
|
want the backend to handle.
|
||||||
Operations for which a command is not supplied will be refused with an
|
Operations for which a command is not supplied will be refused with an
|
||||||
|
@ -14,6 +14,13 @@ interpreter into
|
|||||||
Any tcl database section of the configuration file
|
Any tcl database section of the configuration file
|
||||||
.BR slapd.conf (5)
|
.BR slapd.conf (5)
|
||||||
must then specify what Tcl script to use.
|
must then specify what Tcl script to use.
|
||||||
|
.SH WARNING
|
||||||
|
.B "This backend's calling conventions have changed since OpenLDAP 2.0."
|
||||||
|
Previously, the 2nd argument to the procs was a message ID.
|
||||||
|
Now they are an "operation ID" string.
|
||||||
|
Also, proc abandon now gets a new
|
||||||
|
.B abandonid
|
||||||
|
argument.
|
||||||
.SH CONFIGURATION
|
.SH CONFIGURATION
|
||||||
These
|
These
|
||||||
.B slapd.conf
|
.B slapd.conf
|
||||||
@ -57,28 +64,29 @@ So global variables, as well as all the procs, are callable between databases.
|
|||||||
If no tclrealm is specified, it is put into the "default" realm.
|
If no tclrealm is specified, it is put into the "default" realm.
|
||||||
.SH Variables passed to the procs
|
.SH Variables passed to the procs
|
||||||
.TP
|
.TP
|
||||||
.B abandon { action msgid suffix }
|
.B abandon { action opid suffix abandonid }
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to ABANDON.
|
action - Always equal to ABANDON.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es) associated with the
|
suffix - List of suffix(es) associated with the
|
||||||
call. Each one is an entry in a tcl
|
call. Each one is an entry in a tcl
|
||||||
formatted list (surrounded by {}'s).
|
formatted list (surrounded by {}'s).
|
||||||
|
abandonid - The opid of the operation to abandon.
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B add "{ action msgid suffix entry }"
|
.B add "{ action opid suffix entry }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to ADD.
|
action - Always equal to ADD.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
entry - Full entry to add. Each "type: val" is
|
entry - Full entry to add. Each "type: val" is
|
||||||
an element in a tcl formatted list.
|
an element in a tcl formatted list.
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B bind "{ action msgid suffix dn method cred_len cred }"
|
.B bind "{ action opid suffix dn method cred_len cred }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to BIND.
|
action - Always equal to BIND.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
dn - DN being bound to.
|
dn - DN being bound to.
|
||||||
method - One of the ldap authentication methods.
|
method - One of the ldap authentication methods.
|
||||||
@ -89,28 +97,28 @@ cred - Credentials being used to authenticate,
|
|||||||
bind (??)
|
bind (??)
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B compare "{ action msgid suffix dn ava_type ava_value }"
|
.B compare "{ action opid suffix dn ava_type ava_value }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to COMPARE.
|
action - Always equal to COMPARE.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
dn - DN for compare.
|
dn - DN for compare.
|
||||||
ava_type - Type for comparison.
|
ava_type - Type for comparison.
|
||||||
ava_value - Value to compare.
|
ava_value - Value to compare.
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B delete "{ action msgid suffix dn }"
|
.B delete "{ action opid suffix dn }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to DELETE.
|
action - Always equal to DELETE.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
dn - DN to delete.
|
dn - DN to delete.
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B modify "{ action msgid suffix dn mods }"
|
.B modify "{ action opid suffix dn mods }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to MODIFY.
|
action - Always equal to MODIFY.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
dn - DN to modify.
|
dn - DN to modify.
|
||||||
mods - Tcl list of modifications.
|
mods - Tcl list of modifications.
|
||||||
@ -128,10 +136,10 @@ mods - Tcl list of modifications.
|
|||||||
(ADD, DELETE, REPLACE).
|
(ADD, DELETE, REPLACE).
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B modrdn "{ action msgid suffix dn newrdn deleteoldrdn }"
|
.B modrdn "{ action opid suffix dn newrdn deleteoldrdn }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to MODRDN.
|
action - Always equal to MODRDN.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
dn - DN whose RDN is being renamed.
|
dn - DN whose RDN is being renamed.
|
||||||
newrdn - New RDN.
|
newrdn - New RDN.
|
||||||
@ -140,11 +148,11 @@ deleteoldrdn - Boolean stating whether or not the
|
|||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B
|
.B
|
||||||
search { action msgid suffix base scope deref \
|
search { action opid suffix base scope deref \
|
||||||
sizelimit timelimit filterstr attrsonly attrlist }
|
sizelimit timelimit filterstr attrsonly attrlist }
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to SEARCH.
|
action - Always equal to SEARCH.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
base - Base for this search.
|
base - Base for this search.
|
||||||
scope - Scope of search, ( 0 | 1 | 2 ).
|
scope - Scope of search, ( 0 | 1 | 2 ).
|
||||||
@ -157,14 +165,19 @@ attrsonly - Boolean for whether to list only the
|
|||||||
attrlist - Tcl list if to retrieve.
|
attrlist - Tcl list if to retrieve.
|
||||||
.fi
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B unbind "{ action msgid suffix dn }"
|
.B unbind "{ action opid suffix dn }"
|
||||||
.nf
|
.nf
|
||||||
action - Always equal to UNBIND.
|
action - Always equal to UNBIND.
|
||||||
msgid - The msgid of this ldap operation.
|
opid - The opid of this ldap operation.
|
||||||
suffix - List of suffix(es), as above.
|
suffix - List of suffix(es), as above.
|
||||||
dn - DN to unbind.
|
dn - DN to unbind.
|
||||||
.fi
|
.fi
|
||||||
.LP
|
.LP
|
||||||
|
An
|
||||||
|
.I opid
|
||||||
|
(operation ID) is a "connection ID/message ID" string identifying an
|
||||||
|
operation.
|
||||||
|
.LP
|
||||||
.SH Return Method and Syntax
|
.SH Return Method and Syntax
|
||||||
There are only 2 return types.
|
There are only 2 return types.
|
||||||
All procs must return a result to show status of the operation.
|
All procs must return a result to show status of the operation.
|
||||||
|
@ -65,8 +65,10 @@ shell_back_abandon(
|
|||||||
|
|
||||||
/* write out the request to the abandon process */
|
/* write out the request to the abandon process */
|
||||||
fprintf( wfp, "ABANDON\n" );
|
fprintf( wfp, "ABANDON\n" );
|
||||||
|
fprintf( wfp, "opid: %ld/%ld\n", op->o_connid, (long) op->o_msgid );
|
||||||
fprintf( wfp, "msgid: %d\n", msgid );
|
fprintf( wfp, "msgid: %d\n", msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
|
fprintf( wfp, "abandonid: %ld/%d\n", op->o_connid, msgid );
|
||||||
fclose( wfp );
|
fclose( wfp );
|
||||||
|
|
||||||
/* no result from abandon */
|
/* no result from abandon */
|
||||||
|
@ -41,6 +41,7 @@ shell_back_add(
|
|||||||
|
|
||||||
/* write out the request to the add process */
|
/* write out the request to the add process */
|
||||||
fprintf( wfp, "ADD\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
ldap_pvt_thread_mutex_lock( &entry2str_mutex );
|
ldap_pvt_thread_mutex_lock( &entry2str_mutex );
|
||||||
|
@ -46,6 +46,7 @@ shell_back_bind(
|
|||||||
|
|
||||||
/* write out the request to the bind process */
|
/* write out the request to the bind process */
|
||||||
fprintf( wfp, "BIND\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
||||||
|
@ -48,6 +48,7 @@ shell_back_compare(
|
|||||||
|
|
||||||
/* write out the request to the compare process */
|
/* write out the request to the compare process */
|
||||||
fprintf( wfp, "COMPARE\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
||||||
|
@ -42,6 +42,7 @@ shell_back_delete(
|
|||||||
|
|
||||||
/* write out the request to the delete process */
|
/* write out the request to the delete process */
|
||||||
fprintf( wfp, "DELETE\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
||||||
|
@ -45,6 +45,7 @@ shell_back_modify(
|
|||||||
|
|
||||||
/* write out the request to the modify process */
|
/* write out the request to the modify process */
|
||||||
fprintf( wfp, "MODIFY\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
||||||
|
@ -60,6 +60,7 @@ shell_back_modrdn(
|
|||||||
|
|
||||||
/* write out the request to the modrdn process */
|
/* write out the request to the modrdn process */
|
||||||
fprintf( wfp, "MODRDN\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
fprintf( wfp, "dn: %s\n", dn->bv_val );
|
||||||
|
@ -52,6 +52,7 @@ shell_back_search(
|
|||||||
|
|
||||||
/* write out the request to the search process */
|
/* write out the request to the search process */
|
||||||
fprintf( wfp, "SEARCH\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "base: %s\n", base->bv_val );
|
fprintf( wfp, "base: %s\n", base->bv_val );
|
||||||
|
@ -36,6 +36,7 @@ shell_back_unbind(
|
|||||||
|
|
||||||
/* write out the request to the unbind process */
|
/* write out the request to the unbind process */
|
||||||
fprintf( wfp, "UNBIND\n" );
|
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 );
|
fprintf( wfp, "msgid: %ld\n", (long) op->o_msgid );
|
||||||
print_suffixes( wfp, be );
|
print_suffixes( wfp, be );
|
||||||
fprintf( wfp, "dn: %s\n", (conn->c_dn.bv_len ? conn->c_dn.bv_val : "") );
|
fprintf( wfp, "dn: %s\n", (conn->c_dn.bv_len ? conn->c_dn.bv_val : "") );
|
||||||
|
@ -38,9 +38,10 @@ tcl_back_abandon (
|
|||||||
}
|
}
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_abandon.bv_len + suf_tcl.bv_len
|
command = (char *) ch_malloc (ti->ti_abandon.bv_len + suf_tcl.bv_len
|
||||||
+ 20);
|
+ 80);
|
||||||
sprintf (command, "%s ABANDON {%ld} {%s}",
|
sprintf (command, "%s ABANDON {%ld/%ld} {%s} {%ld/%d}",
|
||||||
ti->ti_abandon.bv_val, (long) op->o_msgid, suf_tcl.bv_val);
|
ti->ti_abandon.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
|
suf_tcl.bv_val, op->o_connid, msgid);
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
|
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
|
||||||
|
@ -44,9 +44,9 @@ tcl_back_add (
|
|||||||
entrystr = tcl_clean_entry(e);
|
entrystr = tcl_clean_entry(e);
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_add.bv_len + suf_tcl.bv_len +
|
command = (char *) ch_malloc (ti->ti_add.bv_len + suf_tcl.bv_len +
|
||||||
strlen(entrystr) + 32);
|
strlen(entrystr) + 52);
|
||||||
sprintf (command, "%s ADD {%ld} {%s} {%s}",
|
sprintf (command, "%s ADD {%ld/%ld} {%s} {%s}",
|
||||||
ti->ti_add.bv_val, (long) op->o_msgid,
|
ti->ti_add.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
suf_tcl.bv_val, entrystr);
|
suf_tcl.bv_val, entrystr);
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
free (entrystr);
|
free (entrystr);
|
||||||
|
@ -46,9 +46,10 @@ tcl_back_bind (
|
|||||||
}
|
}
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_bind.bv_len + suf_tcl.bv_len +
|
command = (char *) ch_malloc (ti->ti_bind.bv_len + suf_tcl.bv_len +
|
||||||
dn->bv_len + cred->bv_len + 64);
|
dn->bv_len + cred->bv_len + 84);
|
||||||
sprintf (command, "%s BIND {%ld} {%s} {%s} {%d} {%lu} {%s}",
|
sprintf (command, "%s BIND {%ld/%ld} {%s} {%s} {%d} {%lu} {%s}",
|
||||||
ti->ti_bind.bv_val, (long) op->o_msgid, suf_tcl.bv_val,
|
ti->ti_bind.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
|
suf_tcl.bv_val,
|
||||||
dn->bv_val, method, cred->bv_len, cred->bv_val);
|
dn->bv_val, method, cred->bv_len, cred->bv_val);
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
|
|
||||||
|
@ -45,10 +45,10 @@ tcl_back_compare (
|
|||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_compare.bv_len +
|
command = (char *) ch_malloc (ti->ti_compare.bv_len +
|
||||||
suf_tcl.bv_len + dn->bv_len + ava->aa_desc->ad_cname.bv_len +
|
suf_tcl.bv_len + dn->bv_len + ava->aa_desc->ad_cname.bv_len +
|
||||||
ava->aa_value.bv_len + 64);
|
ava->aa_value.bv_len + 84);
|
||||||
sprintf (command, "%s COMPARE {%ld} {%s} {%s} {%s: %s}",
|
sprintf (command, "%s COMPARE {%ld/%ld} {%s} {%s} {%s: %s}",
|
||||||
ti->ti_compare.bv_val, (long) op->o_msgid, suf_tcl.bv_val,
|
ti->ti_compare.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
dn->bv_val,
|
suf_tcl.bv_val, dn->bv_val,
|
||||||
ava->aa_desc->ad_cname.bv_val, ava->aa_value.bv_val);
|
ava->aa_desc->ad_cname.bv_val, ava->aa_value.bv_val);
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
|
|
||||||
|
@ -43,10 +43,10 @@ tcl_back_delete (
|
|||||||
}
|
}
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_delete.bv_len + suf_tcl.bv_len
|
command = (char *) ch_malloc (ti->ti_delete.bv_len + suf_tcl.bv_len
|
||||||
+ dn->bv_len + 64);
|
+ dn->bv_len + 84);
|
||||||
sprintf (command, "%s DELETE {%ld} {%s} {%s}",
|
sprintf (command, "%s DELETE {%ld/%ld} {%s} {%s}",
|
||||||
ti->ti_delete.bv_val, (long) op->o_msgid, suf_tcl.bv_val,
|
ti->ti_delete.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
dn->bv_val);
|
suf_tcl.bv_val, dn->bv_val);
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
|
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
|
||||||
|
@ -97,11 +97,11 @@ tcl_back_modify (
|
|||||||
}
|
}
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_modify.bv_len + suf_tcl.bv_len
|
command = (char *) ch_malloc (ti->ti_modify.bv_len + suf_tcl.bv_len
|
||||||
+ dn->bv_len + strlen (tcl_mods) + 64);
|
+ dn->bv_len + strlen (tcl_mods) + 84);
|
||||||
/* This space is simply for aesthetics--\ */
|
/* This space is simply for aesthetics--\ */
|
||||||
sprintf (command, "%s MODIFY {%ld} {%s} {%s} { %s}",
|
sprintf (command, "%s MODIFY {%ld/%ld} {%s} {%s} { %s}",
|
||||||
ti->ti_modify.bv_val, (long) op->o_msgid, suf_tcl.bv_val,
|
ti->ti_modify.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
dn->bv_val, tcl_mods);
|
suf_tcl.bv_val, dn->bv_val, tcl_mods);
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
free (tcl_mods);
|
free (tcl_mods);
|
||||||
|
|
||||||
|
@ -62,10 +62,11 @@ tcl_back_modrdn (
|
|||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_modrdn.bv_len + suf_tcl.bv_len
|
command = (char *) ch_malloc (ti->ti_modrdn.bv_len + suf_tcl.bv_len
|
||||||
+ dn->bv_len + newrdn->bv_len
|
+ dn->bv_len + newrdn->bv_len
|
||||||
+ (newSuperior ? newSuperior->bv_len : 0) + 64);
|
+ (newSuperior ? newSuperior->bv_len : 0) + 84);
|
||||||
if ( newSuperior ) {
|
if ( newSuperior ) {
|
||||||
sprintf (command, "%s MODRDN {%ld} {%s} {%s} {%s} %d {%s}",
|
sprintf (command, "%s MODRDN {%ld/%ld} {%s} {%s} {%s} %d {%s}",
|
||||||
ti->ti_modrdn.bv_val, (long) op->o_msgid,
|
ti->ti_modrdn.bv_val,
|
||||||
|
op->o_connid, (long) op->o_msgid,
|
||||||
suf_tcl.bv_val, dn->bv_val,
|
suf_tcl.bv_val, dn->bv_val,
|
||||||
newrdn->bv_val, deleteoldrdn ? 1 : 0,
|
newrdn->bv_val, deleteoldrdn ? 1 : 0,
|
||||||
newSuperior->bv_val );
|
newSuperior->bv_val );
|
||||||
|
@ -63,12 +63,12 @@ tcl_back_search (
|
|||||||
}
|
}
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_search.bv_len + suf_tcl.bv_len
|
command = (char *) ch_malloc (ti->ti_search.bv_len + suf_tcl.bv_len
|
||||||
+ base->bv_len + 40 + filterstr->bv_len +
|
+ base->bv_len + 60 + filterstr->bv_len +
|
||||||
(attrs_tcl == NULL ? 5 : strlen (attrs_tcl)) + 72);
|
(attrs_tcl == NULL ? 5 : strlen (attrs_tcl)) + 72);
|
||||||
sprintf (command,
|
sprintf (command,
|
||||||
"%s SEARCH {%ld} {%s} {%s} {%d} {%d} {%d} {%d} {%s} {%d} {%s}",
|
"%s SEARCH {%ld/%ld} {%s} {%s} {%d} {%d} {%d} {%d} {%s} {%d} {%s}",
|
||||||
ti->ti_search.bv_val, (long) op->o_msgid, suf_tcl.bv_val,
|
ti->ti_search.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
base->bv_val, scope, deref,
|
suf_tcl.bv_val, base->bv_val, scope, deref,
|
||||||
sizelimit, timelimit, filterstr->bv_val, attrsonly ? 1 : 0,
|
sizelimit, timelimit, filterstr->bv_val, attrsonly ? 1 : 0,
|
||||||
attrs_tcl == NULL ? "{all}" : attrs_tcl);
|
attrs_tcl == NULL ? "{all}" : attrs_tcl);
|
||||||
Tcl_Free (attrs_tcl);
|
Tcl_Free (attrs_tcl);
|
||||||
|
@ -37,10 +37,10 @@ tcl_back_unbind (
|
|||||||
}
|
}
|
||||||
|
|
||||||
command = (char *) ch_malloc (ti->ti_unbind.bv_len + suf_tcl.bv_len
|
command = (char *) ch_malloc (ti->ti_unbind.bv_len + suf_tcl.bv_len
|
||||||
+ conn->c_dn.bv_len + 64);
|
+ conn->c_dn.bv_len + 84);
|
||||||
sprintf (command, "%s UNBIND {%ld} {%s} {%s}",
|
sprintf (command, "%s UNBIND {%ld/%ld} {%s} {%s}",
|
||||||
ti->ti_unbind.bv_val, (long) op->o_msgid, suf_tcl.bv_val,
|
ti->ti_unbind.bv_val, op->o_connid, (long) op->o_msgid,
|
||||||
conn->c_dn.bv_val ? conn->c_dn.bv_val : "");
|
suf_tcl.bv_val, conn->c_dn.bv_val ? conn->c_dn.bv_val : "");
|
||||||
Tcl_Free (suf_tcl.bv_val);
|
Tcl_Free (suf_tcl.bv_val);
|
||||||
|
|
||||||
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
|
ldap_pvt_thread_mutex_lock (&tcl_interpreter_mutex);
|
||||||
|
Loading…
Reference in New Issue
Block a user