From 36111934a3372f48aa2fd08e21771d309fe3c50d Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Fri, 17 Aug 2007 09:51:29 +0000 Subject: [PATCH] allow "traditional" behavior (more for ITS#4962; please debate) --- servers/slapd/back-bdb/bind.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/servers/slapd/back-bdb/bind.c b/servers/slapd/back-bdb/bind.c index 634d398b07..dc0be82b30 100644 --- a/servers/slapd/back-bdb/bind.c +++ b/servers/slapd/back-bdb/bind.c @@ -39,6 +39,7 @@ bdb_bind( Operation *op, SlapReply *rs ) "==> " LDAP_XSTRING(bdb_bind) ": dn: %s\n", op->o_req_dn.bv_val, 0, 0); +#ifdef LDAP_DEVEL /* allow noauth binds */ switch ( be_rootdn_bind( op, rs ) ) { case SLAP_CB_CONTINUE: @@ -50,6 +51,18 @@ bdb_bind( Operation *op, SlapReply *rs ) return rs->sr_err; } +#else /* traditional */ + /* allow noauth binds */ + switch ( be_rootdn_bind( op, NULL ) ) { + case LDAP_SUCCESS: + /* frontend will send result */ + return rs->sr_err; + + default: + /* give the database a chanche */ + break; + } + rs->sr_err = LOCK_ID(bdb->bi_dbenv, &locker); switch(rs->sr_err) { case 0: @@ -59,6 +72,7 @@ bdb_bind( Operation *op, SlapReply *rs ) send_ldap_result( op, rs ); return rs->sr_err; } +#endif /* traditional */ dn2entry_retry: /* get entry with reader lock */ -- 2.39.5