mirror of
https://github.com/samba-team/samba.git
synced 2025-03-01 04:58:35 +03:00
Remove pstring from clirap2 by completely rewriting the damn
thing :-). Now with added paranoia. Jeremy. (This used to be commit b6b5f92bc9457220df384bdb13530c393d294ce7)
This commit is contained in:
parent
6f1b4eb869
commit
fe1a12b22f
File diff suppressed because it is too large
Load Diff
@ -5603,6 +5603,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
|
||||
char* domain_name_pol;
|
||||
char* acct_name;
|
||||
fstring pdc_name;
|
||||
char *dc_name;
|
||||
|
||||
/*
|
||||
* Connect to \\server\ipc$ as 'our domain' account with password
|
||||
@ -5655,7 +5656,7 @@ static int rpc_trustdom_establish(int argc, const char **argv)
|
||||
*/
|
||||
|
||||
nt_status = connect_to_ipc_anonymous(&cli, &server_ss, (char*)pdc_name);
|
||||
|
||||
|
||||
if (NT_STATUS_IS_ERR(nt_status)) {
|
||||
DEBUG(0, ("Couldn't connect to domain %s controller. Error was %s.\n",
|
||||
domain_name, nt_errstr(nt_status)));
|
||||
@ -5665,13 +5666,14 @@ static int rpc_trustdom_establish(int argc, const char **argv)
|
||||
/*
|
||||
* Use NetServerEnum2 to make sure we're talking to a proper server
|
||||
*/
|
||||
|
||||
if (!cli_get_pdc_name(cli, domain_name, (char*)pdc_name)) {
|
||||
|
||||
if (!cli_get_pdc_name(cli, domain_name, &dc_name)) {
|
||||
DEBUG(0, ("NetServerEnum2 error: Couldn't find primary domain controller\
|
||||
for domain %s\n", domain_name));
|
||||
cli_shutdown(cli);
|
||||
return -1;
|
||||
}
|
||||
SAFE_FREE(dc_name);
|
||||
|
||||
if (!(mem_ctx = talloc_init("establishing trust relationship to "
|
||||
"domain %s", domain_name))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user