]> git.sur5r.net Git - openldap/commitdiff
ITS#2268: SASL/ANONYMOUS fixes from kuenne@rentec.com
authorKurt Zeilenga <kurt@openldap.org>
Mon, 20 Jan 2003 18:09:46 +0000 (18:09 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 20 Jan 2003 18:09:46 +0000 (18:09 +0000)
servers/slapd/bind.c
servers/slapd/sasl.c

index 24de0218e8feab775c6153e7fcfb9c14e571ebb7..971bd2b0bfdbffd94730145de5b1a0b9b4a767a2 100644 (file)
@@ -331,16 +331,21 @@ do_bind(
                        Statslog( LDAP_DEBUG_STATS,
                                "conn=%lu op=%lu AUTHZ dn=\"%s\" mech=%s ssf=%d\n",
                                op->o_connid, op->o_opid,
-                               conn->c_dn.bv_val, conn->c_authmech.bv_val, ssf );
+                               conn->c_dn.bv_val ? conn->c_dn.bv_val : "<empty>",
+                               conn->c_authmech.bv_val, ssf );
 
 #ifdef NEW_LOGGING
                        LDAP_LOG( OPERATION, DETAIL1, 
                                "do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
-                               conn->c_authmech.bv_val, conn->c_dn.bv_val, ssf );
+                               conn->c_authmech.bv_val,
+                               conn->c_dn.bv_val ? conn->c_dn.bv_val : "<empty>",
+                               ssf );
 #else
                        Debug( LDAP_DEBUG_TRACE,
                                "do_bind: SASL/%s bind: dn=\"%s\" ssf=%d\n",
-                               conn->c_authmech.bv_val, conn->c_dn.bv_val, ssf );
+                               conn->c_authmech.bv_val,
+                               conn->c_dn.bv_val ? conn->c_dn.bv_val : "<empty>",
+                               ssf );
 #endif
 
                } else if ( rc == LDAP_SASL_BIND_IN_PROGRESS ) {
index 61511fa534dc326d97ffdd12ef0b2626c34493fa..4514f3ceff67ebd6e20745e74fe8fb9c4b565d9a 100644 (file)
@@ -610,13 +610,13 @@ slap_sasl_canonicalize(
        LDAP_LOG( TRANSPORT, ENTRY, 
                "slap_sasl_canonicalize: conn %d %s=\"%s\"\n",
                conn ? conn->c_connid : -1,
-               (flags & SASL_CU_AUTHID) ? "authcid" : "authzid", in ? in : "<empty>");
+               (flags & SASL_CU_AUTHID) ? "authcid" : "authzid",
+               in ? in : "<empty>");
 #else
-       Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: "
-               "%s=\"%s\"\n",
-                       conn ? conn->c_connid : -1,
-                       (flags & SASL_CU_AUTHID) ? "authcid" : "authzid",
-                       in ? in : "<empty>" );
+       Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: %s=\"%s\"\n",
+               conn ? conn->c_connid : -1,
+               (flags & SASL_CU_AUTHID) ? "authcid" : "authzid",
+               in ? in : "<empty>");
 #endif
 
        /* If name is too big, just truncate. We don't care, we're
@@ -685,14 +685,16 @@ slap_sasl_canonicalize(
 #ifdef NEW_LOGGING
        LDAP_LOG( TRANSPORT, ENTRY, 
                "slap_sasl_canonicalize: conn %d %s=\"%s\"\n",
-               conn ? conn->c_connid : -1, names[0]+1, dn.bv_val );
+               conn ? conn->c_connid : -1, names[0]+1,
+               dn.bv_val ? dn.bv_val : "<EMPTY>" );
 #else
-       Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: "
-               "%s=\"%s\"\n",
-                       conn ? conn->c_connid : -1,
-                       names[0]+1, dn.bv_val );
+       Debug( LDAP_DEBUG_ARGS, "SASL Canonicalize [conn=%ld]: %s=\"%s\"\n",
+               conn ? conn->c_connid : -1, names[0]+1,
+               dn.bv_val ? dn.bv_val : "<EMPTY>" );
 #endif
-done:  AC_MEMCPY( out, in, inlen );
+
+done:
+       AC_MEMCPY( out, in, inlen );
        out[inlen] = '\0';
 
        *out_len = inlen;