From 3688eeafa3679cec0d0b0954206d91d14f21a050 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Tue, 17 Jun 2008 16:17:03 +0200 Subject: libads: fix logic error in ads_get_kvno(). Guenther (This used to be commit 132b038581a1a91b4e70c7c44f97f52866609812) --- source3/libads/ldap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3/libads') diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 37c0c4d0ac..01c4b442c8 100644 --- a/source3/libads/ldap.c +++ b/source3/libads/ldap.c @@ -1537,7 +1537,7 @@ uint32 ads_get_kvno(ADS_STRUCT *ads, const char *machine_name) } ret = ads_search(ads, &res, filter, attrs); SAFE_FREE(filter); - if (!ADS_ERR_OK(ret) && ads_count_replies(ads, res)) { + if (!ADS_ERR_OK(ret) || (ads_count_replies(ads, res) != 1)) { DEBUG(1,("ads_get_kvno: Computer Account For %s not found.\n", machine_name)); ads_msgfree(ads, res); return kvno; -- cgit