mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:ntvfs: Use cli_credentials_init_server()
This also removes cifs: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
eb7bfe2f3a
commit
fb0dae0e06
@ -228,13 +228,10 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
|
||||
cli_credentials_set_password(credentials, pass, CRED_SPECIFIED);
|
||||
} else if (machine_account) {
|
||||
DEBUG(5, ("CIFS backend: Using machine account\n"));
|
||||
credentials = cli_credentials_init(p);
|
||||
cli_credentials_set_conf(credentials, ntvfs->ctx->lp_ctx);
|
||||
if (domain) {
|
||||
cli_credentials_set_domain(credentials, domain, CRED_SPECIFIED);
|
||||
}
|
||||
status = cli_credentials_set_machine_account(credentials, ntvfs->ctx->lp_ctx);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
credentials = cli_credentials_init_server(p,
|
||||
ntvfs->ctx->lp_ctx);
|
||||
if (credentials == NULL) {
|
||||
status = NT_STATUS_NO_MEMORY;
|
||||
goto out;
|
||||
}
|
||||
} else if (req->session_info->credentials) {
|
||||
|
Loading…
Reference in New Issue
Block a user