+/* $OpenLDAP$ */
/* bind.c - tcl bind routines
- *
- * $Id: tcl_bind.c,v 1.3 1999/02/18 01:18:39 bcollins Exp $
*
* Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
*
Backend * be,
Connection * conn,
Operation * op,
- char *dn,
+ struct berval *dn,
+ struct berval *ndn,
int method,
struct berval *cred,
- char **edn
+ struct berval *edn
)
{
char *command, *suf_tcl, *results;
int i, code, err = 0;
struct tclinfo *ti = (struct tclinfo *) be->be_private;
- *edn = NULL;
-
if (ti->ti_bind == NULL) {
send_ldap_result (conn, op, LDAP_UNWILLING_TO_PERFORM, NULL,
- "bind not implemented");
+ "bind not implemented", NULL, NULL );
return (-1);
}
command = (char *) ch_malloc (strlen (ti->ti_bind) + strlen
(suf_tcl) +
- strlen (dn) + strlen (cred->bv_val) + 64);
+ dn->bv_len + cred->bv_len + 64);
sprintf (command, "%s BIND {%ld} {%s} {%s} {%d} {%lu} {%s}",
- ti->ti_bind, op->o_msgid, suf_tcl, dn, method, cred->bv_len,
+ ti->ti_bind, op->o_msgid, suf_tcl, dn->bv_val, method, cred->bv_len,
cred->bv_val);
Tcl_Free (suf_tcl);
if (code != TCL_OK) {
err = LDAP_OPERATIONS_ERROR;
- Debug (LDAP_DEBUG_ANY, "tcl_bind_error: %s\n", results, 0, 0);
+ Debug (LDAP_DEBUG_SHELL, "tcl_bind_error: %s\n", results, 0, 0);
} else {
err = interp_send_results (be, conn, op, results, NULL, 0);
}
if (err != LDAP_SUCCESS)
send_ldap_result (conn, op, err, NULL,
- "internal backend error");
+ "internal backend error", NULL, NULL );
free (results);
return (err);