summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/net_ads.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/utils/net_ads.c b/source3/utils/net_ads.c
index 7902248f94..97b64a271c 100644
--- a/source3/utils/net_ads.c
+++ b/source3/utils/net_ads.c
@@ -282,6 +282,14 @@ retry:
status = ads_connect(ads);
if (!ADS_ERR_OK(status)) {
+
+ if (NT_STATUS_EQUAL(ads_ntstatus(status),
+ NT_STATUS_NO_LOGON_SERVERS)) {
+ DEBUG(0,("ads_connect: %s\n", ads_errstr(status)));
+ ads_destroy(&ads);
+ return status;
+ }
+
if (!need_password && !second_time) {
need_password = True;
second_time = True;