mirror of
https://github.com/samba-team/samba.git
synced 2025-03-12 20:58:37 +03:00
s4:rpc_server: Use cli_credentials_init_server()
This also removes dcerpc_remote:domain option for the machine account case. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
0ce0570d75
commit
4b2e7da37a
@ -134,19 +134,13 @@ static NTSTATUS remote_get_private(struct dcesrv_call_state *dce_call,
|
||||
cli_credentials_set_password(credentials, pass, CRED_SPECIFIED);
|
||||
} else if (machine_account) {
|
||||
DEBUG(5, ("dcerpc_remote: RPC Proxy: Using machine account\n"));
|
||||
credentials = cli_credentials_init(priv);
|
||||
credentials = cli_credentials_init_server(
|
||||
priv,
|
||||
dce_call->conn->dce_ctx->lp_ctx);
|
||||
if (!credentials) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
must_free_credentials = true;
|
||||
cli_credentials_set_conf(credentials, dce_call->conn->dce_ctx->lp_ctx);
|
||||
if (domain) {
|
||||
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
|
||||
}
|
||||
status = cli_credentials_set_machine_account(credentials, dce_call->conn->dce_ctx->lp_ctx);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
return status;
|
||||
}
|
||||
} else if (credentials != NULL) {
|
||||
DEBUG(5, ("dcerpc_remote: RPC Proxy: Using delegated credentials\n"));
|
||||
} else if (allow_anonymous) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user