2 * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
3 * Use is subject to license terms.
6 %#pragma ident "%Z%%M% %I% %E% SMI"
13 * Initial declarations
17 typedef short int16_t;
18 typedef unsigned short uint16_t;
20 typedef unsigned int uint32_t;
21 typedef hyper int64_t;
22 typedef unsigned hyper uint64_t;
25 typedef opaque utf8str_t<>;
28 * Transaction log serial no.
30 typedef uint32_t kdb_sno_t;
40 int32_t k_ver; /* Version */
41 int32_t k_kvno; /* Key version no. */
43 utf8str_t k_contents<>;
55 kdbe_data_t k_components<>;
59 /* TL data (pre-auth specific data) */
65 /* Structure to store pwd history */
66 typedef kdbe_key_t kdbe_pw_hist_t<>;
68 /* Basic KDB entry attributes */
69 enum kdbe_attr_type_t {
72 AT_MAX_RENEW_LIFE = 2,
77 AT_FAIL_AUTH_COUNT = 7,
85 AT_PW_LAST_CHANGE = 15,
87 AT_PW_POLICY_SWITCH = 17,
92 /* KDB entry, Attribute=value */
93 union kdbe_val_t switch (kdbe_attr_type_t av_type) {
95 uint32_t av_attrflags;
98 case AT_MAX_RENEW_LIFE:
99 uint32_t av_max_renew_life;
104 case AT_LAST_SUCCESS:
105 uint32_t av_last_success;
107 uint32_t av_last_failed;
108 case AT_FAIL_AUTH_COUNT:
109 uint32_t av_fail_auth_count;
111 kdbe_princ_t av_princ;
113 kdbe_key_t av_keydata<>; /* array of keys */
115 kdbe_tl_t av_tldata<>; /* array of TL data */
118 case AT_PW_LAST_CHANGE:
119 uint32_t av_pw_last_change;
121 kdbe_princ_t av_mod_princ;
123 uint32_t av_mod_time;
125 utf8str_t av_mod_where;
127 utf8str_t av_pw_policy;
128 case AT_PW_POLICY_SWITCH:
129 bool av_pw_policy_switch;
130 case AT_PW_HIST_KVNO:
131 uint32_t av_pw_hist_kvno;
133 kdbe_pw_hist_t av_pw_hist<>; /* array of pw history */
135 opaque av_extension<>; /* futures */
138 typedef kdbe_val_t kdbe_t<>; /* Array of attr/val makes a KDB entry */
143 struct kdb_incr_update_t {
144 utf8str_t kdb_princ_name; /* Principal name */
145 kdb_sno_t kdb_entry_sno; /* Serial # of entry */
146 kdbe_time_t kdb_time; /* Timestamp of update */
147 kdbe_t kdb_update; /* Attributes modified */
148 bool kdb_deleted; /* Is this update a DELETION ? */
149 bool kdb_commit; /* Is the entry committed or not ? */
150 utf8str_t kdb_kdcs_seen_by<>; /* Names of slaves that have */
151 /* seen this update - for */
153 opaque kdb_futures<>; /* futures */
159 typedef kdb_incr_update_t kdb_ulog_t<>;
161 enum update_status_t {
164 UPDATE_FULL_RESYNC_NEEDED = 2,
167 UPDATE_PERM_DENIED = 5
172 kdbe_time_t last_time;
175 struct kdb_incr_result_t {
176 kdb_last_t lastentry;
181 struct kdb_fullresync_result_t {
182 kdb_last_t lastentry;
186 program KRB5_IPROP_PROG {
187 version KRB5_IPROP_VERS {
192 IPROP_NULL(void) = 0;
195 * Keep waiting for and get next incremental update(s)
197 * Will return latest kdb_vers on the master (if different),
198 * alongwith return value and affected db entries.
201 IPROP_GET_UPDATES(kdb_last_t) = 1;
204 * We need to do the full-resync of the db, since the
205 * serial nos./timestamps are way out-of-whack
207 kdb_fullresync_result_t
208 IPROP_FULL_RESYNC(void) = 2;