]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
net: create creds for other domain
authorRalph Boehme <slow@samba.org>
Sun, 14 Jan 2024 07:34:17 +0000 (08:34 +0100)
committerStefan Metzmacher <metze@samba.org>
Sat, 20 Jan 2024 13:20:37 +0000 (13:20 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15533

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
source3/utils/net_rpc_trust.c

index bf28fd0865d59f7310d96bf92f967753159da6a7..a3354ad68d4561096e00706531dcf0f739eb620c 100644 (file)
@@ -488,8 +488,10 @@ static int rpc_trust_common(struct net_context *net_ctx, int argc,
                }
 
                other_net_ctx->opt_host = other_dom_data->host;
-               other_net_ctx->opt_user_name = other_dom_data->user_name;
-               other_net_ctx->opt_user_specified = true;
+               other_net_ctx->creds = cli_credentials_init(other_net_ctx);
+               cli_credentials_parse_string(other_net_ctx->creds,
+                                            other_dom_data->user_name,
+                                            CRED_SPECIFIED);
        } else {
                dom_data[1].domsid = dom_sid_parse_talloc(mem_ctx,
                                                other_dom_data->domain_sid_str);