]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4:kdc: specify SDB_F_ values as hex
authorStefan Metzmacher <metze@samba.org>
Thu, 20 Mar 2025 00:47:23 +0000 (01:47 +0100)
committerRalph Boehme <slow@samba.org>
Thu, 3 Apr 2025 09:36:31 +0000 (09:36 +0000)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/kdc/sdb.h

index 820648a069831e348ca74126c5372a0d8641e12b..4f1c8c1ae1e3db098b34e5e750250486b68bcd3e 100644 (file)
@@ -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);