From 7958e18b8abada5fa33d2f189166d524fb332050 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 26 Oct 2022 10:34:47 +0200 Subject: [PATCH] lib/krb5_wrap: remove unused keep_old_entries argument from smb_krb5_kt_seek_and_delete_old_entries() Signed-off-by: Stefan Metzmacher Reviewed-by: Jeremy Allison --- lib/krb5_wrap/krb5_samba.c | 15 ++------------- lib/krb5_wrap/krb5_samba.h | 3 +-- source3/libads/kerberos_keytab.c | 3 +-- 3 files changed, 4 insertions(+), 17 deletions(-) diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index 31938435e26..19f23f71bbd 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -1638,8 +1638,6 @@ krb5_error_code smb_krb5_kt_get_name(TALLOC_CTX *mem_ctx, * * @param[in] flush Whether to flush the complete keytab. * - * @param[in] keep_old_entries Keep the entry with the previous kvno. - * * @retval 0 on Sucess * * @return An appropriate KRB5 error code. @@ -1650,8 +1648,7 @@ krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context, krb5_enctype enctype, const char *princ_s, krb5_principal princ, - bool flush, - bool keep_old_entries) + bool flush) { krb5_error_code ret; krb5_kt_cursor cursor; @@ -1741,13 +1738,6 @@ krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context, continue; } - if (keep_old_entries) { - DEBUG(5, (__location__ ": Saving old (kvno %d) " - "entry for principal: %s.\n", - kvno, princ_s)); - continue; - } - if (!flush && ((kt_entry.vno & 0xff) == (kvno & 0xff)) && (kt_entry_enctype != enctype)) @@ -1865,8 +1855,7 @@ krb5_error_code smb_krb5_kt_add_entry(krb5_context context, enctype, princ_s, princ, - false, /* flush */ - false); /* keep_old_entries */ + false); /* flush */ if (ret) { goto out; } diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h index d11f715d929..044e16d68f6 100644 --- a/lib/krb5_wrap/krb5_samba.h +++ b/lib/krb5_wrap/krb5_samba.h @@ -217,8 +217,7 @@ krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context, krb5_enctype enctype, const char *princ_s, krb5_principal princ, - bool flush, - bool keep_old_entries); + bool flush); krb5_error_code smb_krb5_kt_add_entry(krb5_context context, krb5_keytab keytab, krb5_kvno kvno, diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c index 00830a23f40..7bb7e7e813c 100644 --- a/source3/libads/kerberos_keytab.c +++ b/source3/libads/kerberos_keytab.c @@ -496,8 +496,7 @@ int ads_keytab_flush(ADS_STRUCT *ads) ENCTYPE_NULL, NULL, NULL, - true, - false); + true); /* flush */ if (ret) { goto out; }