diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-07-28 02:17:57 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-07-28 02:17:57 +0000 |
commit | 9423ac9b4f3731faf92c9a688a043f04742b4eb1 (patch) | |
tree | 9460d1cfe25c83c3e5623dc21451726ae367defb /source3 | |
parent | 7ce66f79ea84d77f186bbf6e7831dc71cc6ec46a (diff) | |
download | samba-9423ac9b4f3731faf92c9a688a043f04742b4eb1.tar.gz samba-9423ac9b4f3731faf92c9a688a043f04742b4eb1.tar.bz2 samba-9423ac9b4f3731faf92c9a688a043f04742b4eb1.zip |
Clean this code up a little. If it's alrady asprintf()ed, I see no
need for a manual strdup() too...
(This used to be commit 71452365c8d9aa3d06b64716636a32bfebd3d4f8)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_rpc.c | 5 |
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 */ |