2 * lib/krb5/keytab/file/ktfile.h
4 * Copyright 1990 by the Massachusetts Institute of Technology.
7 * Export of this software from the United States of America may
8 * require a specific license from the United States Government.
9 * It is the responsibility of any person or organization contemplating
10 * export to obtain such a license before exporting.
12 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
13 * distribute this software and its documentation for any purpose and
14 * without fee is hereby granted, provided that the above copyright
15 * notice appear in all copies and that both that copyright notice and
16 * this permission notice appear in supporting documentation, and that
17 * the name of M.I.T. not be used in advertising or publicity pertaining
18 * to distribution of the software without specific, written prior
19 * permission. M.I.T. makes no representations about the suitability of
20 * this software for any purpose. It is provided "as is" without express
21 * or implied warranty.
24 * This header file contains information needed by internal routines
25 * of the file-based ticket cache implementation.
39 #define KRB5_KT_VNO_1 0x0501 /* krb v5, keytab version 1 (DCE compat) */
40 #define KRB5_KT_VNO 0x0502 /* krb v5, keytab version 2 (standard) */
42 #define KRB5_KT_DEFAULT_VNO KRB5_KT_VNO
47 typedef struct _krb5_ktfile_data {
48 char *name; /* Name of the file */
49 FILE *openf; /* open file, if any. */
50 int version; /* Version number of keytab */
56 #define KTPRIVATE(id) ((krb5_ktfile_data *)(id)->data)
57 #define KTFILENAME(id) (((krb5_ktfile_data *)(id)->data)->name)
58 #define KTFILEP(id) (((krb5_ktfile_data *)(id)->data)->openf)
59 #define KTVERSION(id) (((krb5_ktfile_data *)(id)->data)->version)
61 extern struct _krb5_kt_ops krb5_ktf_ops;
62 extern struct _krb5_kt_ops krb5_ktf_writable_ops;
64 krb5_error_code krb5_ktfile_resolve
65 PROTOTYPE((krb5_context,
69 krb5_error_code krb5_ktfile_wresolve
70 PROTOTYPE((krb5_context,
74 krb5_error_code krb5_ktfile_get_name
75 PROTOTYPE((krb5_context,
80 krb5_error_code krb5_ktfile_close
81 PROTOTYPE((krb5_context,
84 krb5_error_code krb5_ktfile_get_entry
85 PROTOTYPE((krb5_context,
90 krb5_keytab_entry *));
92 krb5_error_code krb5_ktfile_start_seq_get
93 PROTOTYPE((krb5_context,
97 krb5_error_code krb5_ktfile_get_next
98 PROTOTYPE((krb5_context,
103 krb5_error_code krb5_ktfile_end_get
104 PROTOTYPE((krb5_context,
108 /* routines to be included on extended version (write routines) */
109 krb5_error_code krb5_ktfile_add
110 PROTOTYPE((krb5_context,
112 krb5_keytab_entry *));
114 krb5_error_code krb5_ktfile_remove
115 PROTOTYPE((krb5_context,
117 krb5_keytab_entry *));
119 krb5_error_code krb5_ktfileint_openr
120 PROTOTYPE((krb5_context,
123 krb5_error_code krb5_ktfileint_openw
124 PROTOTYPE((krb5_context,
127 krb5_error_code krb5_ktfileint_close
128 PROTOTYPE((krb5_context,
131 krb5_error_code krb5_ktfileint_read_entry
132 PROTOTYPE((krb5_context,
134 krb5_keytab_entry *));
136 krb5_error_code krb5_ktfileint_write_entry
137 PROTOTYPE((krb5_context,
139 krb5_keytab_entry *));
141 krb5_error_code krb5_ktfileint_delete_entry
142 PROTOTYPE((krb5_context,
146 krb5_error_code krb5_ktfileint_internal_read_entry
147 PROTOTYPE((krb5_context,
152 krb5_error_code krb5_ktfileint_size_entry
153 PROTOTYPE((krb5_context,
157 krb5_error_code krb5_ktfileint_find_slot
158 PROTOTYPE((krb5_context,
164 #endif /* KRB5_KTFILE__ */