]> git.sur5r.net Git - openldap/commitdiff
Added LDAP_LOG messages
authorJulius Enarusai <julius@openldap.org>
Wed, 27 Mar 2002 22:23:24 +0000 (22:23 +0000)
committerJulius Enarusai <julius@openldap.org>
Wed, 27 Mar 2002 22:23:24 +0000 (22:23 +0000)
libraries/libldap/kbind.c
libraries/libldap/modify.c

index 6b3b1dd9d215c94bdeeda8300c1347cea362b799..372eb9fa0053a98856963865a2abf9a6f1982691 100644 (file)
@@ -64,7 +64,11 @@ ldap_kerberos_bind1( LDAP *ld, LDAP_CONST char *dn )
        int             rc;
        ber_len_t credlen;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind1\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind1\n", 0, 0, 0 );
+#endif
 
        if( ld->ld_version > LDAP_VERSION2 ) {
                ld->ld_errno = LDAP_NOT_SUPPORTED;
@@ -114,7 +118,11 @@ ldap_kerberos_bind1_s( LDAP *ld, LDAP_CONST char *dn )
        int             msgid;
        LDAPMessage     *res;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind1_s\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind1_s\n", 0, 0, 0 );
+#endif
 
        /* initiate the bind */
        if ( (msgid = ldap_kerberos_bind1( ld, dn )) == -1 )
@@ -147,7 +155,11 @@ ldap_kerberos_bind2( LDAP *ld, LDAP_CONST char *dn )
        int             rc;
        ber_len_t credlen;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind2\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind2\n", 0, 0, 0 );
+#endif
 
        if( ld->ld_version > LDAP_VERSION2 ) {
                ld->ld_errno = LDAP_NOT_SUPPORTED;
@@ -192,7 +204,11 @@ ldap_kerberos_bind2_s( LDAP *ld, LDAP_CONST char *dn )
        int             msgid;
        LDAPMessage     *res;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind2_s\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind2_s\n", 0, 0, 0 );
+#endif
 
        /* initiate the bind */
        if ( (msgid = ldap_kerberos_bind2( ld, dn )) == -1 )
@@ -213,7 +229,11 @@ ldap_kerberos_bind_s( LDAP *ld, LDAP_CONST char *dn )
 {
        int     err;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, "ldap_kerberos_bind_s\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_kerberos_bind_s\n", 0, 0, 0 );
+#endif
 
        if ( (err = ldap_kerberos_bind1_s( ld, dn )) != LDAP_SUCCESS )
                return( err );
@@ -240,11 +260,22 @@ ldap_get_kerberosv4_credentials(
        int             err;
        char            realm[REALM_SZ], *cred, *krbinstance;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "kbind", LDAP_LEVEL_ENTRY, 
+               "ldap_get_kerberosv4_credentials\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_get_kerberosv4_credentials\n", 0, 0, 0 );
+#endif
 
        if ( (err = krb_get_tf_realm( tkt_string(), realm )) != KSUCCESS ) {
+#ifdef NEW_LOGGING
+               LDAP_LOG (( "kbind", LDAP_LEVEL_ERR, 
+                       "ldap_get_kerberosv4_credentials: krb_get_tf_realm failed: %s\n",
+                       krb_err_txt[err] ));
+#else
                Debug( LDAP_DEBUG_ANY, "ldap_get_kerberosv4_credentials: "
                        "krb_get_tf_realm failed: %s\n", krb_err_txt[err], 0, 0 );
+#endif
                ld->ld_errno = LDAP_AUTH_UNKNOWN;
                return( NULL );
        }
@@ -261,8 +292,14 @@ ldap_get_kerberosv4_credentials(
        if ( (err = krb_mk_req( &ktxt, service, krbinstance, realm, 0 ))
            != KSUCCESS )
        {
+#ifdef NEW_LOGGING
+               LDAP_LOG (( "kbind", LDAP_LEVEL_ERR, 
+                       "ldap_get_kerberosv4_credentials: krb_mk_req failed: %s\n",
+                       krb_err_txt[err] ));
+#else
                Debug( LDAP_DEBUG_ANY, "ldap_get_kerberosv4_credentials: "
                        "krb_mk_req failed (%s)\n", krb_err_txt[err], 0, 0 );
+#endif
                ld->ld_errno = LDAP_AUTH_UNKNOWN;
                return( NULL );
        }
index e1591196b8ff9e43b34f9390e5ef409b7dc32d3e..cf9f6ed573161c9862ed3c87d4c7f84e4f6a77a5 100644 (file)
@@ -71,7 +71,11 @@ ldap_modify_ext( LDAP *ld,
         *      }
         */
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "modify", LDAP_LEVEL_ENTRY, "ldap_modify_ext\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_modify_ext\n", 0, 0, 0 );
+#endif
 
        /* check client controls */
        rc = ldap_int_client_controls( ld, cctrls );
@@ -155,7 +159,11 @@ ldap_modify( LDAP *ld, LDAP_CONST char *dn, LDAPMod **mods )
 {
        int rc, msgid;
 
+#ifdef NEW_LOGGING
+       LDAP_LOG (( "modify", LDAP_LEVEL_ENTRY, "ldap_modify\n" ));
+#else
        Debug( LDAP_DEBUG_TRACE, "ldap_modify\n", 0, 0, 0 );
+#endif
 
        rc = ldap_modify_ext( ld, dn, mods, NULL, NULL, &msgid );