xref: /onnv-gate/usr/src/lib/gss_mechs/mech_krb5/include/profile.h (revision 12568:0f6ea478c2c7)
1781Sgtb /*
2*12568SShawn.Emery@Sun.COM  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
3781Sgtb  */
4781Sgtb 
50Sstevel@tonic-gate /*
60Sstevel@tonic-gate  * profile.h
70Sstevel@tonic-gate  */
80Sstevel@tonic-gate 
90Sstevel@tonic-gate #ifndef _KRB5_PROFILE_H
100Sstevel@tonic-gate #define _KRB5_PROFILE_H
110Sstevel@tonic-gate 
12781Sgtb #if defined(_WIN32)
130Sstevel@tonic-gate #include <win-mac.h>
140Sstevel@tonic-gate #endif
150Sstevel@tonic-gate 
16781Sgtb #if defined(__MACH__) && defined(__APPLE__)
17781Sgtb #    include <TargetConditionals.h>
18781Sgtb #    if TARGET_RT_MAC_CFM
19781Sgtb #        error "Use KfM 4.0 SDK headers for CFM compilation."
20781Sgtb #    endif
21781Sgtb #endif
22781Sgtb 
230Sstevel@tonic-gate #ifndef KRB5_CALLCONV
240Sstevel@tonic-gate #define KRB5_CALLCONV
250Sstevel@tonic-gate #define KRB5_CALLCONV_C
260Sstevel@tonic-gate #endif
270Sstevel@tonic-gate 
280Sstevel@tonic-gate typedef struct _profile_t *profile_t;
290Sstevel@tonic-gate 
300Sstevel@tonic-gate /*
310Sstevel@tonic-gate  * Used by the profile iterator in prof_get.c
320Sstevel@tonic-gate  */
330Sstevel@tonic-gate #define PROFILE_ITER_LIST_SECTION	0x0001
340Sstevel@tonic-gate #define PROFILE_ITER_SECTIONS_ONLY	0x0002
350Sstevel@tonic-gate #define PROFILE_ITER_RELATIONS_ONLY	0x0004
360Sstevel@tonic-gate 
370Sstevel@tonic-gate #ifdef __cplusplus
380Sstevel@tonic-gate extern "C" {
39*12568SShawn.Emery@Sun.COM #endif
400Sstevel@tonic-gate 
410Sstevel@tonic-gate typedef char* profile_filespec_t;	/* path as C string */
420Sstevel@tonic-gate typedef char* profile_filespec_list_t;	/* list of : separated paths, C string */
43781Sgtb typedef const char * const_profile_filespec_t;	/* path as C string */
44781Sgtb typedef const char * const_profile_filespec_list_t;	/* list of : separated paths, C string */
45781Sgtb 
46781Sgtb long KRB5_CALLCONV profile_init
47781Sgtb 	(const_profile_filespec_t *files, profile_t *ret_profile);
48781Sgtb 
49781Sgtb long KRB5_CALLCONV profile_init_path
50781Sgtb 	(const_profile_filespec_list_t filelist, profile_t *ret_profile);
510Sstevel@tonic-gate 
52781Sgtb long KRB5_CALLCONV profile_flush
53781Sgtb 	(profile_t profile);
54781Sgtb long KRB5_CALLCONV profile_flush_to_file
55781Sgtb 	(profile_t profile, const_profile_filespec_t outfile);
56781Sgtb long KRB5_CALLCONV profile_flush_to_buffer
57781Sgtb 	(profile_t profile, char **bufp);
58781Sgtb void KRB5_CALLCONV profile_free_buffer
59781Sgtb 	(profile_t profile, char *buf);
600Sstevel@tonic-gate 
61781Sgtb long KRB5_CALLCONV profile_is_writable
62781Sgtb 	(profile_t profile, int *writable);
63781Sgtb long KRB5_CALLCONV profile_is_modified
64781Sgtb 	(profile_t profile, int *modified);
650Sstevel@tonic-gate 
66781Sgtb void KRB5_CALLCONV profile_abandon
67781Sgtb 	(profile_t profile);
680Sstevel@tonic-gate 
69781Sgtb void KRB5_CALLCONV profile_release
70781Sgtb 	(profile_t profile);
71781Sgtb 
72781Sgtb long KRB5_CALLCONV profile_get_values
73781Sgtb 	(profile_t profile, const char *const *names, char ***ret_values);
740Sstevel@tonic-gate 
75781Sgtb void KRB5_CALLCONV profile_free_list
76781Sgtb 	(char **list);
770Sstevel@tonic-gate 
78781Sgtb long KRB5_CALLCONV profile_get_string
79781Sgtb 	(profile_t profile, const char *name, const char *subname,
800Sstevel@tonic-gate 			const char *subsubname, const char *def_val,
81781Sgtb 			char **ret_string);
82781Sgtb long KRB5_CALLCONV profile_get_integer
83781Sgtb 	(profile_t profile, const char *name, const char *subname,
840Sstevel@tonic-gate 			const char *subsubname, int def_val,
85781Sgtb 			int *ret_default);
860Sstevel@tonic-gate 
87781Sgtb long KRB5_CALLCONV profile_get_boolean
88781Sgtb 	(profile_t profile, const char *name, const char *subname,
89781Sgtb 			const char *subsubname, int def_val,
90781Sgtb 			int *ret_default);
910Sstevel@tonic-gate 
92781Sgtb long KRB5_CALLCONV profile_get_relation_names
93781Sgtb 	(profile_t profile, const char **names, char ***ret_names);
94781Sgtb 
95781Sgtb long KRB5_CALLCONV profile_get_subsection_names
96781Sgtb 	(profile_t profile, const char **names, char ***ret_names);
970Sstevel@tonic-gate 
98781Sgtb long KRB5_CALLCONV profile_iterator_create
99781Sgtb 	(profile_t profile, const char *const *names,
100781Sgtb 		   int flags, void **ret_iter);
1010Sstevel@tonic-gate 
102781Sgtb void KRB5_CALLCONV profile_iterator_free
103781Sgtb 	(void **iter_p);
1040Sstevel@tonic-gate 
105781Sgtb long KRB5_CALLCONV profile_iterator
106781Sgtb 	(void	**iter_p, char **ret_name, char **ret_value);
1070Sstevel@tonic-gate 
108781Sgtb void KRB5_CALLCONV profile_release_string (char *str);
1090Sstevel@tonic-gate 
110781Sgtb long KRB5_CALLCONV profile_update_relation
111781Sgtb 	(profile_t profile, const char **names,
112781Sgtb 		   const char *old_value, const char *new_value);
1130Sstevel@tonic-gate 
114781Sgtb long KRB5_CALLCONV profile_clear_relation
115781Sgtb 	(profile_t profile, const char **names);
1160Sstevel@tonic-gate 
117781Sgtb long KRB5_CALLCONV profile_rename_section
118781Sgtb 	(profile_t profile, const char **names,
119781Sgtb 		   const char *new_name);
1200Sstevel@tonic-gate 
121781Sgtb long KRB5_CALLCONV profile_add_relation
122781Sgtb 	(profile_t profile, const char **names,
123781Sgtb 		   const char *new_value);
1240Sstevel@tonic-gate 
125*12568SShawn.Emery@Sun.COM /*
126*12568SShawn.Emery@Sun.COM  * Solaris Kerberos: Provide abstract declarations for applications, such as
127*12568SShawn.Emery@Sun.COM  * kconf and smb.
128*12568SShawn.Emery@Sun.COM  */
129*12568SShawn.Emery@Sun.COM long __profile_init(char *filename, profile_t *profile);
130*12568SShawn.Emery@Sun.COM long __profile_release(profile_t profile);
131*12568SShawn.Emery@Sun.COM void __profile_abandon(profile_t profile);
132*12568SShawn.Emery@Sun.COM long __profile_add_domain_mapping(profile_t profile, char *domain, char *realm);
133*12568SShawn.Emery@Sun.COM long __profile_remove_domain_mapping(profile_t profile, char *realm);
134*12568SShawn.Emery@Sun.COM long __profile_get_realm_entry(profile_t profile, char *realm, char *name,
135*12568SShawn.Emery@Sun.COM     char ***ret_value);
136*12568SShawn.Emery@Sun.COM long __profile_add_realm_entry(profile_t profile, char *realm, char *name,
137*12568SShawn.Emery@Sun.COM     char **values);
138*12568SShawn.Emery@Sun.COM long __profile_get_default_realm(profile_t profile, char **realm);
139*12568SShawn.Emery@Sun.COM long __profile_get_realms(profile_t profile, char ***realms);
140*12568SShawn.Emery@Sun.COM long __profile_add_realm(profile_t profile, char *realm, char *master,
141*12568SShawn.Emery@Sun.COM     char **kdcs, boolean_t set_change, boolean_t default_realm);
142*12568SShawn.Emery@Sun.COM long __profile_remove_xrealm_mapping(profile_t profile, char *realm);
143*12568SShawn.Emery@Sun.COM long __profile_remove_realm(profile_t profile, char *realm);
144*12568SShawn.Emery@Sun.COM long __profile_add_xrealm_mapping(profile_t profile, char *source, char *target,
145*12568SShawn.Emery@Sun.COM     char *inter);
146*12568SShawn.Emery@Sun.COM long __profile_validate(profile_t profile, int *val_err, char **val);
147*12568SShawn.Emery@Sun.COM 
1480Sstevel@tonic-gate #ifdef __cplusplus
1490Sstevel@tonic-gate }
150*12568SShawn.Emery@Sun.COM #endif
1510Sstevel@tonic-gate 
1520Sstevel@tonic-gate #endif /* _KRB5_PROFILE_H */
1531770Sgtb 
1541770Sgtb /*
1551770Sgtb  * ettmp22072.h:
1561770Sgtb  * This file is automatically generated; please do not edit it.
1571770Sgtb  */
1581770Sgtb 
1591770Sgtb #include <com_err.h>
1601770Sgtb 
1611770Sgtb #define PROF_VERSION                             (-1429577728L)
1621770Sgtb #define PROF_MAGIC_NODE                          (-1429577727L)
1631770Sgtb #define PROF_NO_SECTION                          (-1429577726L)
1641770Sgtb #define PROF_NO_RELATION                         (-1429577725L)
1651770Sgtb #define PROF_ADD_NOT_SECTION                     (-1429577724L)
1661770Sgtb #define PROF_SECTION_WITH_VALUE                  (-1429577723L)
1671770Sgtb #define PROF_BAD_LINK_LIST                       (-1429577722L)
1681770Sgtb #define PROF_BAD_GROUP_LVL                       (-1429577721L)
1691770Sgtb #define PROF_BAD_PARENT_PTR                      (-1429577720L)
1701770Sgtb #define PROF_MAGIC_ITERATOR                      (-1429577719L)
1711770Sgtb #define PROF_SET_SECTION_VALUE                   (-1429577718L)
1721770Sgtb #define PROF_EINVAL                              (-1429577717L)
1731770Sgtb #define PROF_READ_ONLY                           (-1429577716L)
1741770Sgtb #define PROF_SECTION_NOTOP                       (-1429577715L)
1751770Sgtb #define PROF_SECTION_SYNTAX                      (-1429577714L)
1761770Sgtb #define PROF_RELATION_SYNTAX                     (-1429577713L)
1771770Sgtb #define PROF_EXTRA_CBRACE                        (-1429577712L)
1781770Sgtb #define PROF_MISSING_OBRACE                      (-1429577711L)
1791770Sgtb #define PROF_MAGIC_PROFILE                       (-1429577710L)
1801770Sgtb #define PROF_MAGIC_SECTION                       (-1429577709L)
1811770Sgtb #define PROF_TOPSECTION_ITER_NOSUPP              (-1429577708L)
1821770Sgtb #define PROF_INVALID_SECTION                     (-1429577707L)
1831770Sgtb #define PROF_END_OF_SECTIONS                     (-1429577706L)
1841770Sgtb #define PROF_BAD_NAMESET                         (-1429577705L)
1851770Sgtb #define PROF_NO_PROFILE                          (-1429577704L)
1861770Sgtb #define PROF_MAGIC_FILE                          (-1429577703L)
1871770Sgtb #define PROF_FAIL_OPEN                           (-1429577702L)
1881770Sgtb #define PROF_EXISTS                              (-1429577701L)
1891770Sgtb #define PROF_BAD_BOOLEAN                         (-1429577700L)
1901770Sgtb #define PROF_BAD_INTEGER                         (-1429577699L)
1911770Sgtb #define PROF_MAGIC_FILE_DATA                     (-1429577698L)
1921770Sgtb 
1931770Sgtb #define ERROR_TABLE_BASE_prof (-1429577728L)
1941770Sgtb 
1951770Sgtb /* for compatibility with older versions... */
1961770Sgtb #define prof_err_base ERROR_TABLE_BASE_prof
197