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 ) {
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
#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;