Lines Matching defs:profile
14 #include "../../util/profile/prof_int.h"
94 k5_profile_iter_name_value(profile_t profile, char *section, char *key,
110 code = profile_iterator_create(profile, hierarchy,
112 /* Change loop condition to fix the profile iterator issue */
175 k5_profile_get_domain_realm(profile_t profile, char *realm, char ***domains,
178 if (profile == NULL || realm == NULL || domains == NULL)
181 return (k5_profile_iter_name_value(profile, "domain_realm", realm,
186 k5_profile_set_appdefaults(profile_t profile)
191 if (profile == NULL)
203 (void) profile_clear_relation(profile, hierarchy);
205 code = profile_add_relation(profile, hierarchy, "true");
211 (void) profile_clear_relation(profile, hierarchy);
213 code = profile_add_relation(profile, hierarchy, "true");
219 k5_profile_set_logging(profile_t profile)
224 if (profile == NULL)
236 (void) profile_clear_relation(profile, hierarchy);
238 code = profile_add_relation(profile, hierarchy,
245 (void) profile_clear_relation(profile, hierarchy);
247 code = profile_add_relation(profile, hierarchy,
256 (void) profile_clear_relation(profile, hierarchy);
258 code = profile_add_relation(profile, hierarchy, "1d");
264 (void) profile_clear_relation(profile, hierarchy);
266 code = profile_add_relation(profile, hierarchy, "10");
274 * errcode_t k5_profile_set_libdefaults(profile_t profile, char *realm)
276 * where profile was the pointer passed back by k5_profile_init
280 k5_profile_set_libdefaults(profile_t profile, char *realm)
285 if (profile == NULL || realm == NULL)
295 (void) profile_clear_relation(profile, hierarchy);
297 code = profile_add_relation(profile, hierarchy, realm);
303 k5_profile_set_kdc(profile_t profile, char *realm, char *kdc,
309 if (profile == NULL || realm == NULL || kdc == NULL)
322 (void) profile_clear_relation(profile, hierarchy);
325 code = profile_add_relation(profile, hierarchy, kdc);
331 * errcode_t k5_profile_release(profile_t profile)
333 * where profile was the pointer passed back by k5_profile_init
334 * Note: used to commit the associated profile to the backing store
335 * (e.g. file) and free profile memory
338 * need to free the resulting profile information in memory
341 k5_profile_release(profile_t profile)
346 if (profile == NULL || profile->magic != PROF_MAGIC_PROFILE)
349 for (p = profile->first_file; p; p = next) {
354 profile->magic = 0;
355 free(profile);
361 * void k5_profile_abandon(profile_t profile)
363 * where profile was the pointer passed back by k5_profile_init
364 * Note: used to free any profile information in memory. Typically can
368 k5_profile_abandon(profile_t profile)
370 profile_abandon(profile);
374 * errcode_t k5_profile_add_domain_mapping(profile_t profile, char *domain,
377 * where profile was the pointer passed back by k5_profile_init
382 k5_profile_add_domain_mapping(profile_t profile, char *domain, char *realm)
387 if (profile == NULL || domain == NULL || realm == NULL)
397 (void) profile_clear_relation(profile, hierarchy);
399 code = profile_add_relation(profile, hierarchy, realm);
405 * errcode_t k5_profile_remove_domain_mapping(profile_t profile, char *realm)
407 * where profile was the pointer passed back by k5_profile_init
413 k5_profile_remove_domain_mapping(profile_t profile, char *realm)
419 if (profile == NULL || realm == NULL)
426 code = k5_profile_get_domain_realm(profile, realm, &domains, B_FALSE);
430 code = profile_clear_relation(profile, hierarchy);
444 * errcode_t k5_profile_get_realm_entry(profile_t profile, char *realm,
447 * where profile was the pointer passed back by k5_profile_init
455 k5_profile_get_realm_entry(profile_t profile, char *realm, char *name,
461 if (profile == NULL || realm == NULL || name == NULL ||
472 code = profile_get_values(profile, hierarchy, ret_value);
481 * errcode_t k5_profile_add_realm_entry(profile_t profile, char *realm,
484 * where profile was the pointer passed back by k5_profile_init
494 k5_profile_add_realm_entry(profile_t profile, char *realm, char *name,
501 if (profile == NULL || realm == NULL || name == NULL || values == NULL)
512 (void) profile_clear_relation(profile, hierarchy);
516 code = profile_add_relation(profile, hierarchy, *tvalue);
527 * errcode_t k5_profile_get_default_realm(profile_t profile, char **realm)
528 * where profile was the pointer passed back by k5_profile_init
534 k5_profile_get_default_realm(profile_t profile, char **realm)
538 if (profile == NULL || realm == NULL)
543 code = profile_get_string(profile, "libdefaults", "default_realm", 0, 0,
553 * errcode_t k5_profile_get_realms(profile_t profile, char ***realms)
555 * where profile was the pointer passed back by k5_profile_init
561 k5_profile_get_realms(profile_t profile, char ***realms)
564 if (profile == NULL || realms == NULL)
569 return (k5_profile_iter_name_value(profile, "realms", NULL, realms,
574 * errcode_t k5_profile_add_realm(profile_t profile, char *realm,
578 * where profile was the pointer passed back by k5_profile_init
592 k5_profile_add_realm(profile_t profile, char *realm, char *master, char **kdcs,
600 if (profile == NULL || realm == NULL)
607 if (code = k5_profile_set_libdefaults(profile, realm))
621 (void) profile_clear_relation(profile, hierarchy);
623 if (code = profile_add_relation(profile, hierarchy, master))
633 (void) profile_clear_relation(profile, hierarchy);
635 code = profile_add_relation(profile, hierarchy, "SET_CHANGE");
642 if (code = k5_profile_set_kdc(profile, realm, *tkdcs, ow))
648 code = k5_profile_set_logging(profile);
652 code = k5_profile_set_appdefaults(profile);
658 * errcode_t k5_profile_remove_xrealm_mapping(profile_t profile, char *realm)
660 * where profile was the pointer passed back by k5_profile_init
669 k5_profile_remove_xrealm_mapping(profile_t profile, char *realm)
677 if (profile == NULL || realm == NULL)
688 code = profile_rename_section(profile, hierarchy, NULL);
691 code = profile_iterator_create(profile, hierarchy,
697 code2 = profile_iterator_create(profile, hierarchy,
709 profile, hierarchy);
755 * errcode_t k5_profile_remove_realm(profile_t profile, char *realm)
757 * where profile was the pointer passed back by k5_profile_init
764 k5_profile_remove_realm(profile_t profile, char *realm)
770 if (profile == NULL || realm == NULL)
785 code = k5_profile_get_default_realm(profile, &drealm);
788 code = profile_clear_relation(profile, hierarchy);
801 (void) profile_rename_section(profile, hierarchy, NULL);
803 (void) k5_profile_remove_domain_mapping(profile, realm);
805 (void) k5_profile_remove_xrealm_mapping(profile, realm);
814 * errcode_t k5_profile_add_xrealm_mapping(profile_t profile, char *source,
817 * where profile was the pointer passed back by k5_profile_init
825 k5_profile_add_xrealm_mapping(profile_t profile, char *source, char *target,
831 if (profile == NULL || source == NULL || target == NULL ||
843 (void) profile_clear_relation(profile, hierarchy);
845 code = profile_add_relation(profile, hierarchy, inter);
851 * errcode_t k5_profile_validate(profile_t profile, char *realm, int *val_err,
854 * where profile was the pointer passed back by k5_profile_init
858 * No errors detected in profile
892 * value is returned as is from the profile.
905 * validation error code set to non-zero if the profile is invalid in any way.
912 k5_profile_validate(profile_t profile, char *realm, int *val_err, char **val,
920 if (profile == NULL || realm == NULL || val_err == NULL || val == NULL)
926 code = k5_profile_get_realms(profile, &realms);
963 code = k5_profile_get_domain_realm(profile, *trealms,
971 code = k5_profile_get_domain_realm(profile,
987 code = k5_profile_get_realm_entry(profile, *trealms,
1002 code = k5_profile_get_realm_entry(profile, *trealms,
1016 code = k5_profile_get_default_realm(profile, &default_realm);
1066 * errcode_t k5_profile_init(char *filename, profile_t *profile)
1068 * where filename is the specified profile location. If filename is NULL
1070 * where profile is pointer passed to caller upon success
1072 * Note: the function assumes that the profile file resides in a directory only
1075 * Note: if the file does exist then any existing profile information will
1076 * be in profile
1077 * Note: profile_release() should be used by the caller to free profile
1080 k5_profile_init(char *filename, profile_t *profile)
1088 if (profile == NULL)
1119 * Specify non-null for specific file (to load any existing profile)
1121 code = profile_init((const_profile_filespec_t *)filenames, profile);
1129 * k5_profile_validate_get_error_msg(profile_t profile, int err, char *val,
1133 * where profile was pointer passed back by k5_profile_init
1144 k5_profile_validate_get_error_msg(profile_t profile, int err, char *val,
1151 if (profile == NULL || val == NULL || err_msg == NULL)
1155 f = profile->first_file->data->filespec;
1205 * errcode_t k5_profile_get_libdefaults_entry(profile_t profile, char *name,
1208 * where profile was the pointer passed back by k5_profile_init
1215 k5_profile_get_libdefaults_entry(profile_t profile, char *name,
1221 if (profile == NULL || name == NULL || ret_value == NULL)
1230 code = profile_get_value(profile, hierarchy, (char **)ret_value);
1239 * errcode_t k5_profile_add_libdefaults_entry(profile_t profile char *name,
1242 * where profile was the pointer passed back by k5_profile_init
1249 k5_profile_add_libdefaults_entry(profile_t profile, char *name, char *value)
1254 if (profile == NULL || name == NULL || value == NULL)
1264 (void) profile_clear_relation(profile, hierarchy);
1266 code = profile_add_relation(profile, hierarchy, value);
1277 profile_get_options_boolean(profile, section, options)
1278 profile_t profile;
1295 retval = profile_get_value(profile, (const char **) actual_section,
1323 profile_get_options_string(profile, section, options)
1324 profile_t profile;
1341 retval = profile_get_value(profile, (const char **) actual_section,