domain in schannel bind credentials must be the dest domain, not ours
authorGerald Carter <jerry@samba.org>
Fri, 25 Jul 2003 18:00:57 +0000 (18:00 +0000)
committerGerald Carter <jerry@samba.org>
Fri, 25 Jul 2003 18:00:57 +0000 (18:00 +0000)
(This used to be commit e12f6a8c13f27c3caea96b467cc4294e20dad341)

source3/nsswitch/winbindd_cm.c
source3/rpc_client/cli_pipe.c

index 9a1660685669a3bb6a33aaad6438ccf0d9d89c7e..f9da38660d63d617d3f3174d1f3e274503f6b32a 100644 (file)
@@ -169,6 +169,11 @@ static NTSTATUS cm_open_connection(const char *domain, const int pipe_index,
                return result;
        }
        
+       /* set the domain if empty; needed for schannel connections */
+       if ( !*new_conn->cli->domain )
+               fstrcpy( new_conn->cli->domain, domain );
+               
+       
        if ( !cli_nt_session_open (new_conn->cli, pipe_index) ) {
                result = NT_STATUS_PIPE_NOT_AVAILABLE;
                /* 
index 53ff58b966187c74f02f8bb0306c40a2fa166dc3..2554d8c06bf0a26c6eb407b5b917cad52e862836 100644 (file)
@@ -697,8 +697,10 @@ static NTSTATUS create_rpc_bind_req(struct cli_state *cli, prs_struct *rpc_out,
 
                /* Use lp_workgroup() if domain not specified */
 
-               if (!domain || !domain[0])
+               if (!domain || !domain[0]) {
+                       DEBUG(10,("create_rpc_bind_req: no domain; assuming my own\n"));
                        domain = lp_workgroup();
+               }
 
                init_rpc_auth_netsec_neg(&netsec_neg, domain, my_name);