summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2008-06-17 16:17:03 +0200
committerGünther Deschner <gd@samba.org>2008-06-17 19:51:14 +0200
commit3688eeafa3679cec0d0b0954206d91d14f21a050 (patch)
treea050524aec269296eb94075fc8ac6caca59d5b27 /source3
parent04e697891bc5857acd4f28c10678204febae710e (diff)
downloadsamba-3688eeafa3679cec0d0b0954206d91d14f21a050.tar.gz
samba-3688eeafa3679cec0d0b0954206d91d14f21a050.tar.bz2
samba-3688eeafa3679cec0d0b0954206d91d14f21a050.zip
libads: fix logic error in ads_get_kvno().
Guenther (This used to be commit 132b038581a1a91b4e70c7c44f97f52866609812)
Diffstat (limited to 'source3')
-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;