]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Set secure channel type depending on server role.
authorTim Potter <tpot@samba.org>
Fri, 24 Aug 2001 17:15:54 +0000 (17:15 +0000)
committerTim Potter <tpot@samba.org>
Fri, 24 Aug 2001 17:15:54 +0000 (17:15 +0000)
source/rpc_client/cli_login.c

index 7e2090164c49a22d7d2f7bcf4177ee84d1b77d50..92a70886d9c8ffd5e5d2856f06ebe8174783136b 100644 (file)
@@ -66,7 +66,8 @@ BOOL cli_nt_setup_creds(struct cli_state *cli, unsigned char mach_pwd[16])
    * Receive an auth-2 challenge response and check it.
    */
 
-  if (!cli_net_auth2(cli, SEC_CHAN_WKSTA, 0x000001ff, &srv_chal))
+  if (!cli_net_auth2(cli, (lp_server_role() == ROLE_DOMAIN_MEMBER) ?
+                     SEC_CHAN_WKSTA : SEC_CHAN_BDC, 0x000001ff, &srv_chal))
   {
     DEBUG(0,("cli_nt_setup_creds: auth2 challenge failed\n"));
     return False;