1 /* bind.c - DNS SRV backend bind function */
4 * Copyright 2000-2003 The OpenLDAP Foundation, All Rights Reserved.
5 * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
13 #include <ac/socket.h>
14 #include <ac/string.h>
30 Debug( LDAP_DEBUG_TRACE, "DNSSRV: bind %s (%d)\n",
31 dn->bv_val == NULL ? "" : dn->bv_val,
34 if( method == LDAP_AUTH_SIMPLE && cred != NULL && cred->bv_len ) {
35 Statslog( LDAP_DEBUG_STATS,
36 "conn=%lu op=%lu DNSSRV BIND dn=\"%s\" provided passwd\n",
37 op->o_connid, op->o_opid,
38 dn->bv_val == NULL ? "" : dn->bv_val , 0, 0 );
40 Debug( LDAP_DEBUG_TRACE,
41 "DNSSRV: BIND dn=\"%s\" provided cleartext password\n",
42 dn->bv_val == NULL ? "" : dn->bv_val, 0, 0 );
44 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
45 NULL, "you shouldn\'t send strangers your password",
49 Debug( LDAP_DEBUG_TRACE, "DNSSRV: BIND dn=\"%s\"\n",
50 dn->bv_val == NULL ? "" : dn->bv_val, 0, 0 );
52 send_ldap_result( conn, op, LDAP_UNWILLING_TO_PERFORM,
53 NULL, "anonymous bind expected",