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

index 825c4cd9bd2d5d17070c86c5c74e583fb089348e..7a362d6b3af5d2302046238f98b7d352bb09eb06 100644 (file)
@@ -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) {