summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2022-01-26 08:44:13 +0100
committerJule Anger <janger@samba.org>2022-02-14 09:58:46 +0000
commitbc72fb438fe72d4403ba30f8e1a394a92507b88b (patch)
tree1345c1748f6b28761fd616e9d834cf666699935f
parent27c6ad1f9b6dc75bf21efe54895acde160c99bcf (diff)
downloadsamba-bc72fb438fe72d4403ba30f8e1a394a92507b88b.tar.gz
s4:kdc: Translate HDB flags to SDB flags
We used to have a 1 to 1 mapping, but now we have a conflict with these: #define SDB_F_FORCE_CANON 16384 #define HDB_F_PRECHECK 16384 We currently don't really care about HDB_F_PRECHECK, so we can just filter it out. In the long run we may change the SDB flags space to uint64... BUG: https://bugzilla.samba.org/show_bug.cgi?id=14960 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 6063e8016fccbefd1c3fe378e3807c77bc04e4ec) Autobuild-User(v4-16-test): Jule Anger <janger@samba.org> Autobuild-Date(v4-16-test): Mon Feb 14 09:58:46 UTC 2022 on sn-devel-184
-rw-r--r--source4/kdc/hdb-samba4.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/kdc/hdb-samba4.c b/source4/kdc/hdb-samba4.c
index 7477c0f9c11..71260d3ed0a 100644
--- a/source4/kdc/hdb-samba4.c
+++ b/source4/kdc/hdb-samba4.c
@@ -223,6 +223,8 @@ static krb5_error_code hdb_samba4_fetch_kvno(krb5_context context, HDB *db,
struct samba_kdc_db_context *kdc_db_ctx;
struct sdb_entry_ex sdb_entry_ex = {};
krb5_error_code code, ret;
+ uint32_t sflags;
+
kdc_db_ctx = talloc_get_type_abort(db->hdb_db,
struct samba_kdc_db_context);
@@ -232,10 +234,12 @@ static krb5_error_code hdb_samba4_fetch_kvno(krb5_context context, HDB *db,
entry_ex);
}
+ sflags = (flags & SDB_F_HDB_MASK);
+
ret = samba_kdc_fetch(context,
kdc_db_ctx,
principal,
- flags,
+ sflags,
kvno,
&sdb_entry_ex);
switch (ret) {