summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-10-21 19:02:57 +0000
committerLuke Leighton <lkcl@samba.org>1999-10-21 19:02:57 +0000
commit45b794bdde0cb906216425c8fc2af8610aa8ad3c (patch)
tree6dd018021c24dee66dc57b23d3c876acc658293c /source3/rpcclient
parent52fed795e156b9db8a0f29d9087042ccdec093f5 (diff)
downloadsamba-45b794bdde0cb906216425c8fc2af8610aa8ad3c.tar.gz
samba-45b794bdde0cb906216425c8fc2af8610aa8ad3c.tar.bz2
samba-45b794bdde0cb906216425c8fc2af8610aa8ad3c.zip
the dynamic memory alloc blood-fest goes on...
(This used to be commit 134b20e2a7b5ddfa4cc9bf100de5025c7b98f594)
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/cmd_lsarpc.c2
-rw-r--r--source3/rpcclient/cmd_netlogon.c6
-rw-r--r--source3/rpcclient/cmd_samr.c26
3 files changed, 16 insertions, 18 deletions
diff --git a/source3/rpcclient/cmd_lsarpc.c b/source3/rpcclient/cmd_lsarpc.c
index 57336362d1..d0e429801e 100644
--- a/source3/rpcclient/cmd_lsarpc.c
+++ b/source3/rpcclient/cmd_lsarpc.c
@@ -129,7 +129,7 @@ void cmd_lsa_lookup_names(struct client_info *info)
int i;
fstring srv_name;
int num_names = 0;
- const char *names[10];
+ char *names[10];
DOM_SID *sids = NULL;
int num_sids = 0;
#if 0
diff --git a/source3/rpcclient/cmd_netlogon.c b/source3/rpcclient/cmd_netlogon.c
index c9eee7bf8a..3652218692 100644
--- a/source3/rpcclient/cmd_netlogon.c
+++ b/source3/rpcclient/cmd_netlogon.c
@@ -166,7 +166,7 @@ void cmd_netlogon_domain_test(struct client_info *info)
res = res ? cli_nt_session_open(smb_cli, PIPE_NETLOGON, &nt_pipe_fnum) : False;
res = res ? cli_nt_setup_creds(smb_cli, nt_pipe_fnum, inter_dom_acct,
- trust_passwd, global_myname,
+ global_myname, trust_passwd,
SEC_CHAN_DOMAIN) == 0x0 : False;
memset(trust_passwd, 0, 16);
@@ -195,8 +195,8 @@ void cmd_sam_sync(struct client_info *info)
return;
}
- if (do_sam_sync(smb_cli, global_myname,
- trust_passwd, hdr_deltas, deltas, &num))
+ if (do_sam_sync(smb_cli, trust_passwd, global_myname,
+ hdr_deltas, deltas, &num))
{
display_sam_sync(out_hnd, ACTION_HEADER , hdr_deltas, deltas, num);
display_sam_sync(out_hnd, ACTION_ENUMERATE, hdr_deltas, deltas, num);
diff --git a/source3/rpcclient/cmd_samr.c b/source3/rpcclient/cmd_samr.c
index 910db7eae3..66b10319ed 100644
--- a/source3/rpcclient/cmd_samr.c
+++ b/source3/rpcclient/cmd_samr.c
@@ -1311,12 +1311,6 @@ static void req_alias_info(struct client_info *info, uint16 fnum,
}
}
- if (rid != NULL)
- {
- free(rid);
- rid = NULL;
- }
-
/* send user alias query */
if (samr_query_useraliases(smb_cli, fnum,
&info->dom.samr_pol_open_builtindom,
@@ -1347,11 +1341,6 @@ static void req_alias_info(struct client_info *info, uint16 fnum,
free(ptr_sid);
ptr_sid = NULL;
}
- if (rid != NULL)
- {
- free(rid);
- rid = NULL;
- }
if (als_sid != NULL)
{
free(als_sid);
@@ -1987,13 +1976,13 @@ static void req_groupmem_info(struct client_info *info, uint16 fnum,
uint32 group_rid)
{
uint32 num_mem;
- uint32 rid_mem[MAX_LOOKUP_SIDS];
- uint32 attr_mem[MAX_LOOKUP_SIDS];
+ uint32 *rid_mem = NULL;
+ uint32 *attr_mem = NULL;
/* get group members */
if (get_samr_query_groupmem(smb_cli, fnum,
&info->dom.samr_pol_open_domain,
- group_rid, &num_mem, rid_mem, attr_mem))
+ group_rid, &num_mem, &rid_mem, &attr_mem))
{
BOOL res3 = True;
int num_names = 0;
@@ -2017,6 +2006,15 @@ static void req_groupmem_info(struct client_info *info, uint16 fnum,
free(type);
}
}
+
+ if (attr_mem != NULL)
+ {
+ free(attr_mem);
+ }
+ if (rid_mem != NULL)
+ {
+ free(rid_mem);
+ }
}
/****************************************************************************