From: Andreas Schneider Date: Tue, 6 Apr 2021 13:21:38 +0000 (+0200) Subject: s4:ntvfs: Use cli_credentials_init_server() X-Git-Tag: tevent-0.11.0~1235 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb0dae0e064dcb63ed0afe6698f761cf3f7013ec;p=thirdparty%2Fsamba.git s4:ntvfs: Use cli_credentials_init_server() This also removes cifs:domain option for the machine account case. Signed-off-by: Andreas Schneider Reviewed-by: Andrew Bartlett --- diff --git a/source4/ntvfs/cifs/vfs_cifs.c b/source4/ntvfs/cifs/vfs_cifs.c index 4e11568ea46..8f5ef0f5730 100644 --- a/source4/ntvfs/cifs/vfs_cifs.c +++ b/source4/ntvfs/cifs/vfs_cifs.c @@ -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) {