5 #ifndef _KRB5_PROFILE_H
6 #define _KRB5_PROFILE_H
8 #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
9 #include <KerberosSupport/KerberosSupport.h>
11 #if TARGET_API_MAC_OS8 || (TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX)
12 #include <Kerberos5/win-mac.h>
16 #if TARGET_API_MAC_OSX && TARGET_API_MAC_CARBON
17 #include <CoreServices/CoreServices.h>
18 #elif TARGET_API_MAC_OS8 || TARGET_API_MAC_CARBON
24 #if defined(_MSDOS) || defined(_WIN32)
30 #define KRB5_CALLCONV_C
33 #define KRB5_EXPORTVAR
38 typedef struct _profile_t *profile_t;
40 #if !defined(PROTOTYPE)
41 #if defined(__STDC__) || defined(__cplusplus) || defined(_MSDOS) || defined(_WIN32)
42 #define PROTOTYPE(x) x
44 #define PROTOTYPE(x) ()
49 * Used by the profile iterator in prof_get.c
51 #define PROFILE_ITER_LIST_SECTION 0x0001
52 #define PROFILE_ITER_SECTIONS_ONLY 0x0002
53 #define PROFILE_ITER_RELATIONS_ONLY 0x0004
57 #endif /* __cplusplus */
59 /* Macintoh CFM-68K magic incantation */
64 #if PRAGMA_STRUCT_ALIGN
65 #pragma options align=mac68k
66 #elif PRAGMA_STRUCT_PACKPUSH
68 #elif PRAGMA_STRUCT_PACK
72 /* We use file paths as unique file identifiers except Mac OS 8 and 9*/
73 #if TARGET_API_MAC_OS8 || (TARGET_API_MAC_CARBON && !TARGET_API_MAC_OSX)
74 /* On CFM MacOS, we use native file specifiers as unique file identifiers */
75 typedef FSSpec profile_filespec_t;
76 typedef FSSpec* profile_filespec_list_t;
77 /* array should be terminated with {0, 0, ""} */
78 typedef FSSpec const_profile_filespec_t;
79 typedef FSSpec* const_profile_filespec_list_t;
81 #define PROFILE_USES_PATHS
83 typedef char* profile_filespec_t; /* path as C string */
84 typedef char* profile_filespec_list_t; /* list of : separated paths, C string */
85 typedef const char* const_profile_filespec_t; /* path as C string */
86 typedef const char* const_profile_filespec_list_t; /* list of : separated paths, C string */
89 KRB5_DLLIMP long KRB5_CALLCONV profile_init
90 PROTOTYPE ((const_profile_filespec_t *files, profile_t *ret_profile));
92 KRB5_DLLIMP long KRB5_CALLCONV profile_init_path
93 PROTOTYPE ((const_profile_filespec_list_t filelist, profile_t *ret_profile));
95 /* On Mac Carbon, also provide FSSpec variants */
97 KRB5_DLLIMP long KRB5_CALLCONV FSp_profile_init
98 PROTOTYPE ((const FSSpec* files, profile_t *ret_profile));
100 KRB5_DLLIMP long KRB5_CALLCONV FSp_profile_init_path
101 PROTOTYPE ((const FSSpec* files, profile_t *ret_profile));
104 KRB5_DLLIMP long KRB5_CALLCONV profile_flush
105 PROTOTYPE ((profile_t profile));
107 KRB5_DLLIMP void KRB5_CALLCONV profile_abandon
108 PROTOTYPE ((profile_t profile));
110 KRB5_DLLIMP void KRB5_CALLCONV profile_release
111 PROTOTYPE ((profile_t profile));
113 KRB5_DLLIMP long KRB5_CALLCONV profile_get_values
114 PROTOTYPE ((profile_t profile, const char **names, char ***ret_values));
116 KRB5_DLLIMP void KRB5_CALLCONV profile_free_list
117 PROTOTYPE ((char **list));
119 KRB5_DLLIMP long KRB5_CALLCONV profile_get_string
120 PROTOTYPE((profile_t profile, const char *name, const char *subname,
121 const char *subsubname, const char *def_val,
123 KRB5_DLLIMP long KRB5_CALLCONV profile_get_integer
124 PROTOTYPE((profile_t profile, const char *name, const char *subname,
125 const char *subsubname, int def_val,
128 KRB5_DLLIMP long KRB5_CALLCONV profile_get_boolean
129 PROTOTYPE((profile_t profile, const char *name, const char *subname,
130 const char *subsubname, int def_val,
133 KRB5_DLLIMP long KRB5_CALLCONV profile_get_relation_names
134 PROTOTYPE((profile_t profile, const char **names, char ***ret_names));
136 KRB5_DLLIMP long KRB5_CALLCONV profile_get_subsection_names
137 PROTOTYPE((profile_t profile, const char **names, char ***ret_names));
139 KRB5_DLLIMP long KRB5_CALLCONV profile_iterator_create
140 PROTOTYPE((profile_t profile, const char **names,
141 int flags, void **ret_iter));
143 KRB5_DLLIMP void KRB5_CALLCONV profile_iterator_free
144 PROTOTYPE((void **iter_p));
146 KRB5_DLLIMP long KRB5_CALLCONV profile_iterator
147 PROTOTYPE((void **iter_p, char **ret_name, char **ret_value));
149 KRB5_DLLIMP void KRB5_CALLCONV profile_release_string PROTOTYPE((char *str));
151 KRB5_DLLIMP long KRB5_CALLCONV profile_update_relation
152 PROTOTYPE((profile_t profile, const char **names,
153 const char *old_value, const char *new_value));
155 KRB5_DLLIMP long KRB5_CALLCONV profile_clear_relation
156 PROTOTYPE((profile_t profile, const char **names));
158 KRB5_DLLIMP long KRB5_CALLCONV profile_rename_section
159 PROTOTYPE((profile_t profile, const char **names,
160 const char *new_name));
162 KRB5_DLLIMP long KRB5_CALLCONV profile_add_relation
163 PROTOTYPE((profile_t profile, const char **names,
164 const char *new_value));
166 /* Macintosh CFM-68K magic incantation */
167 #if PRAGMA_STRUCT_ALIGN
168 #pragma options align=reset
169 #elif PRAGMA_STRUCT_PACKPUSH
171 #elif PRAGMA_STRUCT_PACK
175 #ifdef PRAGMA_IMPORT_OFF
183 #endif /* __cplusplus */
185 #endif /* _KRB5_PROFILE_H */
187 * :::MITKerberosLib:GSSKerberos5Sources_9:util:profile:prof_err.h:
188 * This file is automatically generated; please do not edit it.
191 #if defined(macintosh) || (defined(__MACH__) && defined(__APPLE__))
192 #include <KerberosComErr/KerberosComErr.h>
197 #define PROF_VERSION (-1429577728L)
198 #define PROF_MAGIC_NODE (-1429577727L)
199 #define PROF_NO_SECTION (-1429577726L)
200 #define PROF_NO_RELATION (-1429577725L)
201 #define PROF_ADD_NOT_SECTION (-1429577724L)
202 #define PROF_SECTION_WITH_VALUE (-1429577723L)
203 #define PROF_BAD_LINK_LIST (-1429577722L)
204 #define PROF_BAD_GROUP_LVL (-1429577721L)
205 #define PROF_BAD_PARENT_PTR (-1429577720L)
206 #define PROF_MAGIC_ITERATOR (-1429577719L)
207 #define PROF_SET_SECTION_VALUE (-1429577718L)
208 #define PROF_EINVAL (-1429577717L)
209 #define PROF_READ_ONLY (-1429577716L)
210 #define PROF_SECTION_NOTOP (-1429577715L)
211 #define PROF_SECTION_SYNTAX (-1429577714L)
212 #define PROF_RELATION_SYNTAX (-1429577713L)
213 #define PROF_EXTRA_CBRACE (-1429577712L)
214 #define PROF_MISSING_OBRACE (-1429577711L)
215 #define PROF_MAGIC_PROFILE (-1429577710L)
216 #define PROF_MAGIC_SECTION (-1429577709L)
217 #define PROF_TOPSECTION_ITER_NOSUPP (-1429577708L)
218 #define PROF_INVALID_SECTION (-1429577707L)
219 #define PROF_END_OF_SECTIONS (-1429577706L)
220 #define PROF_BAD_NAMESET (-1429577705L)
221 #define PROF_NO_PROFILE (-1429577704L)
222 #define PROF_MAGIC_FILE (-1429577703L)
223 #define PROF_MAGIC_FILE_DATA (-1429577702L)
224 #define PROF_FAIL_OPEN (-1429577701L)
225 #define PROF_EXISTS (-1429577700L)
226 #define PROF_BAD_BOOLEAN (-1429577699L)
227 #define PROF_BAD_INTEGER (-1429577698L)
228 #define ERROR_TABLE_BASE_prof (-1429577728L)
230 extern struct error_table et_prof_error_table;
232 #if (defined(unix) || defined(_AIX)) && !(defined(__MACH__) && defined(__APPLE__))
233 /* for compatibility with older versions... */
234 extern void initialize_prof_error_table ();
235 #define init_prof_err_tbl initialize_prof_error_table
236 #define prof_err_base ERROR_TABLE_BASE_prof
238 #define initialize_prof_error_table()