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>
24 Debug( LDAP_DEBUG_TRACE, "DNSSRV: bind %s (%d)\n",
25 op->o_req_dn.bv_val == NULL ? "" : op->o_req_dn.bv_val,
26 op->oq_bind.rb_method, NULL );
28 if( op->oq_bind.rb_method == LDAP_AUTH_SIMPLE && op->oq_bind.rb_cred.bv_val != NULL && op->oq_bind.rb_cred.bv_len ) {
29 Statslog( LDAP_DEBUG_STATS,
30 "conn=%lu op=%lu DNSSRV BIND dn=\"%s\" provided passwd\n",
31 op->o_connid, op->o_opid,
32 op->o_req_dn.bv_val == NULL ? "" : op->o_req_dn.bv_val , 0, 0 );
34 Debug( LDAP_DEBUG_TRACE,
35 "DNSSRV: BIND dn=\"%s\" provided cleartext password\n",
36 op->o_req_dn.bv_val == NULL ? "" : op->o_req_dn.bv_val, 0, 0 );
38 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
39 "you shouldn\'t send strangers your password" );
42 Debug( LDAP_DEBUG_TRACE, "DNSSRV: BIND dn=\"%s\"\n",
43 op->o_req_dn.bv_val == NULL ? "" : op->o_req_dn.bv_val, 0, 0 );
45 send_ldap_error( op, rs, LDAP_UNWILLING_TO_PERFORM,
46 "anonymous bind expected" );