summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-12-09 16:28:04 +0000
committerLuke Leighton <lkcl@samba.org>1998-12-09 16:28:04 +0000
commit74576a48fdf71e4264a892fda58302053f809670 (patch)
tree4e64111670ec80db301328b8aab1596857b9e97f /source3/rpc_client
parent1f989cda944f21b3ba829e1008f1189d2d3671a8 (diff)
downloadsamba-74576a48fdf71e4264a892fda58302053f809670.tar.gz
samba-74576a48fdf71e4264a892fda58302053f809670.tar.bz2
samba-74576a48fdf71e4264a892fda58302053f809670.zip
adding some enumerate services code, client and server.
(This used to be commit dacf5b152bf74cc3ee9a816911384a5eb0e77afa)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_svcctl.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/source3/rpc_client/cli_svcctl.c b/source3/rpc_client/cli_svcctl.c
index 90d74188da..3535c90391 100644
--- a/source3/rpc_client/cli_svcctl.c
+++ b/source3/rpc_client/cli_svcctl.c
@@ -97,7 +97,8 @@ do a SVC Enumerate Services
BOOL do_svc_enum_svcs(struct cli_state *cli, uint16 fnum,
POLICY_HND *hnd,
uint32 services_type, uint32 services_state,
- uint32 buf_size, uint32 *resume_hnd)
+ uint32 buf_size, uint32 *resume_hnd,
+ ENUM_SRVC_STATUS **svcs)
{
prs_struct rbuf;
prs_struct buf;
@@ -123,7 +124,6 @@ BOOL do_svc_enum_svcs(struct cli_state *cli, uint16 fnum,
/* send the data on \PIPE\ */
if (rpc_api_pipe_req(cli, fnum, SVC_ENUM_SVCS_STATUS, &buf, &rbuf))
{
-#if 0
SVC_R_ENUM_SVCS_STATUS r_o;
BOOL p;
@@ -132,22 +132,19 @@ BOOL do_svc_enum_svcs(struct cli_state *cli, uint16 fnum,
svc_io_r_enum_svcs_status("", &r_o, &rbuf, 0);
p = rbuf.offset != 0;
- if (p && r_o.status != 0)
+ if (p && r_o.dos_status != 0)
{
/* report error code */
- DEBUG(0,("SVC_ENUM_SVCS_STATUS: %s\n", get_nt_error_msg(r_o.status)));
- p = False;
+ DEBUG(0,("SVC_ENUM_SVCS_STATUS: %s\n", smb_err_msg(ERRDOS, r_o.dos_status)));
+ p = r_o.dos_status != ERRmoredata;
}
if (p)
{
- /* ok, at last: we're happy. return the policy handle */
- memcpy(hnd, r_o.pol.data, sizeof(hnd->data));
+ (*svcs) = r_o.svcs;
+ (*resume_hnd) = get_enum_hnd(&r_o.resume_hnd);
valid_pol = True;
}
-#else
- valid_pol = True;
-#endif
}
prs_mem_free(&rbuf);