[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre2-448-gf68cca7

Karolin Seeger kseeger at samba.org
Thu Apr 10 11:34:25 GMT 2008


The branch, v3-2-stable has been updated
       via  f68cca7c801fc52e41dcaaaa75fc07dcc87ad299 (commit)
       via  e9df6321f7ce88854a3266d991e76445d673f860 (commit)
      from  1dd1556b308a276f50398b2d9294f0ff5590d33f (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit f68cca7c801fc52e41dcaaaa75fc07dcc87ad299
Author: Volker Lendecke <vl at samba.org>
Date:   Thu Apr 10 11:52:44 2008 +0200

    Also accept 0x15 getdc replies
    
    My NT4SP6 which my DC here trusts sends 0x15 instead of 0x13, from looking at
    the sniff at least the DC name is at the same place.
    (cherry picked from commit 79bc6796b81395d591fc6ef389f153dd981fe68b)

commit e9df6321f7ce88854a3266d991e76445d673f860
Author: Volker Lendecke <vl at samba.org>
Date:   Wed Apr 9 09:48:59 2008 +0200

    Try anonymous session setup
    
    ... if there's no trust password
    
    Attempt to fix bug 5350
    (cherry picked from commit 99f6b63f3c637457fdda7ed930c6666171b25b61)

-----------------------------------------------------------------------

Summary of changes:
 source/winbindd/winbindd_cm.c |   45 ++++++++++++++++++++++------------------
 1 files changed, 25 insertions(+), 20 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_cm.c b/source/winbindd/winbindd_cm.c
index b792de0..8e275b2 100644
--- a/source/winbindd/winbindd_cm.c
+++ b/source/winbindd/winbindd_cm.c
@@ -825,7 +825,7 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
 					 &machine_account,
 					 &machine_krb5_principal);
 		if (!NT_STATUS_IS_OK(result)) {
-			goto done;
+			goto anon_fallback;
 		}
 
 		if (lp_security() == SEC_ADS) {
@@ -910,6 +910,8 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
 		}
 	}
 
+ anon_fallback:
+
 	/* Fall back to anonymous connection, this might fail later */
 
 	if (NT_STATUS_IS_OK(cli_session_setup(*cli, "", NULL, 0,
@@ -1143,28 +1145,31 @@ static bool receive_getdc_response(struct sockaddr_storage *dc_ss,
 	/* This should be (buf-4)+SVAL(buf-4, smb_vwv12)... */
 	p = buf+SVAL(buf, smb_vwv10);
 
-	if (CVAL(p,0) != SAMLOGON_R) {
-		DEBUG(8, ("GetDC got invalid response type %d\n", CVAL(p, 0)));
-		return False;
-	}
+	switch (CVAL(p, 0)) {
+	case SAMLOGON_R:
+	case SAMLOGON_UNK_R:
+		p+=2;
+		pull_ucs2(buf, dcname, p, sizeof(dcname), PTR_DIFF(buf+len, p),
+			  STR_TERMINATE|STR_NOALIGN);
+		p = skip_unibuf(p, PTR_DIFF(buf+len, p));
+		pull_ucs2(buf, user, p, sizeof(user), PTR_DIFF(buf+len, p),
+			  STR_TERMINATE|STR_NOALIGN);
+		p = skip_unibuf(p, PTR_DIFF(buf+len, p));
+		pull_ucs2(buf, domain, p, sizeof(domain), PTR_DIFF(buf+len, p),
+			  STR_TERMINATE|STR_NOALIGN);
+		p = skip_unibuf(p, PTR_DIFF(buf+len, p));
+
+		if (!strequal(domain, domain_name)) {
+			DEBUG(3, ("GetDC: Expected domain %s, got %s\n",
+				  domain_name, domain));
+			return False;
+		}
+		break;
 
-	p+=2;
-	pull_ucs2(buf, dcname, p, sizeof(dcname), PTR_DIFF(buf+len, p),
-		  STR_TERMINATE|STR_NOALIGN);
-	p = skip_unibuf(p, PTR_DIFF(buf+len, p));
-	pull_ucs2(buf, user, p, sizeof(dcname), PTR_DIFF(buf+len, p),
-		  STR_TERMINATE|STR_NOALIGN);
-	p = skip_unibuf(p, PTR_DIFF(buf+len, p));
-	pull_ucs2(buf, domain, p, sizeof(dcname), PTR_DIFF(buf+len, p),
-		  STR_TERMINATE|STR_NOALIGN);
-	p = skip_unibuf(p, PTR_DIFF(buf+len, p));
-
-	if (!strequal(domain, domain_name)) {
-		DEBUG(3, ("GetDC: Expected domain %s, got %s\n",
-			  domain_name, domain));
+	default:
+		DEBUG(8, ("GetDC got invalid response type %d\n", CVAL(p, 0)));
 		return False;
 	}
-
 	p = dcname;
 	if (*p == '\\')	p += 1;
 	if (*p == '\\')	p += 1;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list