Don't ignore errors found from parsing the config file. Currently, we
authorTheodore Tso <tytso@mit.edu>
Wed, 6 Nov 1996 21:25:55 +0000 (21:25 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 6 Nov 1996 21:25:55 +0000 (21:25 +0000)
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

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/init_os_ctx.c

index aaaa675c77ed425a6d341c0e728e3fae8ec783cd..30bc9c2f0f942eec9b655f07bfccff0ef25c9581 100644 (file)
@@ -1,3 +1,17 @@
+Wed Nov  6 16:24:56 1996  Theodore Y. Ts'o  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
+
+       * 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  <tytso@rsts-11.mit.edu>
 
        * an_to_ln.c (db_an_to_ln): Remove references to dead BERK_DB_DBM
index 56e5ebc9532658553bd2604372a4b744b8bab940..5f8d48f5f54298abf535f0e20924d2fa45c94831 100644 (file)
@@ -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