]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-monitor/bind.c
Fix LBER_ERROR vs. -1 confusion.
[openldap] / servers / slapd / back-monitor / bind.c
index 910f3a1feb8e2afd0136336b67b0412a7e91a520..b57149748fc5f838035e74e8f81638484eb83846 100644 (file)
@@ -1,12 +1,9 @@
 /* bind.c - monitor backend bind routine */
 /*
- * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2003 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
- * Copyright 2001 The OpenLDAP Foundation, All Rights Reserved.
- * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
- * 
  * Copyright 2001, Pierangelo Masarati, All rights reserved. <ando@sys-net.it>
  * 
  * This work has beed deveolped for the OpenLDAP Foundation 
@@ -50,27 +47,29 @@ monitor_back_bind(
        Backend         *be,
        Connection      *conn,
        Operation       *op,
-       const char      *dn,
-       const char      *ndn,
+       struct berval   *dn,
+       struct berval   *ndn,
        int             method,
        struct berval   *cred,
-       char**          edn
+       struct berval   *edn
                                    
 )
 {
+#if 0  /* not used yet */
        struct monitorinfo      *mi = (struct monitorinfo *) be->be_private;
+#endif
 
 #ifdef NEW_LOGGING
-       LDAP_LOG(( "backend", LDAP_LEVEL_ENTRY,
-               "monitor_back_bind: dn: %s.\n", dn ));
+       LDAP_LOG( BACK_MON, ENTRY,
+               "monitor_back_bind: dn: %s.\n", dn->bv_val, 0, 0 );
 #else
        Debug(LDAP_DEBUG_ARGS, "==> monitor_back_bind: dn: %s\n%s%s", 
-                       dn, "", "");
+                       dn->bv_val, "", "");
 #endif
        
        if ( method == LDAP_AUTH_SIMPLE 
                        && be_isroot_pw( be, conn, ndn, cred ) ) {
-               *edn = ch_strdup( be_root_dn( be ) );
+               ber_dupbv( edn, be_root_dn( be ) );
                return( 0 );
        }