2 Unix SMB/CIFS implementation.
4 Database Glue between Samba and the KDC
6 Copyright (C) Guenther Deschner <gd@samba.org> 2014
7 Copyright (C) Andreas Schneider <asn@samba.org> 2014
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 3 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
34 struct sdb_salt
*salt
;
43 krb5_principal principal
;
48 unsigned int initial
:1;
49 unsigned int forwardable
:1;
50 unsigned int proxiable
:1;
51 unsigned int renewable
:1;
52 unsigned int postdate
:1;
53 unsigned int server
:1;
54 unsigned int client
:1;
55 unsigned int invalid
:1;
56 unsigned int require_preauth
:1;
57 unsigned int change_pw
:1;
58 unsigned int require_hwauth
:1;
59 unsigned int ok_as_delegate
:1;
60 unsigned int user_to_user
:1;
61 unsigned int immutable
:1;
62 unsigned int trusted_for_delegation
:1;
63 unsigned int allow_kerberos4
:1;
64 unsigned int allow_digest
:1;
65 unsigned int locked_out
:1;
66 unsigned int require_pwchange
:1;
67 unsigned int materialize
:1;
68 unsigned int virtual_keys
:1;
69 unsigned int virtual:1;
70 unsigned int synthetic
:1;
71 unsigned int no_auth_data_reqd
:1;
72 unsigned int _unused24
:1;
73 unsigned int _unused25
:1;
74 unsigned int _unused26
:1;
75 unsigned int _unused27
:1;
76 unsigned int _unused28
:1;
77 unsigned int _unused29
:1;
78 unsigned int force_canonicalize
:1;
79 unsigned int do_not_store
:1;
83 struct samba_kdc_entry
*skdc_entry
;
84 krb5_principal principal
;
87 struct sdb_keys old_keys
;
88 struct sdb_keys older_keys
;
89 struct sdb_event created_by
;
90 struct sdb_event
*modified_by
;
94 unsigned int *max_life
;
95 unsigned int *max_renew
;
96 struct SDBFlags flags
;
99 #define SDB_ERR_NOENTRY 36150275
100 #define SDB_ERR_NOT_FOUND_HERE 36150287
101 #define SDB_ERR_WRONG_REALM 36150289
103 /* These must match the values in hdb.h */
105 #define SDB_F_DECRYPT 1 /* decrypt keys */
106 #define SDB_F_GET_CLIENT 4 /* fetch client */
107 #define SDB_F_GET_SERVER 8 /* fetch server */
108 #define SDB_F_GET_KRBTGT 16 /* fetch krbtgt */
109 #define SDB_F_GET_ANY 28 /* fetch any of client,server,krbtgt */
110 #define SDB_F_CANON 32 /* want canonicalition */
111 #define SDB_F_ADMIN_DATA 64 /* want data that kdc don't use */
112 #define SDB_F_KVNO_SPECIFIED 128 /* we want a particular KVNO */
113 #define SDB_F_FOR_AS_REQ 4096 /* fetch is for a AS REQ */
114 #define SDB_F_FOR_TGS_REQ 8192 /* fetch is for a TGS REQ */
116 #define SDB_F_HDB_MASK (SDB_F_DECRYPT | \
122 SDB_F_KVNO_SPECIFIED | \
126 /* This is not supported by HDB */
127 #define SDB_F_FORCE_CANON 16384 /* force canonicalition */
129 void sdb_key_free(struct sdb_key
*key
);
130 void sdb_keys_free(struct sdb_keys
*keys
);
131 void sdb_entry_free(struct sdb_entry
*e
);
132 struct SDBFlags
int2SDBFlags(unsigned n
);
134 #endif /* _KDC_SDB_H_ */