diff options
| author | Greg Hudson <ghudson@mit.edu> | 2011-07-20 19:14:34 +0000 |
|---|---|---|
| committer | Greg Hudson <ghudson@mit.edu> | 2011-07-20 19:14:34 +0000 |
| commit | f2004cdbca0cb79dc15ad3b91fc375c1dd687608 (patch) | |
| tree | 69a18cae1fda16ed2495911692c7fa4ec5bcfada /src/include | |
| parent | 6ea59e4695628ef53bf18ce2e837c2edc4879d0f (diff) | |
| download | krb5-f2004cdbca0cb79dc15ad3b91fc375c1dd687608.tar.gz krb5-f2004cdbca0cb79dc15ad3b91fc375c1dd687608.tar.xz krb5-f2004cdbca0cb79dc15ad3b91fc375c1dd687608.zip | |
Add krb5_init_context_profile API
ticket: 6929
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25026 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/k5-int.h | 3 | ||||
| -rw-r--r-- | src/include/krb5/krb5.hin | 23 |
2 files changed, 25 insertions, 1 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 76993f397..a4ac496c2 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -606,7 +606,8 @@ krb5_error_code krb5_sync_disk_file(krb5_context, FILE *fp); krb5_error_code krb5int_init_context_kdc(krb5_context *); -krb5_error_code krb5_os_init_context(krb5_context, krb5_boolean); +krb5_error_code krb5_os_init_context(krb5_context context, profile_t profile, + krb5_flags flags); void krb5_os_free_context(krb5_context); diff --git a/src/include/krb5/krb5.hin b/src/include/krb5/krb5.hin index c6a1ba2a4..21698fe06 100644 --- a/src/include/krb5/krb5.hin +++ b/src/include/krb5/krb5.hin @@ -2695,6 +2695,9 @@ krb5_kt_end_seq_get(krb5_context context, krb5_keytab keytab, * begin "func-proto.h" */ +#define KRB5_INIT_CONTEXT_SECURE 0x1 /** Use secure context configuration */ +#define KRB5_INIT_CONTEXT_KDC 0x2 /** Use KDC configuration if available */ + /** * Create a krb5 library context. * @@ -2735,6 +2738,26 @@ krb5_error_code KRB5_CALLCONV krb5_init_secure_context(krb5_context *context); /** + * Create a krb5 library context using a specified profile. + * + * @param [in] profile Profile object (NULL to create default profile) + * @param [in] flags Context initialization flags + * @param [out] context Library context + * + * Create a context structure, optionally using a specified profile and + * initialization flags. If @a profile is NULL, the default profile will be + * created from config files. If @a profile is non-null, a copy of it will be + * made for the new context; the caller should still clean up its copy. Valid + * flag values are: + * + * @li @c KRB5_INIT_CONTEXT_SECURE Ignore environment variables + * @li @c KRB5_INIT_CONTEXT_KDC Use KDC configuration if creating profile + */ +krb5_error_code KRB5_CALLCONV +krb5_init_context_profile(struct _profile_t *profile, krb5_flags flags, + krb5_context *context); + +/** * Free a krb5 library context. * * @param [in] context Library context |
