summaryrefslogtreecommitdiffstats
path: root/source3/rpc_server/srv_lsa_nt.c
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-01-07 18:44:52 +0100
committerVolker Lendecke <vl@samba.org>2009-01-08 22:29:54 +0100
commit84292022bf801112d2cb7f0f8512cf00079def20 (patch)
tree465b8f7c2f51769cf4a15d2b82e2ba4465bdfe40 /source3/rpc_server/srv_lsa_nt.c
parent825500f5dafb848b95f5a5ea6595cc24f377bc3a (diff)
downloadsamba-84292022bf801112d2cb7f0f8512cf00079def20.tar.gz
samba-84292022bf801112d2cb7f0f8512cf00079def20.tar.xz
samba-84292022bf801112d2cb7f0f8512cf00079def20.zip
Now that all policy_handle free_fn's are just TALLOC_FREE, dump free_fn
Diffstat (limited to 'source3/rpc_server/srv_lsa_nt.c')
-rw-r--r--source3/rpc_server/srv_lsa_nt.c25
1 files changed, 8 insertions, 17 deletions
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index 0db739dff27..ed54c3a86e9 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -96,15 +96,6 @@ static int init_lsa_ref_domain_list(TALLOC_CTX *mem_ctx,
}
-/*******************************************************************
- Function to free the per handle data.
- ********************************************************************/
-
-static void free_lsa_info(void *ptr)
-{
- TALLOC_FREE(ptr);
-}
-
/***************************************************************************
initialize a lsa_DomainInfo structure.
***************************************************************************/
@@ -398,7 +389,7 @@ NTSTATUS _lsa_OpenPolicy2(pipes_struct *p,
acc_granted = LSA_POLICY_ALL_ACCESS;
/* associate the domain SID with the (unique) handle. */
- info = TALLOC_ZERO_P(NULL, struct lsa_info);
+ info = TALLOC_ZERO_P(p->mem_ctx, struct lsa_info);
if (info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -407,7 +398,7 @@ NTSTATUS _lsa_OpenPolicy2(pipes_struct *p,
info->access = acc_granted;
/* set up the LSA QUERY INFO response */
- if (!create_policy_hnd(p, r->out.handle, free_lsa_info, (void *)info))
+ if (!create_policy_hnd(p, r->out.handle, info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_OK;
@@ -447,7 +438,7 @@ NTSTATUS _lsa_OpenPolicy(pipes_struct *p,
}
/* associate the domain SID with the (unique) handle. */
- info = TALLOC_ZERO_P(NULL, struct lsa_info);
+ info = TALLOC_ZERO_P(p->mem_ctx, struct lsa_info);
if (info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -456,7 +447,7 @@ NTSTATUS _lsa_OpenPolicy(pipes_struct *p,
info->access = acc_granted;
/* set up the LSA QUERY INFO response */
- if (!create_policy_hnd(p, r->out.handle, free_lsa_info, (void *)info))
+ if (!create_policy_hnd(p, r->out.handle, info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_OK;
@@ -1555,7 +1546,7 @@ NTSTATUS _lsa_CreateAccount(pipes_struct *p,
/* associate the user/group SID with the (unique) handle. */
- info = TALLOC_ZERO_P(NULL, struct lsa_info);
+ info = TALLOC_ZERO_P(p->mem_ctx, struct lsa_info);
if (info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1564,7 +1555,7 @@ NTSTATUS _lsa_CreateAccount(pipes_struct *p,
info->access = r->in.access_mask;
/* get a (unique) handle. open a policy on it. */
- if (!create_policy_hnd(p, r->out.acct_handle, free_lsa_info, (void *)info))
+ if (!create_policy_hnd(p, r->out.acct_handle, info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return privilege_create_account( &info->sid );
@@ -1600,7 +1591,7 @@ NTSTATUS _lsa_OpenAccount(pipes_struct *p,
return NT_STATUS_ACCESS_DENIED;
#endif
/* associate the user/group SID with the (unique) handle. */
- info = TALLOC_ZERO_P(NULL, struct lsa_info);
+ info = TALLOC_ZERO_P(p->mem_ctx, struct lsa_info);
if (info == NULL) {
return NT_STATUS_NO_MEMORY;
}
@@ -1609,7 +1600,7 @@ NTSTATUS _lsa_OpenAccount(pipes_struct *p,
info->access = r->in.access_mask;
/* get a (unique) handle. open a policy on it. */
- if (!create_policy_hnd(p, r->out.acct_handle, free_lsa_info, (void *)info))
+ if (!create_policy_hnd(p, r->out.acct_handle, info))
return NT_STATUS_OBJECT_NAME_NOT_FOUND;
return NT_STATUS_OK;