summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/libads/ldap.c2
1 files changed, 1 insertions, 1 deletions
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;