diff options
Diffstat (limited to 'source3/rpc_client/cli_trust.c')
-rw-r--r-- | source3/rpc_client/cli_trust.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/source3/rpc_client/cli_trust.c b/source3/rpc_client/cli_trust.c index d7faf4975f..a12f4035ee 100644 --- a/source3/rpc_client/cli_trust.c +++ b/source3/rpc_client/cli_trust.c @@ -36,6 +36,16 @@ static BOOL modify_trust_password( char *domain, char *remote_machine, { struct cli_state cli; NTSTATUS result; + DOM_SID domain_sid; + + /* + * Ensure we have the domain SID for this domain. + */ + + if (!secrets_fetch_domain_sid(domain, &domain_sid)) { + DEBUG(0, ("domain_client_validate: unable to fetch domain sid.\n")); + return False; + } ZERO_STRUCT(cli); if(cli_initialise(&cli) == NULL) { @@ -116,13 +126,6 @@ Error was : %s.\n", remote_machine, cli_errstr(&cli) )); * Now start the NT Domain stuff :-). */ - if(cli_lsa_get_domain_sid(&cli, remote_machine) == False) { - DEBUG(0,("modify_trust_password: unable to obtain domain sid from %s. Error was : %s.\n", remote_machine, cli_errstr(&cli))); - cli_ulogoff(&cli); - cli_shutdown(&cli); - return False; - } - if(cli_nt_session_open(&cli, PIPE_NETLOGON) == False) { DEBUG(0,("modify_trust_password: unable to open the domain client session to \ machine %s. Error was : %s.\n", remote_machine, cli_errstr(&cli))); |