From e74c51dfeb8c19f01451d2085f2e510bb431fbf0 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 16 Nov 2001 18:32:32 +0000 Subject: I *love* removing code :-). Removed 4 files that weren't being used. All this stuff was being pulled in due to *one* unneeded call to fetch a domain SID which smbpasswd already puts in the database... Jeremy. (This used to be commit 6bf2505cce7db770fd4db5b19999a78588e96b58) --- source3/rpc_client/cli_trust.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'source3/rpc_client/cli_trust.c') 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))); -- cgit