1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

Remove pstring from clirap2 by completely rewriting the damn

thing :-). Now with added paranoia.
Jeremy.
(This used to be commit b6b5f92bc9)
This commit is contained in:
Jeremy Allison
2007-12-03 14:09:48 -08:00
parent 6f1b4eb869
commit fe1a12b22f
2 changed files with 2044 additions and 1515 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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
@ -5666,12 +5667,13 @@ 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))) {