]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:ntvfs: Use cli_credentials_init_server()
authorAndreas Schneider <asn@samba.org>
Tue, 6 Apr 2021 13:21:38 +0000 (15:21 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 9 Apr 2021 10:46:28 +0000 (10:46 +0000)
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>
source4/ntvfs/cifs/vfs_cifs.c

index 8f5ef0f5730b9fabdd13761e42e0a404901956f9..121ff57f22b15f7f1a3c60508df8a30a6626046f 100644 (file)
@@ -256,13 +256,10 @@ static NTSTATUS cvfs_connect(struct ntvfs_module_context *ntvfs,
 
                DEBUG(5, ("CIFS backend: Using S4U2Proxy credentials\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;
                }
                cli_credentials_invalidate_ccache(credentials, CRED_SPECIFIED);