r26205: Pass loadparm_context to secrets_db_connect() rather than using global context.
[jelmer/samba4-debian.git] / source / rpc_server / lsa / dcesrv_lsa.c
index 93c1ee9e4d34fc8e979ff5a34c14e22532b4c095..9d1f43a21473c16fd430afb2ca4c0649ba514c3d 100644 (file)
@@ -1713,7 +1713,8 @@ static NTSTATUS dcesrv_lsa_CreateSecret(struct dcesrv_call_state *dce_call, TALL
                        return NT_STATUS_INVALID_PARAMETER;
                }
 
-               secret_state->sam_ldb = talloc_reference(secret_state, secrets_db_connect(mem_ctx));
+               secret_state->sam_ldb = talloc_reference(secret_state, secrets_db_connect(mem_ctx, 
+                                                                                         global_loadparm));
                /* search for the secret record */
                ret = gendb_search(secret_state->sam_ldb, mem_ctx,
                                   ldb_dn_new(mem_ctx, secret_state->sam_ldb, "cn=LSA Secrets"),
@@ -1831,7 +1832,8 @@ static NTSTATUS dcesrv_lsa_OpenSecret(struct dcesrv_call_state *dce_call, TALLOC
                }
        
        } else {
-               secret_state->sam_ldb = talloc_reference(secret_state, secrets_db_connect(mem_ctx));
+               secret_state->sam_ldb = talloc_reference(secret_state, 
+                                                        secrets_db_connect(mem_ctx, global_loadparm));
 
                secret_state->global = false;
                name = r->in.name.string;