From 5b95cb74e7b2838d228f9773c0e20982b81d1e7d Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 24 May 2017 06:44:32 +0200 Subject: [PATCH] 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 Reviewed-by: Andreas Schneider --- source3/passdb/machine_account_secrets.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/source3/passdb/machine_account_secrets.c b/source3/passdb/machine_account_secrets.c index c3a760b2965..2457ac73ab6 100644 --- a/source3/passdb/machine_account_secrets.c +++ b/source3/passdb/machine_account_secrets.c @@ -371,27 +371,13 @@ bool secrets_fetch_trust_account_password(const char *domain, uint8_t ret_pwd[16 } /************************************************************************ - 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 ************************************************************************/ 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))) { -- 2.11.4.GIT