diff options
author | Tim Potter <tpot@samba.org> | 2002-08-23 13:38:00 +0000 |
---|---|---|
committer | Tim Potter <tpot@samba.org> | 2002-08-23 13:38:00 +0000 |
commit | 55315b4b4e0f25ab9d77228219b8a4f8ceee6b29 (patch) | |
tree | 22960ead18c991be4a2c38b782743343f63b0417 /source3/rpc_client | |
parent | 53fabdee019699d39648fadafa0963ecb04ba3aa (diff) | |
download | samba-55315b4b4e0f25ab9d77228219b8a4f8ceee6b29.tar.gz samba-55315b4b4e0f25ab9d77228219b8a4f8ceee6b29.tar.bz2 samba-55315b4b4e0f25ab9d77228219b8a4f8ceee6b29.zip |
Moved calculation of secure channel type into a new function.
(This used to be commit b8dba26978c281259e02b9d6ebacaa7cba4f7787)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r-- | source3/rpc_client/cli_netlogon.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c index 60048d189d..58ba32eb2e 100644 --- a/source3/rpc_client/cli_netlogon.c +++ b/source3/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, |