From: Günther Deschner Date: Tue, 17 Jun 2008 14:17:03 +0000 (+0200) Subject: libads: fix logic error in ads_get_kvno(). X-Git-Tag: samba-4.0.0alpha6~801^2~1020 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3688eeafa3679cec0d0b0954206d91d14f21a050;p=thirdparty%2Fsamba.git libads: fix logic error in ads_get_kvno(). Guenther (This used to be commit 132b038581a1a91b4e70c7c44f97f52866609812) --- diff --git a/source3/libads/ldap.c b/source3/libads/ldap.c index 37c0c4d0ac4..01c4b442c8c 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;