summaryrefslogtreecommitdiff
path: root/source3/rpc_client/cli_netlogon.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1998-10-15 23:51:07 +0000
committerLuke Leighton <lkcl@samba.org>1998-10-15 23:51:07 +0000
commitc404bb775414139a4b07a73f79cf069a083acb26 (patch)
tree259eeef5e467083c0b7b29bec846bab90c522bf7 /source3/rpc_client/cli_netlogon.c
parent0d5ff90bffe1a5d2bf03412ef0bd12996cbc2f09 (diff)
downloadsamba-c404bb775414139a4b07a73f79cf069a083acb26.tar.gz
samba-c404bb775414139a4b07a73f79cf069a083acb26.tar.bz2
samba-c404bb775414139a4b07a73f79cf069a083acb26.zip
rpcclient interactive login (with trust account changing if you are root)
cli_session_setup handles null sessions correctly (This used to be commit 60c0f22a4e84703467006dfe1971384a6294a9aa)
Diffstat (limited to 'source3/rpc_client/cli_netlogon.c')
-rw-r--r--source3/rpc_client/cli_netlogon.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/rpc_client/cli_netlogon.c b/source3/rpc_client/cli_netlogon.c
index 2671bac773..9c81b73692 100644
--- a/source3/rpc_client/cli_netlogon.c
+++ b/source3/rpc_client/cli_netlogon.c
@@ -391,7 +391,6 @@ password ?).\n", cli->desthost ));
return ok;
}
-#if UNUSED_CODE
/***************************************************************************
LSA SAM Logoff.
@@ -465,7 +464,6 @@ password ?).\n", cli->desthost ));
return ok;
}
-#endif
/*********************************************************
Change the domain password on the PDC.
@@ -605,6 +603,7 @@ BOOL change_trust_account_password( char *domain, char *remote_machine_list)
unsigned char old_trust_passwd_hash[16];
unsigned char new_trust_passwd_hash[16];
time_t lct;
+ BOOL res;
if(!get_trust_account_password( old_trust_passwd_hash, &lct)) {
DEBUG(0,("change_trust_account_password: unable to read the machine \
@@ -629,10 +628,16 @@ domain %s.\n", timestring(), domain));
* Return the result of trying to write the new password
* back into the trust account file.
*/
- return set_trust_account_password(new_trust_passwd_hash);
+ res = set_trust_account_password(new_trust_passwd_hash);
+ memset(new_trust_passwd_hash, 0, 16);
+ memset(old_trust_passwd_hash, 0, 16);
+ return res;
}
}
+ memset(new_trust_passwd_hash, 0, 16);
+ memset(old_trust_passwd_hash, 0, 16);
+
DEBUG(0,("%s : change_trust_account_password: Failed to change password for \
domain %s.\n", timestring(), domain));
return False;