diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-23 14:19:28 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-23 14:52:17 +1100 |
commit | 98e4393df926b600354ef16eb4eb19b5e11bf5c3 (patch) | |
tree | cb022930ab51d372c4102cad1357767b2b92c628 /source4/rpc_server/lsa | |
parent | 4a1a9f579265e885c6fabb3acc3cf0d930feacc3 (diff) | |
download | samba-98e4393df926b600354ef16eb4eb19b5e11bf5c3.tar.gz samba-98e4393df926b600354ef16eb4eb19b5e11bf5c3.tar.bz2 samba-98e4393df926b600354ef16eb4eb19b5e11bf5c3.zip |
s4-dsdb: create a static system_session context
This patch adds a system_session cache, preventing us from having to
recreate it on every ldb open, and allowing us to detect when the same
session is being used in ldb_wrap
Diffstat (limited to 'source4/rpc_server/lsa')
-rw-r--r-- | source4/rpc_server/lsa/dcesrv_lsa.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/rpc_server/lsa/dcesrv_lsa.c b/source4/rpc_server/lsa/dcesrv_lsa.c index e35f2d8bf6..35e5d0f8ed 100644 --- a/source4/rpc_server/lsa/dcesrv_lsa.c +++ b/source4/rpc_server/lsa/dcesrv_lsa.c @@ -2273,7 +2273,7 @@ static NTSTATUS dcesrv_lsa_CreateSecret(struct dcesrv_call_state *dce_call, TALL name = &r->in.name.string[2]; /* We need to connect to the database as system, as this is one of the rare RPC calls that must read the secrets (and this is denied otherwise) */ secret_state->sam_ldb = talloc_reference(secret_state, - samdb_connect(mem_ctx, dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(secret_state, dce_call->conn->dce_ctx->lp_ctx))); + samdb_connect(mem_ctx, dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(dce_call->conn->dce_ctx->lp_ctx))); secret_state->global = true; if (strlen(name) < 1) { @@ -2410,7 +2410,7 @@ static NTSTATUS dcesrv_lsa_OpenSecret(struct dcesrv_call_state *dce_call, TALLOC name = &r->in.name.string[2]; /* We need to connect to the database as system, as this is one of the rare RPC calls that must read the secrets (and this is denied otherwise) */ secret_state->sam_ldb = talloc_reference(secret_state, - samdb_connect(mem_ctx, dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(secret_state, dce_call->conn->dce_ctx->lp_ctx))); + samdb_connect(mem_ctx, dce_call->event_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(dce_call->conn->dce_ctx->lp_ctx))); secret_state->global = true; if (strlen(name) < 1) { |