summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-04-10 11:52:44 +0200
committerVolker Lendecke <vl@samba.org>2008-04-10 11:53:43 +0200
commit0f37cd0c8e62e5bffcbf587c1c826b35802e1e8b (patch)
treec88bfd8922c0b6f33b55e5fa721b4a8c7983a5a1 /source3
parent5f68ea53ff691084ed41f728c5141dd079fe2756 (diff)
downloadsamba-0f37cd0c8e62e5bffcbf587c1c826b35802e1e8b.tar.gz
samba-0f37cd0c8e62e5bffcbf587c1c826b35802e1e8b.tar.bz2
samba-0f37cd0c8e62e5bffcbf587c1c826b35802e1e8b.zip
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. (This used to be commit 79bc6796b81395d591fc6ef389f153dd981fe68b)
Diffstat (limited to 'source3')
-rw-r--r--source3/winbindd/winbindd_cm.c41
1 files changed, 22 insertions, 19 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 80261862b1..8e275b2269 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -1145,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;