Mainly BDC-related changes.
authorMatthew Chapman <matty@samba.org>
Thu, 8 Apr 1999 05:36:39 +0000 (05:36 +0000)
committerMatthew Chapman <matty@samba.org>
Thu, 8 Apr 1999 05:36:39 +0000 (05:36 +0000)
* Added SEC_CHAN_BDC
* Propagate sec_chan into the various functions which change trust account
  passwords, so they can be used for domain control and inter-domain
  trusts.

source/smbd/process.c

index 420598157f610a94e57df5b6ccc77e5afb2d0326..a4c1acba8fc9217b59305c322a366fc0bf65a155 100644 (file)
@@ -882,6 +882,7 @@ void smbd_process(void)
         unsigned char trust_passwd_hash[16];
         time_t lct;
         pstring remote_machine_list;
+        int sec_chan = SEC_CHAN_WKSTA;
 
         /*
          * We're in domain level security, and the code that
@@ -917,8 +918,11 @@ machine %s in domain %s.\n", global_myname, global_myworkgroup ));
         }
 
         pstrcpy(remote_machine_list, lp_passwordserver());
+        if (lp_server_role() == ROLE_DOMAIN_BDC)
+          sec_chan = SEC_CHAN_BDC;
 
-        change_trust_account_password( global_myworkgroup, remote_machine_list);
+        change_trust_account_password(global_myworkgroup, remote_machine_list,
+                                        sec_chan);
         trust_password_unlock();
         global_machine_password_needs_changing = False;
       }