svn commit: samba r19493 - in branches: SAMBA_3_0/source/utils
SAMBA_3_0_23/source/utils SAMBA_3_0_24/source/utils
gd at samba.org
gd at samba.org
Wed Oct 25 12:10:49 GMT 2006
Author: gd
Date: 2006-10-25 12:10:48 +0000 (Wed, 25 Oct 2006)
New Revision: 19493
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=19493
Log:
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
Modified:
branches/SAMBA_3_0/source/utils/net_ads.c
branches/SAMBA_3_0_23/source/utils/net_ads.c
branches/SAMBA_3_0_24/source/utils/net_ads.c
Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_ads.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_ads.c 2006-10-25 11:50:23 UTC (rev 19492)
+++ branches/SAMBA_3_0/source/utils/net_ads.c 2006-10-25 12:10:48 UTC (rev 19493)
@@ -282,6 +282,14 @@
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;
Modified: branches/SAMBA_3_0_23/source/utils/net_ads.c
===================================================================
--- branches/SAMBA_3_0_23/source/utils/net_ads.c 2006-10-25 11:50:23 UTC (rev 19492)
+++ branches/SAMBA_3_0_23/source/utils/net_ads.c 2006-10-25 12:10:48 UTC (rev 19493)
@@ -273,6 +273,14 @@
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;
Modified: branches/SAMBA_3_0_24/source/utils/net_ads.c
===================================================================
--- branches/SAMBA_3_0_24/source/utils/net_ads.c 2006-10-25 11:50:23 UTC (rev 19492)
+++ branches/SAMBA_3_0_24/source/utils/net_ads.c 2006-10-25 12:10:48 UTC (rev 19493)
@@ -271,6 +271,14 @@
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;
More information about the samba-cvs
mailing list