summaryrefslogtreecommitdiff
path: root/source4/torture/rpc
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-27 07:08:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:09:15 -0500
commit759da3b915e2006d4c87b5ace47f399accd9ce91 (patch)
tree6bcaf9d4c0e38ef5e975c041d442c4437aa61e5a /source4/torture/rpc
parent1e42cacf6a8643bd633f631c212d71760852abbc (diff)
downloadsamba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.gz
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.tar.bz2
samba-759da3b915e2006d4c87b5ace47f399accd9ce91.zip
r5037: got rid of all of the TALLOC_DEPRECATED stuff. My apologies for the
large commit. I thought this was worthwhile to get done for consistency. (This used to be commit ec32b22ed5ec224f6324f5e069d15e92e38e15c0)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r--source4/torture/rpc/alter_context.c2
-rw-r--r--source4/torture/rpc/atsvc.c2
-rw-r--r--source4/torture/rpc/bind.c4
-rw-r--r--source4/torture/rpc/dcom.c2
-rw-r--r--source4/torture/rpc/dfs.c2
-rw-r--r--source4/torture/rpc/drsuapi.c2
-rw-r--r--source4/torture/rpc/dssetup.c2
-rw-r--r--source4/torture/rpc/epmapper.c8
-rw-r--r--source4/torture/rpc/eventlog.c2
-rw-r--r--source4/torture/rpc/lsa.c14
-rw-r--r--source4/torture/rpc/netlogon.c4
-rw-r--r--source4/torture/rpc/oxidresolve.c2
-rw-r--r--source4/torture/rpc/remact.c2
-rw-r--r--source4/torture/rpc/samlogon.c2
-rw-r--r--source4/torture/rpc/samr.c10
-rw-r--r--source4/torture/rpc/samsync.c18
-rw-r--r--source4/torture/rpc/spoolss.c2
-rw-r--r--source4/torture/rpc/srvsvc.c6
-rw-r--r--source4/torture/rpc/svcctl.c2
-rw-r--r--source4/torture/rpc/testjoin.c4
-rw-r--r--source4/torture/rpc/winreg.c14
-rw-r--r--source4/torture/rpc/wkssvc.c2
-rw-r--r--source4/torture/rpc/xplogin.c38
23 files changed, 73 insertions, 73 deletions
diff --git a/source4/torture/rpc/alter_context.c b/source4/torture/rpc/alter_context.c
index 600b51d15b..79135ba018 100644
--- a/source4/torture/rpc/alter_context.c
+++ b/source4/torture/rpc/alter_context.c
@@ -97,7 +97,7 @@ BOOL torture_rpc_alter_context(void)
printf("testing DSSETUP pipe operations\n");
ret &= test_DsRoleGetPrimaryDomainInformation(p2, mem_ctx);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/atsvc.c b/source4/torture/rpc/atsvc.c
index 3d28fa775e..fd29a9228b 100644
--- a/source4/torture/rpc/atsvc.c
+++ b/source4/torture/rpc/atsvc.c
@@ -158,7 +158,7 @@ BOOL torture_rpc_atsvc(void)
return False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/bind.c b/source4/torture/rpc/bind.c
index fe0e29521a..d626536169 100644
--- a/source4/torture/rpc/bind.c
+++ b/source4/torture/rpc/bind.c
@@ -54,7 +54,7 @@ BOOL torture_multi_bind(void)
status = dcerpc_parse_binding(mem_ctx, binding_string, &b);
if (!NT_STATUS_IS_OK(status)) {
DEBUG(0,("Failed to parse dcerpc binding '%s'\n", binding_string));
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return False;
}
@@ -97,7 +97,7 @@ BOOL torture_multi_bind(void)
printf("\n");
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/dcom.c b/source4/torture/rpc/dcom.c
index f44ce96658..f8bcf40965 100644
--- a/source4/torture/rpc/dcom.c
+++ b/source4/torture/rpc/dcom.c
@@ -42,7 +42,7 @@ BOOL torture_rpc_dcom(void)
printf("\n");
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
return ret;
diff --git a/source4/torture/rpc/dfs.c b/source4/torture/rpc/dfs.c
index dd3227c2c1..358b94fa72 100644
--- a/source4/torture/rpc/dfs.c
+++ b/source4/torture/rpc/dfs.c
@@ -195,7 +195,7 @@ BOOL torture_rpc_dfs(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 4821d67d9c..f386c84a91 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -879,7 +879,7 @@ BOOL torture_rpc_drsuapi(void)
ret &= test_DsUnbind(p, mem_ctx, &priv);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/dssetup.c b/source4/torture/rpc/dssetup.c
index bafe562cdb..bd20a695e2 100644
--- a/source4/torture/rpc/dssetup.c
+++ b/source4/torture/rpc/dssetup.c
@@ -74,7 +74,7 @@ BOOL torture_rpc_dssetup(void)
ret &= test_DsRoleGetPrimaryDomainInformation(p, mem_ctx);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 1f3c8968ca..4fcd0757f0 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -300,7 +300,7 @@ static BOOL test_Insert(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
r.in.num_ents = 1;
- r.in.entries = talloc_array_p(mem_ctx, struct epm_entry_t, 1);
+ r.in.entries = talloc_array(mem_ctx, struct epm_entry_t, 1);
ZERO_STRUCT(r.in.entries[0].object);
r.in.entries[0].annotation = "smbtorture endpoint";
status = dcerpc_parse_binding(mem_ctx, "ncalrpc:[SMBTORTURE]", &bd);
@@ -309,7 +309,7 @@ static BOOL test_Insert(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
return False;
}
- r.in.entries[0].tower = talloc_p(mem_ctx, struct epm_twr_t);
+ r.in.entries[0].tower = talloc(mem_ctx, struct epm_twr_t);
status = dcerpc_binding_build_tower(mem_ctx, &bd, &r.in.entries[0].tower->tower);
if (NT_STATUS_IS_ERR(status)) {
@@ -343,7 +343,7 @@ static BOOL test_InqObject(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
NTSTATUS status;
struct epm_InqObject r;
- r.in.epm_object = talloc_p(mem_ctx, struct GUID);
+ r.in.epm_object = talloc(mem_ctx, struct GUID);
GUID_from_string(DCERPC_EPMAPPER_UUID, r.in.epm_object);
status = dcerpc_epm_InqObject(p, mem_ctx, &r);
@@ -384,7 +384,7 @@ BOOL torture_rpc_epmapper(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/eventlog.c b/source4/torture/rpc/eventlog.c
index 91e012cdec..7e320200f0 100644
--- a/source4/torture/rpc/eventlog.c
+++ b/source4/torture/rpc/eventlog.c
@@ -173,7 +173,7 @@ BOOL torture_rpc_eventlog(void)
test_CloseEventLog(p, mem_ctx, &handle);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/lsa.c b/source4/torture/rpc/lsa.c
index 2c802ea5de..089f58dc99 100644
--- a/source4/torture/rpc/lsa.c
+++ b/source4/torture/rpc/lsa.c
@@ -119,7 +119,7 @@ static BOOL test_LookupNames(struct dcerpc_pipe *p,
sids.count = 0;
sids.sids = NULL;
- names = talloc_array_p(mem_ctx, struct lsa_String, tnames->count);
+ names = talloc_array(mem_ctx, struct lsa_String, tnames->count);
for (i=0;i<tnames->count;i++) {
init_lsa_String(&names[i], tnames->names[i].name.string);
}
@@ -161,7 +161,7 @@ static BOOL test_LookupNames2(struct dcerpc_pipe *p,
sids.count = 0;
sids.sids = NULL;
- names = talloc_array_p(mem_ctx, struct lsa_String, tnames->count);
+ names = talloc_array(mem_ctx, struct lsa_String, tnames->count);
for (i=0;i<tnames->count;i++) {
init_lsa_String(&names[i], tnames->names[i].name.string);
}
@@ -206,7 +206,7 @@ static BOOL test_LookupNames3(struct dcerpc_pipe *p,
sids.count = 0;
sids.sids = NULL;
- names = talloc_array_p(mem_ctx, struct lsa_String, tnames->count);
+ names = talloc_array(mem_ctx, struct lsa_String, tnames->count);
for (i=0;i<tnames->count;i++) {
init_lsa_String(&names[i], tnames->names[i].name.string);
}
@@ -380,7 +380,7 @@ static BOOL test_many_LookupSids(struct dcerpc_pipe *p,
sids.num_sids = 100;
- sids.sids = talloc_array_p(mem_ctx, struct lsa_SidPtr, sids.num_sids);
+ sids.sids = talloc_array(mem_ctx, struct lsa_SidPtr, sids.num_sids);
for (i=0; i<sids.num_sids; i++) {
const char *sidstr = "S-1-5-32-545";
@@ -472,7 +472,7 @@ static BOOL test_RemovePrivilegesFromAccount(struct dcerpc_pipe *p,
privs.count = 1;
privs.unknown = 0;
- privs.set = talloc_array_p(mem_ctx, struct lsa_LUIDAttribute, 1);
+ privs.set = talloc_array(mem_ctx, struct lsa_LUIDAttribute, 1);
privs.set[0].luid = *luid;
privs.set[0].attribute = 0;
@@ -502,7 +502,7 @@ static BOOL test_AddPrivilegesToAccount(struct dcerpc_pipe *p,
privs.count = 1;
privs.unknown = 0;
- privs.set = talloc_array_p(mem_ctx, struct lsa_LUIDAttribute, 1);
+ privs.set = talloc_array(mem_ctx, struct lsa_LUIDAttribute, 1);
privs.set[0].luid = *luid;
privs.set[0].attribute = 0;
@@ -1674,7 +1674,7 @@ BOOL torture_rpc_lsa(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c
index 3da539aea5..0d7acd2875 100644
--- a/source4/torture/rpc/netlogon.c
+++ b/source4/torture/rpc/netlogon.c
@@ -1149,7 +1149,7 @@ static BOOL test_GetDomainInfo_async(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
struct creds_CredentialState creds_async[ASYNC_COUNT];
struct rpc_request *req[ASYNC_COUNT];
int i;
- int *async_counter = talloc_p(mem_ctx, int);
+ int *async_counter = talloc(mem_ctx, int);
if (!lp_parm_bool(-1, "torture", "dangerous", False)) {
printf("test_GetDomainInfo_async disabled - enable dangerous tests to use\n");
@@ -1362,7 +1362,7 @@ BOOL torture_rpc_netlogon(void)
ret &= test_GetDomainInfo_async(p, mem_ctx);
ret &= test_netr_DrsGetDCNameEx2(p, mem_ctx);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/oxidresolve.c b/source4/torture/rpc/oxidresolve.c
index 1849302929..b565d5de76 100644
--- a/source4/torture/rpc/oxidresolve.c
+++ b/source4/torture/rpc/oxidresolve.c
@@ -261,7 +261,7 @@ BOOL torture_rpc_oxidresolve(void)
if(!test_ResolveOxid2(p, mem_ctx, oxid))
ret = False;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/remact.c b/source4/torture/rpc/remact.c
index 897dd78255..aaef981fdb 100644
--- a/source4/torture/rpc/remact.c
+++ b/source4/torture/rpc/remact.c
@@ -117,7 +117,7 @@ BOOL torture_rpc_remact(void)
if(!test_RemoteActivation(p, mem_ctx))
ret = False;
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/samlogon.c b/source4/torture/rpc/samlogon.c
index afb30b1987..1c7e3e0350 100644
--- a/source4/torture/rpc/samlogon.c
+++ b/source4/torture/rpc/samlogon.c
@@ -1297,7 +1297,7 @@ BOOL torture_rpc_samlogon(void)
}
failed:
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/samr.c b/source4/torture/rpc/samr.c
index 5d20587d26..fa64b556ef 100644
--- a/source4/torture/rpc/samr.c
+++ b/source4/torture/rpc/samr.c
@@ -629,7 +629,7 @@ static BOOL test_SetAliasInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.alias_handle = handle;
r.in.level = levels[i];
- r.in.info = talloc_p(mem_ctx, union samr_AliasInfo);
+ r.in.info = talloc(mem_ctx, union samr_AliasInfo);
switch (r.in.level) {
case 2 : init_samr_String(&r.in.info->name,TEST_ALIASNAME); break;
case 3 : init_samr_String(&r.in.info->description,
@@ -1201,7 +1201,7 @@ static BOOL test_AddMultipleMembersToAlias(struct dcerpc_pipe *p, TALLOC_CTX *me
a.in.sids = &sids;
sids.num_sids = 3;
- sids.sids = talloc_array_p(mem_ctx, struct lsa_SidPtr, 3);
+ sids.sids = talloc_array(mem_ctx, struct lsa_SidPtr, 3);
sids.sids[0].sid = dom_sid_parse_talloc(mem_ctx, "S-1-5-32-1-2-3-1");
sids.sids[1].sid = dom_sid_parse_talloc(mem_ctx, "S-1-5-32-1-2-3-2");
@@ -2137,7 +2137,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing LookupNames\n");
n.in.domain_handle = handle;
n.in.num_names = r.out.sam->count;
- n.in.names = talloc_array_p(mem_ctx, struct samr_String, r.out.sam->count);
+ n.in.names = talloc_array(mem_ctx, struct samr_String, r.out.sam->count);
for (i=0;i<r.out.sam->count;i++) {
n.in.names[i] = r.out.sam->entries[i].name;
}
@@ -2151,7 +2151,7 @@ static BOOL test_EnumDomainUsers(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing LookupRids\n");
lr.in.domain_handle = handle;
lr.in.num_rids = r.out.sam->count;
- lr.in.rids = talloc_array_p(mem_ctx, uint32_t, r.out.sam->count);
+ lr.in.rids = talloc_array(mem_ctx, uint32_t, r.out.sam->count);
for (i=0;i<r.out.sam->count;i++) {
lr.in.rids[i] = r.out.sam->entries[i].idx;
}
@@ -3199,7 +3199,7 @@ BOOL torture_rpc_samr(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/samsync.c b/source4/torture/rpc/samsync.c
index 2efb16222b..f7800e28cc 100644
--- a/source4/torture/rpc/samsync.c
+++ b/source4/torture/rpc/samsync.c
@@ -138,7 +138,7 @@ static struct policy_handle *samsync_open_domain(TALLOC_CTX *mem_ctx,
struct samr_String name;
struct samr_OpenDomain o;
struct samr_LookupDomain l;
- struct policy_handle *domain_handle = talloc_p(mem_ctx, struct policy_handle);
+ struct policy_handle *domain_handle = talloc(mem_ctx, struct policy_handle);
NTSTATUS nt_status;
name.string = domain;
@@ -705,8 +705,8 @@ static BOOL samsync_handle_secret(TALLOC_CTX *mem_ctx, struct samsync_state *sam
{
struct netr_DELTA_SECRET *secret = delta->delta_union.secret;
const char *name = delta->delta_id_union.name;
- struct samsync_secret *new = talloc_p(samsync_state, struct samsync_secret);
- struct samsync_secret *old = talloc_p(mem_ctx, struct samsync_secret);
+ struct samsync_secret *new = talloc(samsync_state, struct samsync_secret);
+ struct samsync_secret *old = talloc(mem_ctx, struct samsync_secret);
struct lsa_QuerySecret q;
struct lsa_OpenSecret o;
struct policy_handle sec_handle;
@@ -868,7 +868,7 @@ static BOOL samsync_handle_trusted_domain(TALLOC_CTX *mem_ctx, struct samsync_st
struct netr_DELTA_TRUSTED_DOMAIN *trusted_domain = delta->delta_union.trusted_domain;
struct dom_sid *dom_sid = delta->delta_id_union.sid;
- struct samsync_trusted_domain *new = talloc_p(samsync_state, struct samsync_trusted_domain);
+ struct samsync_trusted_domain *new = talloc(samsync_state, struct samsync_trusted_domain);
struct lsa_OpenTrustedDomain t;
struct policy_handle trustdom_handle;
struct lsa_QueryTrustedDomainInfo q;
@@ -1311,11 +1311,11 @@ BOOL torture_rpc_samsync(void)
return False;
}
- samsync_state = talloc_zero_p(mem_ctx, struct samsync_state);
+ samsync_state = talloc_zero(mem_ctx, struct samsync_state);
samsync_state->p_samr = torture_join_samr_pipe(join_ctx);
- samsync_state->connect_handle = talloc_zero_p(samsync_state, struct policy_handle);
- samsync_state->lsa_handle = talloc_zero_p(samsync_state, struct policy_handle);
+ samsync_state->connect_handle = talloc_zero(samsync_state, struct policy_handle);
+ samsync_state->lsa_handle = talloc_zero(samsync_state, struct policy_handle);
c.in.system_name = NULL;
c.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
c.out.connect_handle = samsync_state->connect_handle;
@@ -1336,7 +1336,7 @@ BOOL torture_rpc_samsync(void)
s.in.domain_handle = domain_policy;
s.in.level = 4;
- s.in.info = talloc_p(mem_ctx, union samr_DomainInfo);
+ s.in.info = talloc(mem_ctx, union samr_DomainInfo);
s.in.info->info4.comment.string
= talloc_asprintf(mem_ctx,
@@ -1469,7 +1469,7 @@ failed:
torture_leave_domain(join_ctx);
torture_leave_domain(join_ctx2);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return ret;
}
diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c
index 6f2edf9f47..c11a004e33 100644
--- a/source4/torture/rpc/spoolss.c
+++ b/source4/torture/rpc/spoolss.c
@@ -1054,7 +1054,7 @@ BOOL torture_rpc_spoolss(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/srvsvc.c b/source4/torture/rpc/srvsvc.c
index 4cc7dc6291..4b1305b7b6 100644
--- a/source4/torture/rpc/srvsvc.c
+++ b/source4/torture/rpc/srvsvc.c
@@ -204,11 +204,11 @@ static BOOL test_NetCharDevQSetInfo(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
r.in.level, devicequeue);
switch (r.in.level) {
case 0:
- r.in.info.info0 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQInfo0);
+ r.in.info.info0 = talloc(mem_ctx, struct srvsvc_NetCharDevQInfo0);
r.in.info.info0->device = r.in.queue_name;
break;
case 1:
- r.in.info.info1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQInfo1);
+ r.in.info.info1 = talloc(mem_ctx, struct srvsvc_NetCharDevQInfo1);
r.in.info.info1->device = r.in.queue_name;
r.in.info.info1->priority = 0x000;
r.in.info.info1->devices = r.in.queue_name;
@@ -772,7 +772,7 @@ BOOL torture_rpc_srvsvc(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/svcctl.c b/source4/torture/rpc/svcctl.c
index 256f92b974..cadc80a417 100644
--- a/source4/torture/rpc/svcctl.c
+++ b/source4/torture/rpc/svcctl.c
@@ -137,7 +137,7 @@ BOOL torture_rpc_svcctl(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index d034446adb..626bb666c1 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -107,7 +107,7 @@ struct test_join *torture_join_domain(const char *machine_name,
int policy_min_pw_len = 0;
struct test_join *join;
- join = talloc_p(NULL, struct test_join);
+ join = talloc(NULL, struct test_join);
if (join == NULL) {
return NULL;
}
@@ -287,7 +287,7 @@ struct test_join_ads_dc *torture_join_domain_ads_dc(const char *machine_name,
{
struct test_join_ads_dc *join;
- join = talloc_p(NULL, struct test_join_ads_dc);
+ join = talloc(NULL, struct test_join_ads_dc);
if (join == NULL) {
return NULL;
}
diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c
index 9e24a9f055..f2d79fffa0 100644
--- a/source4/torture/rpc/winreg.c
+++ b/source4/torture/rpc/winreg.c
@@ -136,7 +136,7 @@ static BOOL test_GetKeySecurity(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
ZERO_STRUCT(r);
r.in.handle = handle;
- r.in.data = r.out.data = talloc_zero_p(mem_ctx, struct KeySecurityData);
+ r.in.data = r.out.data = talloc_zero(mem_ctx, struct KeySecurityData);
r.in.data->size = 0xffff;
r.in.access_mask = SEC_FLAG_MAXIMUM_ALLOWED;
@@ -357,15 +357,15 @@ static BOOL test_QueryMultipleValues(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("Testing QueryMultipleValues\n");
r.in.key_handle = handle;
- r.in.values = r.out.values = talloc_array_p(mem_ctx, struct QueryMultipleValue, 1);
- r.in.values[0].name = talloc_p(mem_ctx, struct winreg_String);
+ r.in.values = r.out.values = talloc_array(mem_ctx, struct QueryMultipleValue, 1);
+ r.in.values[0].name = talloc(mem_ctx, struct winreg_String);
r.in.values[0].name->name = valuename;
r.in.values[0].offset = 0;
r.in.values[0].length = 0;
r.in.values[0].type = 0;
r.in.num_values = 1;
- r.in.buffer_size = r.out.buffer_size = talloc_p(mem_ctx, uint32);
+ r.in.buffer_size = r.out.buffer_size = talloc(mem_ctx, uint32);
*r.in.buffer_size = 0x20;
r.in.buffer = r.out.buffer = talloc_zero_array(mem_ctx, uint8, *r.in.buffer_size);
@@ -557,7 +557,7 @@ static BOOL test_InitiateSystemShutdown(struct dcerpc_pipe *p, TALLOC_CTX *mem_c
NTSTATUS status;
r.in.hostname = NULL;
- r.in.message = talloc_p(mem_ctx, struct winreg_String);
+ r.in.message = talloc(mem_ctx, struct winreg_String);
init_winreg_String(r.in.message, msg);
r.in.force_apps = 1;
r.in.timeout = timeout;
@@ -585,7 +585,7 @@ static BOOL test_InitiateSystemShutdownEx(struct dcerpc_pipe *p, TALLOC_CTX *mem
NTSTATUS status;
r.in.hostname = NULL;
- r.in.message = talloc_p(mem_ctx, struct winreg_String);
+ r.in.message = talloc(mem_ctx, struct winreg_String);
init_winreg_String(r.in.message, msg);
r.in.force_apps = 1;
r.in.timeout = timeout;
@@ -784,7 +784,7 @@ BOOL torture_rpc_winreg(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/wkssvc.c b/source4/torture/rpc/wkssvc.c
index baa1f6bfd8..f3a3ec233c 100644
--- a/source4/torture/rpc/wkssvc.c
+++ b/source4/torture/rpc/wkssvc.c
@@ -109,7 +109,7 @@ BOOL torture_rpc_wkssvc(void)
ret = False;
}
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
torture_rpc_close(p);
diff --git a/source4/torture/rpc/xplogin.c b/source4/torture/rpc/xplogin.c
index 3c4a881d96..8915417995 100644
--- a/source4/torture/rpc/xplogin.c
+++ b/source4/torture/rpc/xplogin.c
@@ -279,7 +279,7 @@ static NTSTATUS test_enumtrusts(struct smbcli_transport *transport)
DCERPC_LSARPC_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -326,7 +326,7 @@ static NTSTATUS test_enumtrusts(struct smbcli_transport *transport)
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -350,7 +350,7 @@ static NTSTATUS test_lookupnames(struct smbcli_transport *transport,
DCERPC_LSARPC_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -404,7 +404,7 @@ static NTSTATUS test_lookupnames(struct smbcli_transport *transport,
!NT_STATUS_EQUAL(status, STATUS_SOME_UNMAPPED)) {
printf("LookupNames failed - %s\n", nt_errstr(status));
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
}
@@ -425,7 +425,7 @@ static NTSTATUS test_lookupnames(struct smbcli_transport *transport,
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -457,7 +457,7 @@ static NTSTATUS setup_netlogon_creds(struct smbcli_transport *transport,
DCERPC_NETLOGON_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -569,7 +569,7 @@ static NTSTATUS torture_samlogon(struct dcerpc_pipe *p,
&lmv2_response, &ntlmv2_response,
NULL, NULL)) {
data_blob_free(&names_blob);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_UNSUCCESSFUL;
}
data_blob_free(&names_blob);
@@ -591,7 +591,7 @@ static NTSTATUS torture_samlogon(struct dcerpc_pipe *p,
log.out.return_authenticator = NULL;
status = dcerpc_netr_LogonSamLogon(p, mem_ctx, &log);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
data_blob_free(&lmv2_response);
data_blob_free(&ntlmv2_response);
return status;
@@ -616,7 +616,7 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport,
DCERPC_SAMR_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -720,14 +720,14 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport,
l.in.domain_handle = &domain_handle;
l.in.num_rids = g.out.rids->count;
- l.in.rids = talloc_array_p(mem_ctx, uint32_t, g.out.rids->count);
+ l.in.rids = talloc_array(mem_ctx, uint32_t, g.out.rids->count);
for (i=0; i<g.out.rids->count; i++)
l.in.rids[i] = g.out.rids->rid[i].rid;
status = dcerpc_samr_LookupRids(p, mem_ctx, &l);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
}
@@ -749,7 +749,7 @@ static NTSTATUS test_getgroups(struct smbcli_transport *transport,
}
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -780,7 +780,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
DCERPC_SAMR_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -912,7 +912,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
ga.in.domain_handle = &builtin_handle;
sids.num_sids = g.out.rids->count+2;
- sids.sids = talloc_array_p(mem_ctx, struct lsa_SidPtr,
+ sids.sids = talloc_array(mem_ctx, struct lsa_SidPtr,
g.out.rids->count+2);
sids.sids[0].sid = user_sid;
sids.sids[1].sid = primary_group_sid;
@@ -958,7 +958,7 @@ static NTSTATUS test_getallsids(struct smbcli_transport *transport,
}
talloc_free(p);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return NT_STATUS_OK;
}
@@ -979,7 +979,7 @@ static NTSTATUS test_remoteTOD(struct smbcli_transport *transport)
DCERPC_SRVSVC_VERSION);
if (!NT_STATUS_IS_OK(status)) {
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return status;
}
@@ -993,7 +993,7 @@ static NTSTATUS test_remoteTOD(struct smbcli_transport *transport)
ZERO_STRUCT(r.out);
status = dcerpc_srvsvc_NetRemoteTOD(p, mem_ctx, &r);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
talloc_free(p);
return status;
}
@@ -1021,7 +1021,7 @@ static BOOL xp_login(const char *dcname, const char *wksname,
if (mem_ctx == NULL)
return False;
- netlogon_creds = talloc_p(mem_ctx, struct creds_CredentialState);
+ netlogon_creds = talloc(mem_ctx, struct creds_CredentialState);
if (!netlogon_creds) {
return False;
}
@@ -1112,7 +1112,7 @@ static BOOL xp_login(const char *dcname, const char *wksname,
talloc_free(transport);
- talloc_destroy(mem_ctx);
+ talloc_free(mem_ctx);
return True;
}