From: Theodore Tso Date: Wed, 6 Nov 1996 21:25:55 +0000 (+0000) Subject: Don't ignore errors found from parsing the config file. Currently, we X-Git-Tag: krb5-1.0-freeze1~118 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=3f6476c0308d9993e6d33993c4c36c25d3ac9ab4;p=krb5.git Don't ignore errors found from parsing the config file. Currently, we return an error if the profile isn't found. In the future we can maybe do something better with intelligent defaulting if krb5.conf doesn't exist, but we don't have this today. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9307 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index aaaa675c7..30bc9c2f0 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,17 @@ +Wed Nov 6 16:24:56 1996 Theodore Y. Ts'o + + * init_os_ctx.c (os_init_paths): Don't ignore errors found from + parsing the config file. Currently, we return an error if + the profile isn't found. In the future we can maybe do + something better with intelligent defaulting if krb5.conf + doesn't exist, but we don't have this today. + +Wed Oct 23 01:15:40 1996 Theodore Y. Ts'o + + * configure.in, Makefile.in: Check to see if compile in -lgen + exists; if so, add it to the SHLIB_LIBS line, since it + will be needed by an_to_ln.c, in all probability. + Thu Aug 22 15:19:47 1996 Theodore Ts'o * an_to_ln.c (db_an_to_ln): Remove references to dead BERK_DB_DBM diff --git a/src/lib/krb5/os/init_os_ctx.c b/src/lib/krb5/os/init_os_ctx.c index 56e5ebc95..5f8d48f5f 100644 --- a/src/lib/krb5/os/init_os_ctx.c +++ b/src/lib/krb5/os/init_os_ctx.c @@ -150,6 +150,16 @@ os_init_paths(ctx, secure) if (retval) ctx->profile = 0; + if (retval == ENOENT) + retval = KRB5_CONFIG_CANTOPEN; + + if ((retval == PROF_SECTION_NOTOP) || + (retval == PROF_SECTION_SYNTAX) || + (retval == PROF_RELATION_SYNTAX) || + (retval == PROF_EXTRA_CBRACE) || + (retval == PROF_MISSING_OBRACE)) + return KRB5_CONFIG_BADFORMAT; + return retval; } @@ -178,12 +188,11 @@ krb5_os_init_context(ctx) retval = os_init_paths(ctx, FALSE); /* - * We ignore errors if the profile can not be initialized, - * since there must be a way to get a context even if the - * default krb5.conf file doesn't exist. + * If there's an error in the profile, return an error. Just + * ignoring the error is a Bad Thing (tm). */ - return 0; + return retval; } krb5_error_code INTERFACE