summaryrefslogtreecommitdiff
path: root/source3/rpc_client
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1999-11-02 23:31:16 +0000
committerLuke Leighton <lkcl@samba.org>1999-11-02 23:31:16 +0000
commitaa77f20a5b8fc83799e4befe668eb2da42727ac7 (patch)
tree02bf0cd57dacf26c5dbb36b7478e34bac2d84c1f /source3/rpc_client
parentdcc037cfc6d96e65048b5b5f975cca834a751016 (diff)
downloadsamba-aa77f20a5b8fc83799e4befe668eb2da42727ac7.tar.gz
samba-aa77f20a5b8fc83799e4befe668eb2da42727ac7.tar.bz2
samba-aa77f20a5b8fc83799e4befe668eb2da42727ac7.zip
dynamic mem allocation in enum dom groups and enum dom aliases
(This used to be commit baa789fabc45e62889755802fd8ec8c9191fe767)
Diffstat (limited to 'source3/rpc_client')
-rw-r--r--source3/rpc_client/cli_lsarpc.c4
-rw-r--r--source3/rpc_client/cli_samr.c21
2 files changed, 23 insertions, 2 deletions
diff --git a/source3/rpc_client/cli_lsarpc.c b/source3/rpc_client/cli_lsarpc.c
index 66444e631b..ce11999955 100644
--- a/source3/rpc_client/cli_lsarpc.c
+++ b/source3/rpc_client/cli_lsarpc.c
@@ -123,12 +123,12 @@ BOOL lsa_open_policy2(struct cli_state *cli, uint16 fnum,
/* store the parameters */
if (sec_qos)
{
- make_lsa_sec_qos(&qos, 2, 1, 0, 0x000f0fff);
+ make_lsa_sec_qos(&qos, 2, 1, 0, 0x02000000);
make_q_open_pol2(&q_o, server_name, 0, 0x02000000, &qos);
}
else
{
- make_q_open_pol2(&q_o, server_name, 0, 0x1, NULL);
+ make_q_open_pol2(&q_o, server_name, 0, 0x02000000, NULL);
}
/* turn parameters into data stream */
diff --git a/source3/rpc_client/cli_samr.c b/source3/rpc_client/cli_samr.c
index 7c1860dee1..4ec658e664 100644
--- a/source3/rpc_client/cli_samr.c
+++ b/source3/rpc_client/cli_samr.c
@@ -665,6 +665,14 @@ uint32 samr_enum_dom_groups(struct cli_state *cli, uint16 fnum,
status = NT_STATUS_INVALID_PARAMETER | 0xC0000000;
}
+ if (r_e.sam != NULL)
+ {
+ free(r_e.sam);
+ }
+ if (r_e.uni_grp_name != NULL)
+ {
+ free(r_e.uni_grp_name);
+ }
}
prs_mem_free(&data );
@@ -753,6 +761,19 @@ uint32 samr_enum_dom_aliases(struct cli_state *cli, uint16 fnum,
}
(*start_idx) = r_e.next_idx;
}
+ else if (status == 0x0)
+ {
+ status = NT_STATUS_INVALID_PARAMETER | 0xC0000000;
+ }
+
+ if (r_e.sam != NULL)
+ {
+ free(r_e.sam);
+ }
+ if (r_e.uni_grp_name != NULL)
+ {
+ free(r_e.uni_grp_name);
+ }
}
prs_mem_free(&data );