From 51b87202e0e27a6cb95bc305afa19e7161b552cd Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Sat, 18 Apr 2009 23:11:33 +0000 Subject: [PATCH] In uid2dn, only return success if a unique DN was found --- contrib/slapd-modules/nssov/passwd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/slapd-modules/nssov/passwd.c b/contrib/slapd-modules/nssov/passwd.c index 31fb88e73b..14f28a7106 100644 --- a/contrib/slapd-modules/nssov/passwd.c +++ b/contrib/slapd-modules/nssov/passwd.c @@ -188,7 +188,7 @@ int nssov_uid2dn(Operation *op,nssov_info *ni,struct berval *uid,struct berval * op2.ors_slimit = SLAP_NO_LIMIT; rc = op2.o_bd->be_search( &op2, &rs ); filter_free_x( op, op2.ors_filter, 1 ); - return rc == LDAP_SUCCESS; + return rc == LDAP_SUCCESS && !BER_BVISNULL(dn); } /* the maximum number of uidNumber attributes per entry */