diff options
author | Stefan Metzmacher <metze@samba.org> | 2009-10-23 17:30:47 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2009-10-24 11:59:16 +0200 |
commit | a07eb08870823fa443911d3b857724bde1e3021b (patch) | |
tree | 0806d25588aabfe27e87b7f6b749fc396c8f62c4 | |
parent | 4ab83fb1b7d2929c6ae454f3f073d4baf3510ca3 (diff) | |
download | samba-a07eb08870823fa443911d3b857724bde1e3021b.tar.gz samba-a07eb08870823fa443911d3b857724bde1e3021b.tar.bz2 samba-a07eb08870823fa443911d3b857724bde1e3021b.zip |
s4:dcesrv_samr: always use mem_ctx as initial parent for samr_*_state
We always steal the state to the policy handle on success,
but untill then keep it on the short term context.
metze
-rw-r--r-- | source4/rpc_server/samr/dcesrv_samr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source4/rpc_server/samr/dcesrv_samr.c b/source4/rpc_server/samr/dcesrv_samr.c index 08f1471665..7be1cf9813 100644 --- a/source4/rpc_server/samr/dcesrv_samr.c +++ b/source4/rpc_server/samr/dcesrv_samr.c @@ -165,7 +165,7 @@ static NTSTATUS dcesrv_samr_Connect(struct dcesrv_call_state *dce_call, TALLOC_C ZERO_STRUCTP(r->out.connect_handle); - c_state = talloc(dce_call->conn, struct samr_connect_state); + c_state = talloc(mem_ctx, struct samr_connect_state); if (!c_state) { return NT_STATUS_NO_MEMORY; } @@ -398,7 +398,7 @@ static NTSTATUS dcesrv_samr_OpenDomain(struct dcesrv_call_state *dce_call, TALLO return NT_STATUS_INVALID_PARAMETER; } - d_state = talloc(c_state, struct samr_domain_state); + d_state = talloc(mem_ctx, struct samr_domain_state); if (!d_state) { return NT_STATUS_NO_MEMORY; } @@ -1040,7 +1040,7 @@ static NTSTATUS dcesrv_samr_CreateDomainGroup(struct dcesrv_call_state *dce_call return NT_STATUS_INTERNAL_DB_CORRUPTION; } - a_state = talloc(d_state, struct samr_account_state); + a_state = talloc(mem_ctx, struct samr_account_state); if (!a_state) { return NT_STATUS_NO_MEMORY; } @@ -1333,7 +1333,7 @@ static NTSTATUS dcesrv_samr_CreateUser2(struct dcesrv_call_state *dce_call, TALL return NT_STATUS_INTERNAL_DB_CORRUPTION; } - a_state = talloc(d_state, struct samr_account_state); + a_state = talloc(mem_ctx, struct samr_account_state); if (!a_state) { ldb_transaction_cancel(d_state->sam_ctx); return NT_STATUS_NO_MEMORY; @@ -1614,7 +1614,7 @@ static NTSTATUS dcesrv_samr_CreateDomAlias(struct dcesrv_call_state *dce_call, T return NT_STATUS_INTERNAL_DB_CORRUPTION; } - a_state = talloc(d_state, struct samr_account_state); + a_state = talloc(mem_ctx, struct samr_account_state); if (!a_state) { return NT_STATUS_NO_MEMORY; } @@ -2043,7 +2043,7 @@ static NTSTATUS dcesrv_samr_OpenGroup(struct dcesrv_call_state *dce_call, TALLOC return NT_STATUS_INTERNAL_DB_CORRUPTION; } - a_state = talloc(d_state, struct samr_account_state); + a_state = talloc(mem_ctx, struct samr_account_state); if (!a_state) { return NT_STATUS_NO_MEMORY; } @@ -2520,7 +2520,7 @@ static NTSTATUS dcesrv_samr_OpenAlias(struct dcesrv_call_state *dce_call, TALLOC return NT_STATUS_INTERNAL_DB_CORRUPTION; } - a_state = talloc(d_state, struct samr_account_state); + a_state = talloc(mem_ctx, struct samr_account_state); if (!a_state) { return NT_STATUS_NO_MEMORY; } |