From 19ae5c2b52a952d968b0af49e50adc9bdada3a92 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 20 Mar 2025 01:47:23 +0100 Subject: [PATCH] s4:kdc: specify SDB_F_ values as hex Signed-off-by: Stefan Metzmacher Reviewed-by: Ralph Boehme --- source4/kdc/sdb.h | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/source4/kdc/sdb.h b/source4/kdc/sdb.h index 820648a0698..4f1c8c1ae1e 100644 --- a/source4/kdc/sdb.h +++ b/source4/kdc/sdb.h @@ -109,18 +109,21 @@ struct sdb_entry { /* These must match the values in hdb.h */ -#define SDB_F_DECRYPT 1 /* decrypt keys */ -#define SDB_F_GET_CLIENT 4 /* fetch client */ -#define SDB_F_GET_SERVER 8 /* fetch server */ -#define SDB_F_GET_KRBTGT 16 /* fetch krbtgt */ -#define SDB_F_GET_ANY 28 /* fetch any of client,server,krbtgt */ -#define SDB_F_CANON 32 /* want canonicalization */ -#define SDB_F_ADMIN_DATA 64 /* want data that kdc don't use */ -#define SDB_F_KVNO_SPECIFIED 128 /* we want a particular KVNO */ -#define SDB_F_FOR_AS_REQ 4096 /* fetch is for a AS REQ */ -#define SDB_F_FOR_TGS_REQ 8192 /* fetch is for a TGS REQ */ -#define SDB_F_ARMOR_PRINCIPAL 262144 /* fetch is for the client of an armor ticket */ -#define SDB_F_USER2USER_PRINCIPAL 524288/* fetch is for the server of a user2user tgs-req */ +#define SDB_F_DECRYPT 0x00001 /* decrypt keys */ +#define SDB_F_REPLACE 0x00002 /* replace entry */ +#define SDB_F_GET_CLIENT 0x00004 /* fetch client */ +#define SDB_F_GET_SERVER 0x00008 /* fetch server */ +#define SDB_F_GET_KRBTGT 0x00010 /* fetch krbtgt */ +#define SDB_F_GET_ANY ( SDB_F_GET_CLIENT | \ + SDB_F_GET_SERVER | \ + SDB_F_GET_KRBTGT ) /* fetch any of client,server,krbtgt */ +#define SDB_F_CANON 0x00020 /* want canonicalition */ +#define SDB_F_ADMIN_DATA 0x00040 /* want data that kdc don't use */ +#define SDB_F_KVNO_SPECIFIED 0x00080 /* we want a particular KVNO */ +#define SDB_F_FOR_AS_REQ 0x01000 /* fetch is for a AS REQ */ +#define SDB_F_FOR_TGS_REQ 0x02000 /* fetch is for a TGS REQ */ +#define SDB_F_ARMOR_PRINCIPAL 0x40000 /* fetch is for the client of an armor ticket */ +#define SDB_F_USER2USER_PRINCIPAL 0x80000 /* fetch is for the server of a user2user tgs-req */ #define SDB_F_HDB_MASK (SDB_F_DECRYPT | \ SDB_F_GET_CLIENT| \ @@ -135,8 +138,8 @@ struct sdb_entry { SDB_F_USER2USER_PRINCIPAL) /* These are not supported by HDB */ -#define SDB_F_FORCE_CANON 16384 /* force canonicalization */ -#define SDB_F_RODC_NUMBER_SPECIFIED 32768 /* we want a particular RODC number */ +#define SDB_F_FORCE_CANON 0x4000 /* force canonicalization */ +#define SDB_F_RODC_NUMBER_SPECIFIED 0x8000 /* we want a particular RODC number */ void sdb_key_free(struct sdb_key *key); void sdb_keys_free(struct sdb_keys *keys); -- 2.47.3