summaryrefslogtreecommitdiff
path: root/source3/rpcclient/rpcclient.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-24 23:11:03 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-24 23:11:03 +0000
commita70a4626df78965e1ad9c7f89f5d1c490e373ee0 (patch)
treeea252061104d838dd813ceee30d370017db5d5db /source3/rpcclient/rpcclient.c
parent2803a72751cf511aa0b5e6745e1b169faa66f68a (diff)
downloadsamba-a70a4626df78965e1ad9c7f89f5d1c490e373ee0.tar.gz
samba-a70a4626df78965e1ad9c7f89f5d1c490e373ee0.tar.bz2
samba-a70a4626df78965e1ad9c7f89f5d1c490e373ee0.zip
service control manager API completed. svcenum -i works, but does not
do so twice. possible memory corruption, revolving around getopt(). (This used to be commit 7cacf8bd026f1ee274f1d352c68cf79cf4f3b499)
Diffstat (limited to 'source3/rpcclient/rpcclient.c')
-rw-r--r--source3/rpcclient/rpcclient.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 5fa103a57f..6891d4435b 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -1112,6 +1112,12 @@ static char *complete_svcenum(char *text, int state)
static uint32 i = 0;
static uint32 num_svcs = 0;
static ENUM_SRVC_STATUS *svc = NULL;
+ fstring srv_name;
+
+ fstrcpy(srv_name, "\\\\");
+ fstrcat(srv_name, cli_info.dest_host);
+ strupper(srv_name);
+
if (state == 0)
{
@@ -1120,7 +1126,7 @@ static char *complete_svcenum(char *text, int state)
num_svcs = 0;
/* Iterate all users */
- if (msrpc_svc_enum(&cli_info, &svc, &num_svcs,
+ if (msrpc_svc_enum(srv_name, &svc, &num_svcs,
NULL, NULL) == 0)
{
return NULL;