]> git.sur5r.net Git - openldap/commitdiff
In uid2dn, only return success if a unique DN was found
authorHoward Chu <hyc@openldap.org>
Sat, 18 Apr 2009 23:11:33 +0000 (23:11 +0000)
committerHoward Chu <hyc@openldap.org>
Sat, 18 Apr 2009 23:11:33 +0000 (23:11 +0000)
contrib/slapd-modules/nssov/passwd.c

index 31fb88e73b158dbb1cdf26758700b842c1881f91..14f28a7106b2c6fc107ac11601376b436348bbd9 100644 (file)
@@ -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 */