mirror of
https://github.com/samba-team/samba.git
synced 2025-08-03 04:22:09 +03:00
s4:rpc_server: Use cli_credentials_init_server()
Signed-off-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
committed by
Stefan Metzmacher
parent
2c00bea2ae
commit
6c94ebf77f
@ -673,25 +673,14 @@ NTSTATUS dcesrv_gensec_prepare(TALLOC_CTX *mem_ctx,
|
||||
struct cli_credentials *server_creds = NULL;
|
||||
struct imessaging_context *imsg_ctx =
|
||||
dcesrv_imessaging_context(call->conn);
|
||||
NTSTATUS status;
|
||||
|
||||
server_creds = cli_credentials_init(call->auth_state);
|
||||
if (!server_creds) {
|
||||
server_creds = cli_credentials_init_server(call->auth_state,
|
||||
call->conn->dce_ctx->lp_ctx);
|
||||
if (server_creds == NULL) {
|
||||
DEBUG(1, ("Failed to init server credentials\n"));
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
cli_credentials_set_conf(server_creds, call->conn->dce_ctx->lp_ctx);
|
||||
|
||||
status = cli_credentials_set_machine_account(server_creds,
|
||||
call->conn->dce_ctx->lp_ctx);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DEBUG(1, ("Failed to obtain server credentials: %s\n",
|
||||
nt_errstr(status)));
|
||||
talloc_free(server_creds);
|
||||
return status;
|
||||
}
|
||||
|
||||
return samba_server_gensec_start(mem_ctx,
|
||||
call->event_ctx,
|
||||
imsg_ctx,
|
||||
|
Reference in New Issue
Block a user