From b26ae7fbf66b4d79efc7a49164f93011d963333b Mon Sep 17 00:00:00 2001 From: Ralph Boehme Date: Thu, 21 Apr 2016 20:54:12 +0200 Subject: [PATCH] krb5_wrap: add enctype arg to smb_krb5_kt_seek_and_delete_old_entries() Unused in this commit, the next commit will use it to avoid deleting keys with the same kvno but a different enctype. Signed-off-by: Ralph Boehme Reviewed-by: Andreas Schneider --- lib/krb5_wrap/krb5_samba.c | 2 ++ lib/krb5_wrap/krb5_samba.h | 1 + source3/libads/kerberos_keytab.c | 1 + 3 files changed, 4 insertions(+) diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index 247b83be2f2..ea1f2d18b5c 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -1485,6 +1485,7 @@ krb5_error_code smb_krb5_keytab_name(TALLOC_CTX *mem_ctx, krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context, krb5_keytab keytab, krb5_kvno kvno, + krb5_enctype enctype, const char *princ_s, krb5_principal princ, bool flush, @@ -1694,6 +1695,7 @@ krb5_error_code smb_krb5_kt_add_entry(krb5_context context, ret = smb_krb5_kt_seek_and_delete_old_entries(context, keytab, kvno, + enctype, princ_s, princ, false, diff --git a/lib/krb5_wrap/krb5_samba.h b/lib/krb5_wrap/krb5_samba.h index f198d72ffb2..15da9a1408b 100644 --- a/lib/krb5_wrap/krb5_samba.h +++ b/lib/krb5_wrap/krb5_samba.h @@ -193,6 +193,7 @@ krb5_error_code smb_krb5_keytab_name(TALLOC_CTX *mem_ctx, krb5_error_code smb_krb5_kt_seek_and_delete_old_entries(krb5_context context, krb5_keytab keytab, krb5_kvno kvno, + krb5_enctype enctype, const char *princ_s, krb5_principal princ, bool flush, diff --git a/source3/libads/kerberos_keytab.c b/source3/libads/kerberos_keytab.c index 340e55252e8..8a3363c577a 100644 --- a/source3/libads/kerberos_keytab.c +++ b/source3/libads/kerberos_keytab.c @@ -280,6 +280,7 @@ int ads_keytab_flush(ADS_STRUCT *ads) ret = smb_krb5_kt_seek_and_delete_old_entries(context, keytab, kvno, + KRB5_ENCTYPE_NULL, NULL, NULL, true,