From 78f977f746cf1f83fe1cc6f09634a831171a3435 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Wed, 25 Oct 2006 12:10:48 +0000 Subject: r19493: There is no point in prompting for a user's password in "net ads" when we can't find a domain controller at all. Guenther (This used to be commit e691ae7da3620a7d4c0e0b1217aaae44db0b8db3) --- source3/utils/net_ads.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3') 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; -- cgit