]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-tcl/tcl_bind.c
Don't use 'shtool mkln' as ln(1) replacement.
[openldap] / servers / slapd / back-tcl / tcl_bind.c
index 10a1d0a25f44e43e8df3af47fb62849e5a01b352..daa89d12c991ea64b9781cb73db8c0446aac14a5 100644 (file)
@@ -1,6 +1,5 @@
+/* $OpenLDAP$ */
 /* bind.c - tcl bind routines
- *
- * $Id: tcl_bind.c,v 1.4 1999/02/19 06:55:20 bcollins Exp $
  *
  * Copyright 1999, Ben Collins <bcollins@debian.org>, All rights reserved.
  *
@@ -22,21 +21,20 @@ tcl_back_bind (
        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);
        }
 
@@ -45,9 +43,9 @@ tcl_back_bind (
 
        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);
 
@@ -66,7 +64,7 @@ tcl_back_bind (
 
        if (err != LDAP_SUCCESS)
                send_ldap_result (conn, op, err, NULL,
-                       "internal backend error");
+                       "internal backend error", NULL, NULL );
 
        free (results);
        return (err);