summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_trust.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2001-11-16 18:32:32 +0000
committerJeremy Allison <jra@samba.org>2001-11-16 18:32:32 +0000
commite74c51dfeb8c19f01451d2085f2e510bb431fbf0 (patch)
treee59713c70d579e0eb8f44f3d7b0f25894498f34d /source3/rpc_client/cli_trust.c
parentf6f04b5a44ad37e3ca82c932bb1df64c7254dda5 (diff)
downloadsamba-e74c51dfeb8c19f01451d2085f2e510bb431fbf0.tar.gz
samba-e74c51dfeb8c19f01451d2085f2e510bb431fbf0.tar.bz2
samba-e74c51dfeb8c19f01451d2085f2e510bb431fbf0.zip
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)
Diffstat (limited to 'source3/rpc_client/cli_trust.c')
-rw-r--r--source3/rpc_client/cli_trust.c17
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)));