]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/sbind.c
Fix ITS#1843, don't deref NULL string in ldap_pvt_str2upper
[openldap] / libraries / libldap / sbind.c
index 96d9a7843359397de12f257c623c5ebc8cd561a8..eb8aaed4bd57f564e125b6011efa549c53f713cd 100644 (file)
@@ -1,6 +1,6 @@
 /* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2002 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*  Portions
@@ -16,7 +16,7 @@
  *             name            DistinguishedName,       -- who
  *             authentication  CHOICE {
  *                     simple          [0] OCTET STRING -- passwd
-#ifdef HAVE_KERBEROS
+#ifdef LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND
  *                     krbv42ldap      [1] OCTET STRING
  *                     krbv42dsa       [2] OCTET STRING
 #endif
@@ -62,7 +62,11 @@ ldap_simple_bind(
        int msgid;
        struct berval cred;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "sbind", LDAP_LEVEL_ENTRY, "ldap_simple_bind\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_simple_bind\n", 0, 0, 0 );
+#endif
 
        assert( ld != NULL );
        assert( LDAP_VALID( ld ) );
@@ -97,7 +101,11 @@ ldap_simple_bind_s( LDAP *ld, LDAP_CONST char *dn, LDAP_CONST char *passwd )
 {
        struct berval cred;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "sbind", LDAP_LEVEL_ENTRY, "ldap_simple_bind_s\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_simple_bind_s\n", 0, 0, 0 );
+#endif
 
        if ( passwd != NULL ) {
                cred.bv_val = (char *) passwd;