summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Hudson <ghudson@mit.edu>2013-12-16 17:09:00 -0500
committerGreg Hudson <ghudson@mit.edu>2013-12-16 17:09:00 -0500
commitf7f6403626f26ff7fe7ec1dc5691e5923c8fea93 (patch)
treeff12ee1e4b5538bcab7e42aa3374b408d9045b4d
parentdecccbcb5075f8fbc28a535a9b337afc84a15dee (diff)
downloadkrb5-f7f6403626f26ff7fe7ec1dc5691e5923c8fea93.tar.gz
krb5-f7f6403626f26ff7fe7ec1dc5691e5923c8fea93.tar.xz
krb5-f7f6403626f26ff7fe7ec1dc5691e5923c8fea93.zip
Don't require krb5.conf without KRB5_DNS_LOOKUP
For a long time we have allowed krb5 contexts to be initialized in the absence of krb5.conf--but only if KRB5_DNS_LOOKUP is defined, presumably on the theory that no KDCs could be contacted without either DNS support or profile configuration. But locate plugins could provide the ability to find KDCs, and some libkrb5 operations (such as IAKERB initiation) could succeed without needing to locate KDCs. Also get rid of the profile_in_memory context flag, since we don't use it any more.
-rw-r--r--src/include/k5-int.h4
-rw-r--r--src/lib/krb5/os/init_os_ctx.c13
2 files changed, 2 insertions, 15 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h
index 623f09e655..4f221fbeee 100644
--- a/src/include/k5-int.h
+++ b/src/include/k5-int.h
@@ -1149,10 +1149,6 @@ struct _krb5_context {
/* Use the config-file ktypes instead of app-specified? */
krb5_boolean use_conf_ktypes;
-#ifdef KRB5_DNS_LOOKUP
- krb5_boolean profile_in_memory;
-#endif /* KRB5_DNS_LOOKUP */
-
/* locate_kdc module stuff */
struct plugin_dir_handle libkrb5_plugins;
struct krb5plugin_service_locate_ftable *vtbl;
diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c
index 2afe2e127b..ff6061a2ca 100644
--- a/src/lib/krb5/os/init_os_ctx.c
+++ b/src/lib/krb5/os/init_os_ctx.c
@@ -378,10 +378,6 @@ os_init_paths(krb5_context ctx, krb5_boolean kdc)
profile_filespec_t *files = 0;
krb5_boolean secure = ctx->profile_secure;
-#ifdef KRB5_DNS_LOOKUP
- ctx->profile_in_memory = 0;
-#endif /* KRB5_DNS_LOOKUP */
-
retval = os_get_default_config_files(&files, secure);
if (retval == 0 && kdc)
@@ -391,14 +387,9 @@ os_init_paths(krb5_context ctx, krb5_boolean kdc)
retval = profile_init_flags((const_profile_filespec_t *) files,
PROFILE_INIT_ALLOW_MODULE, &ctx->profile);
-#ifdef KRB5_DNS_LOOKUP
- /* if none of the filenames can be opened use an empty profile */
- if (retval == ENOENT) {
+ /* If none of the filenames can be opened, use an empty profile. */
+ if (retval == ENOENT)
retval = profile_init(NULL, &ctx->profile);
- if (!retval)
- ctx->profile_in_memory = 1;
- }
-#endif /* KRB5_DNS_LOOKUP */
}
if (files)