]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libads: fix logic error in ads_get_kvno().
authorGünther Deschner <gd@samba.org>
Tue, 17 Jun 2008 14:17:03 +0000 (16:17 +0200)
committerGünther Deschner <gd@samba.org>
Tue, 17 Jun 2008 17:51:14 +0000 (19:51 +0200)
Guenther

source/libads/ldap.c

index 37c0c4d0ac49993fdd17f033d5be401a0f84e350..01c4b442c8cf24e9a90d7789c3239c63e01e2130 100644 (file)
@@ -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;