Index: auth/auth_domain.c =================================================================== RCS file: /data/cvs/samba/source/auth/auth_domain.c,v retrieving revision 1.33.2.34 diff -u -r1.33.2.34 auth_domain.c --- auth/auth_domain.c 7 Jan 2004 22:43:36 -0000 1.33.2.34 +++ auth/auth_domain.c 15 Jan 2004 06:51:10 -0000 @@ -41,7 +41,8 @@ **/ static NTSTATUS connect_to_domain_password_server(struct cli_state **cli, - const char *dc_name, struct in_addr dc_ip, + const char *domain, const char *dc_name, + struct in_addr dc_ip, const char *setup_creds_as, uint16 sec_chan, const unsigned char *trust_passwd, @@ -111,6 +112,10 @@ return NT_STATUS_NO_MEMORY; } + /* This must be the remote domain (not ours) for schannel */ + + fstrcpy( (*cli)->domain, domain ); + result = cli_nt_establish_netlogon(*cli, sec_chan, trust_passwd); if (!NT_STATUS_IS_OK(result)) { @@ -162,8 +167,8 @@ /* rety loop for robustness */ for (i = 0; !NT_STATUS_IS_OK(nt_status) && retry && (i < 3); i++) { - nt_status = connect_to_domain_password_server(&cli, dc_name, dc_ip, setup_creds_as, - sec_chan, trust_passwd, &retry); + nt_status = connect_to_domain_password_server(&cli, domain, dc_name, + dc_ip, setup_creds_as, sec_chan, trust_passwd, &retry); } if ( !NT_STATUS_IS_OK(nt_status) ) { @@ -297,7 +302,7 @@ /* we need our DC to send the net_sam_logon() request to */ if ( !get_dc_name(domain, NULL, dc_name, &dc_ip) ) { - DEBUG(5,("check_trustdomain_security: unable to locate a DC for domain %s\n", + DEBUG(5,("check_ntdomain_security: unable to locate a DC for domain %s\n", user_info->domain.str)); return NT_STATUS_NO_LOGON_SERVERS; } Index: nsswitch/winbindd_cm.c =================================================================== RCS file: /data/cvs/samba/source/nsswitch/winbindd_cm.c,v retrieving revision 1.31.2.49 diff -u -r1.31.2.49 winbindd_cm.c --- nsswitch/winbindd_cm.c 8 Jan 2004 19:56:40 -0000 1.31.2.49 +++ nsswitch/winbindd_cm.c 15 Jan 2004 06:51:11 -0000 @@ -509,7 +509,7 @@ done: - /* close the connection; no other cals use this pipe and it is called only + /* close the connection; no other calls use this pipe and it is called only on reestablishing the domain list --jerry */ if ( conn.cli ) @@ -686,9 +686,9 @@ if ( sec_channel_type == SEC_CHAN_DOMAIN ) fstr_sprintf(conn->cli->mach_acct, "%s$", lp_workgroup()); - + /* This must be the remote domain (not ours) for schannel */ + fstrcpy( conn->cli->domain, domain->name); - result = cli_nt_establish_netlogon(conn->cli, sec_channel_type, trust_passwd);