summaryrefslogtreecommitdiffstats
path: root/source/rpc_client/cli_netlogon.c
diff options
context:
space:
mode:
Diffstat (limited to 'source/rpc_client/cli_netlogon.c')
-rw-r--r--source/rpc_client/cli_netlogon.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/rpc_client/cli_netlogon.c b/source/rpc_client/cli_netlogon.c
index 60048d189dc..58ba32eb2e6 100644
--- a/source/rpc_client/cli_netlogon.c
+++ b/source/rpc_client/cli_netlogon.c
@@ -152,6 +152,24 @@ password ?).\n", cli->desthost ));
return result;
}
+/* Return the secure channel type depending on the server role. */
+
+uint16 get_sec_chan(void)
+{
+ uint16 sec_chan = SEC_CHAN_WKSTA;
+
+ switch (lp_server_role()) {
+ case ROLE_DOMAIN_PDC:
+ sec_chan = SEC_CHAN_DOMAIN;
+ break;
+ case ROLE_DOMAIN_BDC:
+ sec_chan = SEC_CHAN_BDC;
+ break;
+ }
+
+ return sec_chan;
+}
+
/* Initialize domain session credentials */
NTSTATUS cli_nt_setup_creds(struct cli_state *cli,