+2005-10-04 Ken Raeburn <raeburn@mit.edu>
+
+ * kdb5.c (kdb_get_conf_section): If the default realm is null,
+ return null.
+ (krb5_db_open): Don't pass null pointer to sprintf if
+ default_realm is null.
+
2005-09-22 Ken Raeburn <raeburn@mit.edu>
* kdb_db2: Directory moved to modules/kdb/db2.
char *result = NULL;
char *value = NULL;
- /* profile has to be initialized. If profile is not initialized, expect nothing less than a crash */
+ if (kcontext->default_realm == NULL)
+ return NULL;
+ /* The profile has to have been initialized. If the profile was
+ not initialized, expect nothing less than a crash. */
status = profile_get_string(kcontext->profile,
/* realms */
KDB_REALM_SECTION,
if (section == NULL) {
sprintf(buf,
"unable to determine configuration section for realm %s\n",
- kcontext->default_realm);
+ kcontext->default_realm ? kcontext->default_realm : "[UNSET]");
status = -1;
krb5_set_err(kcontext, krb5_err_have_str, status, buf);
goto clean_n_exit;