mirror of
https://github.com/samba-team/samba.git
synced 2025-10-19 23:33:15 +03:00
r26310: Remove more uses of global_loadparm.
This commit is contained in:
committed by
Stefan Metzmacher
parent
7de55cde7c
commit
9d806da113
@@ -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 {
|
||||
|
@@ -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;
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user