summaryrefslogtreecommitdiff
path: root/source3/rpcclient/cmd_svcctl.c
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/rpcclient/cmd_svcctl.c
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/rpcclient/cmd_svcctl.c')
-rw-r--r--source3/rpcclient/cmd_svcctl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/source3/rpcclient/cmd_svcctl.c b/source3/rpcclient/cmd_svcctl.c
index 63f0d9651c..4f0978e17f 100644
--- a/source3/rpcclient/cmd_svcctl.c
+++ b/source3/rpcclient/cmd_svcctl.c
@@ -46,6 +46,7 @@ void cmd_svc_enum(struct client_info *info)
BOOL res1 = True;
int i;
uint32 resume_hnd = 0;
+ ENUM_SRVC_STATUS *svcs = NULL;
POLICY_HND sc_man_pol;
fstring full_keyname;
@@ -65,11 +66,20 @@ void cmd_svc_enum(struct client_info *info)
srv_name, NULL, 0x80000004,
&sc_man_pol) : False;
+ do
+ {
/* enumerate services */
res1 = res ? do_svc_enum_svcs(smb_cli, fnum,
&sc_man_pol,
0x00000030, 0x00000003,
- 0x00000200, &resume_hnd) : False;
+ 0x00000080, &resume_hnd, &svcs) : False;
+
+ } while (resume_hnd != 0);
+
+ if (svcs != NULL)
+ {
+ free(svcs);
+ }
#if 0
if (res1 && num_subkeys > 0)