diff options
author | Günther Deschner <gd@samba.org> | 2006-09-19 15:53:44 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 12:00:46 -0500 |
commit | bd546edc482d42c6d783f474eeffa8a8086efd83 (patch) | |
tree | 96a181feb71fe600a9f4dd3b55750401335c7c38 /source/rpc_client/cli_samr.c | |
parent | 65013a8d9e678c44cecae07967b7a001b796faf1 (diff) | |
download | samba-bd546edc482d42c6d783f474eeffa8a8086efd83.tar.gz samba-bd546edc482d42c6d783f474eeffa8a8086efd83.tar.xz samba-bd546edc482d42c6d783f474eeffa8a8086efd83.zip |
r18677: quickly add samr_GetDisplayEnumerationIndex for debugging to rpcclient.
Guenther
Diffstat (limited to 'source/rpc_client/cli_samr.c')
-rw-r--r-- | source/rpc_client/cli_samr.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/rpc_client/cli_samr.c b/source/rpc_client/cli_samr.c index 7f3bd8f90a8..fceafeca852 100644 --- a/source/rpc_client/cli_samr.c +++ b/source/rpc_client/cli_samr.c @@ -1576,6 +1576,49 @@ NTSTATUS rpccli_samr_query_dispinfo3(struct rpc_pipe_client *cli, return result; } +/* Query display info index */ + +NTSTATUS rpccli_samr_get_dispenum_index(struct rpc_pipe_client *cli, + TALLOC_CTX *mem_ctx, + POLICY_HND *domain_pol, + uint16 switch_value, + const char *name, + uint32 *idx) +{ + prs_struct qbuf, rbuf; + SAMR_Q_GET_DISPENUM_INDEX q; + SAMR_R_GET_DISPENUM_INDEX r; + NTSTATUS result = NT_STATUS_UNSUCCESSFUL; + + DEBUG(10,("cli_samr_get_dispenum_index for name = %s\n", name)); + + ZERO_STRUCT(q); + ZERO_STRUCT(r); + + /* Marshall data and send request */ + + init_samr_q_get_dispenum_index(&q, domain_pol, switch_value, name); + + CLI_DO_RPC(cli, mem_ctx, PI_SAMR, SAMR_GET_DISPENUM_INDEX, + q, r, + qbuf, rbuf, + samr_io_q_get_dispenum_index, + samr_io_r_get_dispenum_index, + NT_STATUS_UNSUCCESSFUL); + + /* Return output parameters */ + + *idx = 0; + + result = r.status; + + if (NT_STATUS_IS_OK(result)) { + *idx = r.idx; + } + + return result; +} + /* Lookup rids. Note that NT4 seems to crash if more than ~1000 rids are looked up in one packet. */ |