summaryrefslogtreecommitdiffstats
path: root/source3/rpc_client/cli_samr.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-09-19 15:53:44 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:00:46 -0500
commit5864fb9fc52b8a8e16ff1a2389145c24b325a912 (patch)
treebe1372bb81d00dbf72bf6fe491197f7abcf45889 /source3/rpc_client/cli_samr.c
parentbc6295c3ec1a83a14764f82ee3d8f0e9e098a0ad (diff)
downloadsamba-5864fb9fc52b8a8e16ff1a2389145c24b325a912.tar.gz
samba-5864fb9fc52b8a8e16ff1a2389145c24b325a912.tar.xz
samba-5864fb9fc52b8a8e16ff1a2389145c24b325a912.zip
r18677: quickly add samr_GetDisplayEnumerationIndex for debugging to rpcclient.
Guenther (This used to be commit bd546edc482d42c6d783f474eeffa8a8086efd83)
Diffstat (limited to 'source3/rpc_client/cli_samr.c')
-rw-r--r--source3/rpc_client/cli_samr.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 7f3bd8f90a8..fceafeca852 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/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. */