diff options
author | Günther Deschner <gd@samba.org> | 2008-04-04 01:40:29 +0200 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2008-04-12 07:51:16 +0200 |
commit | 6b583de8e5de0c3fcf9508ac572d0d4c3ee8e1c5 (patch) | |
tree | 14c3d67dc67e16abf1ee320519429d9825c146e2 /source/rpc_client | |
parent | 7d20487f9629f1eeb6da5a07a3d6fe9bb043b943 (diff) | |
download | samba-6b583de8e5de0c3fcf9508ac572d0d4c3ee8e1c5.tar.gz samba-6b583de8e5de0c3fcf9508ac572d0d4c3ee8e1c5.tar.xz samba-6b583de8e5de0c3fcf9508ac572d0d4c3ee8e1c5.zip |
Move rpccli_try_samr_connects out of rpcclient.
Guenther
(cherry picked from commit f550cdb6f240830ee1e3a2dfe5f4128bca0cf836)
Diffstat (limited to 'source/rpc_client')
-rw-r--r-- | source/rpc_client/cli_samr.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c index f0763cce1fe..fd4fbfc9f41 100644 --- a/source/rpc_client/cli_samr.c +++ b/source/rpc_client/cli_samr.c @@ -225,3 +225,47 @@ void get_query_dispinfo_params(int loop_count, uint32 *max_entries, break; } } + +NTSTATUS rpccli_try_samr_connects(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + uint32_t access_mask, + POLICY_HND *connect_pol) +{ + NTSTATUS status; + union samr_ConnectInfo info_in, info_out; + struct samr_ConnectInfo1 info1; + uint32_t lvl_out = 0; + + ZERO_STRUCT(info1); + + info1.client_version = SAMR_CONNECT_W2K; + info_in.info1 = info1; + + status = rpccli_samr_Connect5(cli, mem_ctx, + cli->cli->srv_name_slash, + access_mask, + 1, + &info_in, + &lvl_out, + &info_out, + connect_pol); + if (NT_STATUS_IS_OK(status)) { + return status; + } + + status = rpccli_samr_Connect4(cli, mem_ctx, + cli->cli->srv_name_slash, + SAMR_CONNECT_W2K, + access_mask, + connect_pol); + if (NT_STATUS_IS_OK(status)) { + return status; + } + + status = rpccli_samr_Connect2(cli, mem_ctx, + cli->cli->srv_name_slash, + access_mask, + connect_pol); + return status; +} + |