mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
s3:secrets: replace secrets_delete_prev_machine_password() by secrets_delete()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12782 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
parent
45eea321a6
commit
5b95cb74e7
@ -370,20 +370,6 @@ bool secrets_fetch_trust_account_password(const char *domain, uint8_t ret_pwd[16
|
||||
channel);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Routine to delete the old plaintext machine account password if any
|
||||
************************************************************************/
|
||||
|
||||
static bool secrets_delete_prev_machine_password(const char *domain)
|
||||
{
|
||||
char *oldpass = (char *)secrets_fetch(machine_prev_password_keystr(domain), NULL);
|
||||
if (oldpass == NULL) {
|
||||
return true;
|
||||
}
|
||||
SAFE_FREE(oldpass);
|
||||
return secrets_delete_entry(machine_prev_password_keystr(domain));
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Routine to delete the plaintext machine account password, old password,
|
||||
sec channel type and last change time from secrets database
|
||||
@ -391,7 +377,7 @@ static bool secrets_delete_prev_machine_password(const char *domain)
|
||||
|
||||
bool secrets_delete_machine_password_ex(const char *domain)
|
||||
{
|
||||
if (!secrets_delete_prev_machine_password(domain)) {
|
||||
if (!secrets_delete(machine_prev_password_keystr(domain))) {
|
||||
return false;
|
||||
}
|
||||
if (!secrets_delete_entry(machine_password_keystr(domain))) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user