summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-03-01 21:02:24 +1100
committerAndrew Bartlett <abartlet@samba.org>2012-03-01 22:04:46 +1100
commit1a5eafba13fa54dd44626625886d1e7a4adf5a2c (patch)
tree059475a5a256c39ada318e28cc305536f4da78d7 /source4/libnet
parent31bf81a03c222f8c42996aebb127a31d23dc799e (diff)
downloadsamba-1a5eafba13fa54dd44626625886d1e7a4adf5a2c.tar.gz
samba-1a5eafba13fa54dd44626625886d1e7a4adf5a2c.tar.bz2
samba-1a5eafba13fa54dd44626625886d1e7a4adf5a2c.zip
s4-libnet: Move to talloc_get_type_abort()
The NULL pointer dereference from talloc_get_type() might be free, but the information on the actual and expected types from talloc_get_type_abort() is priceless! :-) Andrew Bartlett
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/libnet_domain.c38
-rw-r--r--source4/libnet/libnet_group.c38
-rw-r--r--source4/libnet/libnet_user.c60
-rw-r--r--source4/libnet/userinfo.c10
4 files changed, 73 insertions, 73 deletions
diff --git a/source4/libnet/libnet_domain.c b/source4/libnet/libnet_domain.c
index 0fafe71250..b2a88827bd 100644
--- a/source4/libnet/libnet_domain.c
+++ b/source4/libnet/libnet_domain.c
@@ -62,8 +62,8 @@ static void continue_domain_open_rpc_connect(struct composite_context *ctx)
struct domain_open_samr_state *s;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_samr_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_samr_state);
c->status = libnet_RpcConnect_recv(ctx, s->ctx, c, &s->rpcconn);
if (!composite_is_ok(c)) return;
@@ -96,7 +96,7 @@ static void continue_domain_open_close(struct tevent_req *subreq)
struct domain_open_samr_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_samr_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_samr_state);
/* receive samr_Close reply */
c->status = dcerpc_samr_Close_r_recv(subreq, s);
@@ -143,7 +143,7 @@ static void continue_domain_open_connect(struct tevent_req *subreq)
struct samr_LookupDomain *r;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_samr_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_samr_state);
/* receive samr_Connect reply */
c->status = dcerpc_samr_Connect_r_recv(subreq, s);
@@ -186,7 +186,7 @@ static void continue_domain_open_lookup(struct tevent_req *subreq)
struct samr_OpenDomain *r;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_samr_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_samr_state);
/* receive samr_LookupDomain reply */
c->status = dcerpc_samr_LookupDomain_r_recv(subreq, s);
@@ -239,7 +239,7 @@ static void continue_domain_open_open(struct tevent_req *subreq)
struct domain_open_samr_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_samr_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_samr_state);
/* receive samr_OpenDomain reply */
c->status = dcerpc_samr_OpenDomain_r_recv(subreq, s);
@@ -370,7 +370,7 @@ NTSTATUS libnet_DomainOpenSamr_recv(struct composite_context *c, struct libnet_c
status = composite_wait(c);
if (NT_STATUS_IS_OK(status) && io) {
- s = talloc_get_type(c->private_data, struct domain_open_samr_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_samr_state);
io->out.domain_handle = s->domain_handle;
/* store the resulting handle and related data for use by other
@@ -492,8 +492,8 @@ static void continue_rpc_connect_lsa(struct composite_context *ctx)
struct lsa_QosInfo *qos;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_lsa_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_lsa_state);
/* receive rpc connection */
c->status = libnet_RpcConnect_recv(ctx, s->ctx, c, &s->rpcconn);
@@ -536,7 +536,7 @@ static void continue_lsa_policy_open(struct tevent_req *subreq)
struct domain_open_lsa_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_open_lsa_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_lsa_state);
c->status = dcerpc_lsa_OpenPolicy2_r_recv(subreq, s);
TALLOC_FREE(subreq);
@@ -576,7 +576,7 @@ NTSTATUS libnet_DomainOpenLsa_recv(struct composite_context *c, struct libnet_co
if (NT_STATUS_IS_OK(status) && io) {
/* everything went fine - get the results and
return the error string */
- s = talloc_get_type(c->private_data, struct domain_open_lsa_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_open_lsa_state);
io->out.domain_handle = s->handle;
ctx->lsa.handle = s->handle;
@@ -739,7 +739,7 @@ static void continue_lsa_close(struct tevent_req *subreq)
struct domain_close_lsa_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_close_lsa_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_close_lsa_state);
c->status = dcerpc_lsa_Close_r_recv(subreq, s);
TALLOC_FREE(subreq);
@@ -844,7 +844,7 @@ static void continue_samr_close(struct tevent_req *subreq)
struct domain_close_samr_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_close_samr_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_close_samr_state);
c->status = dcerpc_samr_Close_r_recv(subreq, s);
TALLOC_FREE(subreq);
@@ -981,8 +981,8 @@ static void continue_rpc_connect(struct composite_context *ctx)
struct domain_list_state *s;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_list_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct domain_list_state);
c->status = libnet_RpcConnect_recv(ctx, s->ctx, c, &s->rpcconn);
if (!composite_is_ok(c)) return;
@@ -1010,7 +1010,7 @@ static void continue_samr_connect(struct tevent_req *subreq)
struct domain_list_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_list_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_list_state);
c->status = dcerpc_samr_Connect_r_recv(subreq, s);
TALLOC_FREE(subreq);
@@ -1054,7 +1054,7 @@ static void continue_samr_enum_domains(struct tevent_req *subreq)
struct domain_list_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_list_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_list_state);
c->status = dcerpc_samr_EnumDomains_r_recv(subreq, s);
TALLOC_FREE(subreq);
@@ -1119,7 +1119,7 @@ static void continue_samr_close_handle(struct tevent_req *subreq)
struct domain_list_state *s;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct domain_list_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_list_state);
c->status = dcerpc_samr_Close_r_recv(subreq, s);
TALLOC_FREE(subreq);
@@ -1260,7 +1260,7 @@ NTSTATUS libnet_DomainList_recv(struct composite_context *c, struct libnet_conte
status = composite_wait(c);
- s = talloc_get_type(c->private_data, struct domain_list_state);
+ s = talloc_get_type_abort(c->private_data, struct domain_list_state);
if (NT_STATUS_IS_OK(status) && ctx && mem_ctx && io) {
/* fetch the results to be returned by io structure */
diff --git a/source4/libnet/libnet_group.c b/source4/libnet/libnet_group.c
index e3d51f342b..9fdeb809f1 100644
--- a/source4/libnet/libnet_group.c
+++ b/source4/libnet/libnet_group.c
@@ -90,8 +90,8 @@ static void continue_domain_opened(struct composite_context *ctx)
struct create_group_state *s;
struct composite_context *create_req;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct create_group_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct create_group_state);
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
if (!composite_is_ok(c)) return;
@@ -114,8 +114,8 @@ static void continue_rpc_group_added(struct composite_context *ctx)
struct composite_context *c;
struct create_group_state *s;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct create_group_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct create_group_state);
/* receive result of group add call */
c->status = libnet_rpc_groupadd_recv(ctx, c, &s->group_add);
@@ -143,7 +143,7 @@ NTSTATUS libnet_CreateGroup_recv(struct composite_context *c,
status = composite_wait(c);
if (!NT_STATUS_IS_OK(status)) {
- s = talloc_get_type(c->private_data, struct create_group_state);
+ s = talloc_get_type_abort(c->private_data, struct create_group_state);
r->out.error_string = talloc_strdup(mem_ctx, nt_errstr(status));
}
@@ -280,8 +280,8 @@ static void continue_domain_open_info(struct composite_context *ctx)
struct group_info_state *s;
struct composite_context *lookup_req, *info_req;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct group_info_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct group_info_state);
/* receive domain handle */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domopen);
@@ -328,8 +328,8 @@ static void continue_name_found(struct composite_context *ctx)
struct group_info_state *s;
struct composite_context *info_req;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct group_info_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct group_info_state);
/* receive SID assiociated with name found */
c->status = libnet_LookupName_recv(ctx, c, &s->lookup);
@@ -365,8 +365,8 @@ static void continue_group_info(struct composite_context *ctx)
struct composite_context *c;
struct group_info_state *s;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct group_info_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct group_info_state);
/* receive group information */
c->status = libnet_rpc_groupinfo_recv(ctx, c, &s->info);
@@ -394,7 +394,7 @@ NTSTATUS libnet_GroupInfo_recv(struct composite_context* c, TALLOC_CTX *mem_ctx,
status = composite_wait(c);
if (NT_STATUS_IS_OK(status)) {
/* put the results into io structure if everything went fine */
- s = talloc_get_type(c->private_data, struct group_info_state);
+ s = talloc_get_type_abort(c->private_data, struct group_info_state);
io->out.group_name = talloc_steal(mem_ctx,
s->info.out.info.all.name.string);
@@ -519,8 +519,8 @@ static void continue_lsa_domain_opened(struct composite_context *ctx)
struct grouplist_state *s;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct grouplist_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct grouplist_state);
/* receive lsa domain handle */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
@@ -553,7 +553,7 @@ static void continue_domain_queried(struct tevent_req *subreq)
bool prereq_met = false;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct grouplist_state);
+ s = talloc_get_type_abort(c->private_data, struct grouplist_state);
/* receive result of rpc request */
c->status = dcerpc_lsa_QueryInfoPolicy_r_recv(subreq, s);
@@ -598,8 +598,8 @@ static void continue_samr_domain_opened(struct composite_context *ctx)
struct grouplist_state *s;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct grouplist_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct grouplist_state);
/* receive samr domain handle */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
@@ -635,7 +635,7 @@ static void continue_groups_enumerated(struct tevent_req *subreq)
uint32_t i;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct grouplist_state);
+ s = talloc_get_type_abort(c->private_data, struct grouplist_state);
/* receive result of rpc request */
c->status = dcerpc_samr_EnumDomainGroups_r_recv(subreq, s);
@@ -713,7 +713,7 @@ NTSTATUS libnet_GroupList_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES) ||
NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
- s = talloc_get_type(c->private_data, struct grouplist_state);
+ s = talloc_get_type_abort(c->private_data, struct grouplist_state);
/* get results from composite context */
io->out.count = s->count;
diff --git a/source4/libnet/libnet_user.c b/source4/libnet/libnet_user.c
index d0eb5afde8..019f8e759f 100644
--- a/source4/libnet/libnet_user.c
+++ b/source4/libnet/libnet_user.c
@@ -108,8 +108,8 @@ static void continue_domain_open_create(struct composite_context *ctx)
struct composite_context *create_req;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct create_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct create_user_state);
/* receive result of DomainOpen call */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
@@ -140,8 +140,8 @@ static void continue_rpc_useradd(struct composite_context *ctx)
struct create_user_state *s;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct create_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct create_user_state);
/* receive result of the call */
c->status = libnet_rpc_useradd_recv(ctx, c, &s->user_add);
@@ -174,7 +174,7 @@ NTSTATUS libnet_CreateUser_recv(struct composite_context *c, TALLOC_CTX *mem_ctx
/* wait for result of async request and check status code */
status = composite_wait(c);
if (!NT_STATUS_IS_OK(status)) {
- s = talloc_get_type(c->private_data, struct create_user_state);
+ s = talloc_get_type_abort(c->private_data, struct create_user_state);
r->out.error_string = talloc_strdup(mem_ctx, nt_errstr(status));
}
@@ -278,8 +278,8 @@ static void continue_domain_open_delete(struct composite_context *ctx)
struct composite_context *delete_req;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct delete_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct delete_user_state);
/* receive result of DomainOpen call */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
@@ -310,8 +310,8 @@ static void continue_rpc_userdel(struct composite_context *ctx)
struct delete_user_state *s;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct delete_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct delete_user_state);
/* receive result of userdel call */
c->status = libnet_rpc_userdel_recv(ctx, c, &s->user_del);
@@ -343,7 +343,7 @@ NTSTATUS libnet_DeleteUser_recv(struct composite_context *c, TALLOC_CTX *mem_ctx
/* wait for result of async request and check status code */
status = composite_wait(c);
if (!NT_STATUS_IS_OK(status)) {
- s = talloc_get_type(c->private_data, struct delete_user_state);
+ s = talloc_get_type_abort(c->private_data, struct delete_user_state);
r->out.error_string = talloc_steal(mem_ctx, s->r.out.error_string);
}
@@ -445,8 +445,8 @@ static void continue_domain_open_modify(struct composite_context *ctx)
struct composite_context *userinfo_req;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct modify_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct modify_user_state);
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
if (!composite_is_ok(c)) return;
@@ -474,8 +474,8 @@ static void continue_rpc_userinfo(struct composite_context *ctx)
struct modify_user_state *s;
struct composite_context *usermod_req;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct modify_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct modify_user_state);
c->status = libnet_rpc_userinfo_recv(ctx, c, &s->user_info);
if (!composite_is_ok(c)) return;
@@ -551,8 +551,8 @@ static void continue_rpc_usermod(struct composite_context *ctx)
struct modify_user_state *s;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct modify_user_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct modify_user_state);
c->status = libnet_rpc_usermod_recv(ctx, c, &s->user_mod);
if (!composite_is_ok(c)) return;
@@ -713,8 +713,8 @@ static void continue_domain_open_info(struct composite_context *ctx)
struct composite_context *lookup_req, *info_req;
struct monitor_msg msg;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct user_info_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct user_info_state);
/* receive result of DomainOpen call */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domopen);
@@ -765,8 +765,8 @@ static void continue_name_found(struct composite_context *ctx)
struct user_info_state *s;
struct composite_context *info_req;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct user_info_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct user_info_state);
/* receive result of LookupName call */
c->status = libnet_LookupName_recv(ctx, c, &s->lookup);
@@ -800,8 +800,8 @@ static void continue_info_received(struct composite_context *ctx)
struct composite_context *c;
struct user_info_state *s;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct user_info_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct user_info_state);
/* receive result of userinfo call */
c->status = libnet_rpc_userinfo_recv(ctx, c, &s->userinfo);
@@ -830,7 +830,7 @@ NTSTATUS libnet_UserInfo_recv(struct composite_context *c, TALLOC_CTX *mem_ctx,
if (NT_STATUS_IS_OK(status) && r != NULL) {
struct samr_UserInfo21 *info;
- s = talloc_get_type(c->private_data, struct user_info_state);
+ s = talloc_get_type_abort(c->private_data, struct user_info_state);
info = &s->userinfo.out.info.info21;
r->out.user_sid = dom_sid_add_rid(mem_ctx, s->ctx->samr.sid, info->rid);
@@ -984,8 +984,8 @@ static void continue_lsa_domain_opened(struct composite_context *ctx)
struct userlist_state *s;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct userlist_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct userlist_state);
/* receive lsa domain handle */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
@@ -1018,7 +1018,7 @@ static void continue_domain_queried(struct tevent_req *subreq)
bool prereq_met = false;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct userlist_state);
+ s = talloc_get_type_abort(c->private_data, struct userlist_state);
/* receive result of rpc request */
c->status = dcerpc_lsa_QueryInfoPolicy_r_recv(subreq, s);
@@ -1064,8 +1064,8 @@ static void continue_samr_domain_opened(struct composite_context *ctx)
struct userlist_state *s;
struct tevent_req *subreq;
- c = talloc_get_type(ctx->async.private_data, struct composite_context);
- s = talloc_get_type(c->private_data, struct userlist_state);
+ c = talloc_get_type_abort(ctx->async.private_data, struct composite_context);
+ s = talloc_get_type_abort(c->private_data, struct userlist_state);
/* receive samr domain handle */
c->status = libnet_DomainOpen_recv(ctx, s->ctx, c, &s->domain_open);
@@ -1102,7 +1102,7 @@ static void continue_users_enumerated(struct tevent_req *subreq)
uint32_t i;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct userlist_state);
+ s = talloc_get_type_abort(c->private_data, struct userlist_state);
/* receive result of rpc request */
c->status = dcerpc_samr_EnumDomainUsers_r_recv(subreq, s);
@@ -1180,7 +1180,7 @@ NTSTATUS libnet_UserList_recv(struct composite_context* c, TALLOC_CTX *mem_ctx,
NT_STATUS_EQUAL(status, STATUS_MORE_ENTRIES) ||
NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) {
- s = talloc_get_type(c->private_data, struct userlist_state);
+ s = talloc_get_type_abort(c->private_data, struct userlist_state);
/* get results from composite context */
r->out.count = s->count;
diff --git a/source4/libnet/userinfo.c b/source4/libnet/userinfo.c
index 8d9c841997..77a88ecec4 100644
--- a/source4/libnet/userinfo.c
+++ b/source4/libnet/userinfo.c
@@ -62,7 +62,7 @@ static void continue_userinfo_lookup(struct tevent_req *subreq)
struct msg_rpc_lookup_name *msg_lookup;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct userinfo_state);
+ s = talloc_get_type_abort(c->private_data, struct userinfo_state);
/* receive samr_Lookup reply */
c->status = dcerpc_samr_LookupNames_r_recv(subreq, s);
@@ -123,7 +123,7 @@ static void continue_userinfo_openuser(struct tevent_req *subreq)
struct msg_rpc_open_user *msg_open;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct userinfo_state);
+ s = talloc_get_type_abort(c->private_data, struct userinfo_state);
/* receive samr_OpenUser reply */
c->status = dcerpc_samr_OpenUser_r_recv(subreq, s);
@@ -174,7 +174,7 @@ static void continue_userinfo_getuser(struct tevent_req *subreq)
struct msg_rpc_query_user *msg_query;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct userinfo_state);
+ s = talloc_get_type_abort(c->private_data, struct userinfo_state);
/* receive samr_QueryUserInfo reply */
c->status = dcerpc_samr_QueryUserInfo_r_recv(subreq, s);
@@ -225,7 +225,7 @@ static void continue_userinfo_closeuser(struct tevent_req *subreq)
struct msg_rpc_close_user *msg_close;
c = tevent_req_callback_data(subreq, struct composite_context);
- s = talloc_get_type(c->private_data, struct userinfo_state);
+ s = talloc_get_type_abort(c->private_data, struct userinfo_state);
/* receive samr_Close reply */
c->status = dcerpc_samr_Close_r_recv(subreq, s);
@@ -345,7 +345,7 @@ NTSTATUS libnet_rpc_userinfo_recv(struct composite_context *c, TALLOC_CTX *mem_c
status = composite_wait(c);
if (NT_STATUS_IS_OK(status) && io) {
- s = talloc_get_type(c->private_data, struct userinfo_state);
+ s = talloc_get_type_abort(c->private_data, struct userinfo_state);
talloc_steal(mem_ctx, s->info);
io->out.info = *s->info;
}