diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-06 16:36:54 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:48:22 +0100 |
commit | d378cf4c15e09b980f874bb103b28e89d9dd3a26 (patch) | |
tree | 85c625bb49c1fdb0bb353b91817c0d32ad3ccb49 /source4/rpc_server | |
parent | b84be078c197f9752b53d68c882f4d1b44979b8e (diff) | |
download | samba-d378cf4c15e09b980f874bb103b28e89d9dd3a26.tar.gz samba-d378cf4c15e09b980f874bb103b28e89d9dd3a26.tar.bz2 samba-d378cf4c15e09b980f874bb103b28e89d9dd3a26.zip |
r26310: Remove more uses of global_loadparm.
(This used to be commit 9d806da113b5f0688b6193dfdee9b8765e18b38f)
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/common/server_info.c | 2 | ||||
-rw-r--r-- | source4/rpc_server/dcerpc_server.c | 6 | ||||
-rw-r--r-- | source4/rpc_server/netlogon/dcerpc_netlogon.c | 18 |
3 files changed, 16 insertions, 10 deletions
diff --git a/source4/rpc_server/common/server_info.c b/source4/rpc_server/common/server_info.c index aa8dd7cc33..cf46954c33 100644 --- a/source4/rpc_server/common/server_info.c +++ b/source4/rpc_server/common/server_info.c @@ -118,7 +118,7 @@ _PUBLIC_ uint32_t dcesrv_common_get_server_type(TALLOC_CTX *mem_ctx, struct dces break; } /* open main ldb */ - samctx = samdb_connect(tmp_ctx, global_loadparm, anonymous_session(tmp_ctx, dce_ctx->lp_ctx)); + samctx = samdb_connect(tmp_ctx, dce_ctx->lp_ctx, anonymous_session(tmp_ctx, dce_ctx->lp_ctx)); if (samctx == NULL) { DEBUG(2,("Unable to open samdb in determining server announce flags\n")); } else { diff --git a/source4/rpc_server/dcerpc_server.c b/source4/rpc_server/dcerpc_server.c index f5576c5a6c..256f20ed54 100644 --- a/source4/rpc_server/dcerpc_server.c +++ b/source4/rpc_server/dcerpc_server.c @@ -486,7 +486,7 @@ static NTSTATUS dcesrv_bind_nak(struct dcesrv_call_state *call, uint32_t reason) NTSTATUS status; /* setup a bind_nak */ - dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm)); + dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx)); pkt.auth_length = 0; pkt.call_id = call->pkt.call_id; pkt.ptype = DCERPC_PKT_BIND_NAK; @@ -596,7 +596,7 @@ static NTSTATUS dcesrv_bind(struct dcesrv_call_state *call) } /* setup a bind_ack */ - dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm)); + dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx)); pkt.auth_length = 0; pkt.call_id = call->pkt.call_id; pkt.ptype = DCERPC_PKT_BIND_ACK; @@ -752,7 +752,7 @@ static NTSTATUS dcesrv_alter(struct dcesrv_call_state *call) } /* setup a alter_resp */ - dcesrv_init_hdr(&pkt, lp_rpc_big_endian(global_loadparm)); + dcesrv_init_hdr(&pkt, lp_rpc_big_endian(call->conn->dce_ctx->lp_ctx)); pkt.auth_length = 0; pkt.call_id = call->pkt.call_id; pkt.ptype = DCERPC_PKT_ALTER_RESP; diff --git a/source4/rpc_server/netlogon/dcerpc_netlogon.c b/source4/rpc_server/netlogon/dcerpc_netlogon.c index d7f9fdde3d..0ddc11c8b8 100644 --- a/source4/rpc_server/netlogon/dcerpc_netlogon.c +++ b/source4/rpc_server/netlogon/dcerpc_netlogon.c @@ -92,7 +92,8 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate3(struct dcesrv_call_state *dce_ca return NT_STATUS_ACCESS_DENIED; } - sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, system_session(mem_ctx, global_loadparm)); + sam_ctx = samdb_connect(mem_ctx, dce_call->conn->dce_ctx->lp_ctx, + system_session(mem_ctx, dce_call->conn->dce_ctx->lp_ctx)); if (sam_ctx == NULL) { return NT_STATUS_INVALID_SYSTEM_SERVICE; } @@ -233,7 +234,8 @@ static NTSTATUS dcesrv_netr_ServerAuthenticate2(struct dcesrv_call_state *dce_ca the caller needs some of that information. */ -static NTSTATUS dcesrv_netr_creds_server_step_check(const char *computer_name, +static NTSTATUS dcesrv_netr_creds_server_step_check(struct loadparm_context *lp_ctx, + const char *computer_name, TALLOC_CTX *mem_ctx, struct netr_Authenticator *received_authenticator, struct netr_Authenticator *return_authenticator, @@ -296,7 +298,8 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet(struct dcesrv_call_state *dce_call struct ldb_context *sam_ctx; NTSTATUS nt_status; - nt_status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx, + nt_status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx, + r->in.computer_name, mem_ctx, &r->in.credential, &r->out.return_authenticator, &creds); NT_STATUS_NOT_OK_RETURN(nt_status); @@ -334,7 +337,8 @@ static NTSTATUS dcesrv_netr_ServerPasswordSet2(struct dcesrv_call_state *dce_cal struct samr_CryptPassword password_buf; - nt_status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx, + nt_status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx, + r->in.computer_name, mem_ctx, &r->in.credential, &r->out.return_authenticator, &creds); NT_STATUS_NOT_OK_RETURN(nt_status); @@ -583,7 +587,8 @@ static NTSTATUS dcesrv_netr_LogonSamLogonWithFlags(struct dcesrv_call_state *dce return_authenticator = talloc(mem_ctx, struct netr_Authenticator); NT_STATUS_HAVE_NO_MEMORY(return_authenticator); - nt_status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx, + nt_status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx, + r->in.computer_name, mem_ctx, r->in.credential, return_authenticator, &creds); NT_STATUS_NOT_OK_RETURN(nt_status); @@ -879,7 +884,8 @@ static NTSTATUS dcesrv_netr_LogonGetDomainInfo(struct dcesrv_call_state *dce_cal const char *local_domain; - status = dcesrv_netr_creds_server_step_check(r->in.computer_name, mem_ctx, + status = dcesrv_netr_creds_server_step_check(dce_call->conn->dce_ctx->lp_ctx, + r->in.computer_name, mem_ctx, r->in.credential, r->out.return_authenticator, NULL); |