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