summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/utils/net_rpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/utils/net_rpc.c b/source3/utils/net_rpc.c
index 120916d7b4..a13a8c5e22 100644
--- a/source3/utils/net_rpc.c
+++ b/source3/utils/net_rpc.c
@@ -1605,8 +1605,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
asprintf(&acct_name, "%s$", lp_workgroup());
strupper(acct_name);
- opt_user_name = (char*)malloc(strlen(acct_name) + 1);
- safe_strcpy(opt_user_name, acct_name, strlen(acct_name) + 1);
+ opt_user_name = acct_name;
/* find the domain controller */
if (!net_find_dc(&server_ip, pdc_name, domain_name)) {
@@ -1708,6 +1707,8 @@ static int rpc_trustdom_establish(int argc, const char **argv)
}
+
+
/* There should be actually query info level 3 (following nt serv behaviour),
but I still don't know if it's _really_ necessary */