X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=servers%2Fslapd%2Fbind.c;h=c39caea9f64e37be8a26d0ead16d2685e5fa49bd;hb=ae3f784d5b8b022fc8bb5ecd2e612d9b1cdd13ed;hp=836e9d4ce51056a8e5101bc5244769160b59df8a;hpb=d026e2c9f7a390b6adf9b03af3ee125c2cd52958;p=openldap diff --git a/servers/slapd/bind.c b/servers/slapd/bind.c index 836e9d4ce5..c39caea9f6 100644 --- a/servers/slapd/bind.c +++ b/servers/slapd/bind.c @@ -2,7 +2,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software . * - * Copyright 1998-2004 The OpenLDAP Foundation. + * Copyright 1998-2005 The OpenLDAP Foundation. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -231,7 +231,7 @@ fe_op_bind( Operation *op, SlapReply *rs ) struct berval mech = op->orb_tmp_mech; /* check for inappropriate controls */ - if( get_manageDSAit( op ) == SLAP_CRITICAL_CONTROL ) { + if( get_manageDSAit( op ) == SLAP_CONTROL_CRITICAL ) { send_ldap_error( op, rs, LDAP_UNAVAILABLE_CRITICAL_EXTENSION, "manageDSAit control inappropriate" ); @@ -464,7 +464,9 @@ fe_op_bind( Operation *op, SlapReply *rs ) /* don't return referral for bind requests */ /* noSuchObject is not allowed to be returned by bind */ rs->sr_err = LDAP_INVALID_CREDENTIALS; + op->o_bd = frontendDB; send_ldap_result( op, rs ); + op->o_bd = NULL; goto cleanup; } @@ -594,6 +596,7 @@ fe_op_bind( Operation *op, SlapReply *rs ) } else if ( !BER_BVISNULL( &op->orb_edn ) ) { free( op->orb_edn.bv_val ); + BER_BVZERO( &op->orb_edn ); } } else {