summaryrefslogtreecommitdiff
path: root/source3/utils/net_rpc.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/utils/net_rpc.c')
-rw-r--r--source3/utils/net_rpc.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 092d625ae5..d5af6e3fb8 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1659,10 +1659,6 @@ static int rpc_trustdom_establish(int argc, const char **argv)
domain_name = smb_xstrdup(argv[0]);
strupper(domain_name);
-
- /* account name used at first is our domain's name with '$' */
- asprintf(&acct_name, "%s$", lp_workgroup());
- strupper(acct_name);
/*
* opt_workgroup will be used by connection functions further,
@@ -1673,6 +1669,9 @@ static int rpc_trustdom_establish(int argc, const char **argv)
opt_workgroup = smb_xstrdup(domain_name);
};
+ asprintf(&acct_name, "%s$", lp_workgroup());
+ strupper(acct_name);
+
opt_user_name = acct_name;
/* find the domain controller */