* g_cnffile.c (krb__get_srvtabname): Fix to actually extract
authorTom Yu <tlyu@mit.edu>
Fri, 16 Apr 1999 00:19:31 +0000 (00:19 +0000)
committerTom Yu <tlyu@mit.edu>
Fri, 16 Apr 1999 00:19:31 +0000 (00:19 +0000)
krb5_srvtab value from profile, instead of always ignoring it.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@11363 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb4/ChangeLog
src/lib/krb4/g_cnffile.c

index 13b13338dd1731798bb0d25bd6d150cda6e80d90..64601398a9bd2b49e25304d7140bc12fa6554e59 100644 (file)
@@ -1,3 +1,8 @@
+Thu Apr 15 20:18:38 1999  Tom Yu  <tlyu@mit.edu>
+
+       * g_cnffile.c (krb__get_srvtabname): Fix to actually extract
+       krb5_srvtab value from profile, instead of always ignoring it.
+
 Mon Feb  8 21:56:45 1999  Theodore Y. Ts'o  <tytso@mit.edu>
 
        * rd_req.c (krb_rd_req): Add appropriate #ifdef so that this code
index c50cd50e45cdbbc1617fd2d32ba8379795268d89..9b7b0705238d100ffd6b042ab2149d8c039f83a2 100644 (file)
@@ -62,17 +62,18 @@ krb__get_srvtabname(default_srvtabname)
        names[0] = "libdefaults";
        names[1] = "krb4_srvtab";
        names[2] = 0;
-       if (krb5__krb4_context &&
-           (retval = profile_get_values(krb5__krb4_context->profile, names, 
-                                        &full_name))
-           && retval == 0 && full_name && full_name[0]) {
-           retname = strdup(full_name[0]);
-           for (cpp = full_name; *cpp; cpp++) 
-               krb5_xfree(*cpp);
-           krb5_xfree(full_name);
-       }else {
-           retname = strdup(default_srvtabname);
+       if (krb5__krb4_context) {
+           retval = profile_get_values(krb5__krb4_context->profile, names, 
+                                       &full_name);
+           if (retval == 0 && full_name && full_name[0]) {
+               retname = strdup(full_name[0]);
+               for (cpp = full_name; *cpp; cpp++) 
+                   krb5_xfree(*cpp);
+               krb5_xfree(full_name);
+               return retname;
+           }
        }
+       retname = strdup(default_srvtabname);
        return retname;
 }