summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-23 20:32:52 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-23 20:32:52 +0000
commit14713d00b515af95288e9b92d9dfbf8a82eed1f2 (patch)
treeb3993bed81eaef6baf92347634298d2976d013c3 /source3/rpc_client
parent7bd8fd1a102045de38e0e0471e2cf7e2aee47eda (diff)
downloadsamba-14713d00b515af95288e9b92d9dfbf8a82eed1f2.tar.gz
samba-14713d00b515af95288e9b92d9dfbf8a82eed1f2.tar.bz2
samba-14713d00b515af95288e9b92d9dfbf8a82eed1f2.zip
oops!!!! wrong command!!!
(This used to be commit cbbfef6d2a5335a6daa4fe09ea2d73197417894f)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_svcctl.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/source3/rpc_client/cli_svcctl.c b/source3/rpc_client/cli_svcctl.c
index e09cd4ec12..bba6342db8 100644
--- a/source3/rpc_client/cli_svcctl.c
+++ b/source3/rpc_client/cli_svcctl.c
@@ -478,4 +478,62 @@ BOOL svc_close(struct cli_state *cli, uint16 fnum, POLICY_HND *hnd)
return valid_close;
}
+/****************************************************************************
+do a SVC Query Lookup RIDS
+****************************************************************************/
+BOOL svc_query_unknown_1b(struct cli_state *cli, uint16 fnum,
+ const POLICY_HND *pol, uint32 switch_value,
+ uint32 unknown_1,
+ uint32 *num_items,
+ uint32 ***items)
+{
+ prs_struct data;
+ prs_struct rdata;
+
+ SVC_Q_UNKNOWN_1B q_o;
+ BOOL valid_query = False;
+
+ if (pol == NULL || num_items == NULL || items == NULL ) return False;
+
+ /* create and send a MSRPC command with api SVC_UNKNOWN_1B */
+
+ prs_init(&data , 1024, 4, SAFETY_MARGIN, False);
+ prs_init(&rdata, 0 , 4, SAFETY_MARGIN, True );
+
+ DEBUG(4,("SVC Query Unknown 1b.\n"));
+
+ /* store the parameters */
+ make_svc_q_unknown_1b(&q_o, pol, switch_value, unknown_1);
+
+ /* turn parameters into data stream */
+ svc_io_q_unknown_1b("", &q_o, &data, 0);
+
+ /* send the data on \PIPE\ */
+ if (rpc_api_pipe_req(cli, fnum, SVC_UNKNOWN_1B, &data, &rdata))
+ {
+ SVC_R_UNKNOWN_1B r_o;
+ BOOL p;
+ ZERO_STRUCT(r_o);
+
+ svc_io_r_unknown_1b("", &r_o, &rdata, 0);
+ p = rdata.offset != 0;
+
+ if (p && r_o.status != 0)
+ {
+ /* report error code */
+ DEBUG(4,("SVC_R_UNKNOWN_1B: %s\n", get_nt_error_msg(r_o.status)));
+ p = False;
+ }
+ if (p)
+ {
+ (*num_items) = r_o.num_items1;
+ (*items) = r_o.items;
+ }
+ }
+
+ prs_mem_free(&data );
+ prs_mem_free(&rdata );
+
+ return valid_query;
+}