mirror of
https://github.com/samba-team/samba.git
synced 2025-01-21 18:04:06 +03:00
s4:rpc_server: Check return code of cli_credentials_set_conf()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
cfe9fb2373
commit
5dd3a0cc17
@ -120,13 +120,21 @@ static NTSTATUS remote_get_private(struct dcesrv_call_state *dce_call,
|
||||
credentials = dcesrv_call_credentials(dce_call);
|
||||
|
||||
if (user && pass) {
|
||||
bool ok;
|
||||
|
||||
DEBUG(5, ("dcerpc_remote: RPC Proxy: Using specified account\n"));
|
||||
credentials = cli_credentials_init(priv);
|
||||
if (!credentials) {
|
||||
return NT_STATUS_NO_MEMORY;
|
||||
}
|
||||
must_free_credentials = true;
|
||||
cli_credentials_set_conf(credentials, dce_call->conn->dce_ctx->lp_ctx);
|
||||
|
||||
ok = cli_credentials_set_conf(credentials,
|
||||
dce_call->conn->dce_ctx->lp_ctx);
|
||||
if (!ok) {
|
||||
return NT_STATUS_INTERNAL_ERROR;
|
||||
}
|
||||
|
||||
cli_credentials_set_username(credentials, user, CRED_SPECIFIED);
|
||||
if (domain) {
|
||||
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user