t_kdb.c (do_testing): Clean up error handling for krb5_init_context
authorTheodore Tso <tytso@mit.edu>
Mon, 24 Mar 1997 17:20:34 +0000 (17:20 +0000)
committerTheodore Tso <tytso@mit.edu>
Mon, 24 Mar 1997 17:20:34 +0000 (17:20 +0000)
Makefile.in (check): Define and use KRB5_CONFIG_SETUP which sets up
the environment variables appropriately.

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

src/lib/kdb/ChangeLog
src/lib/kdb/Makefile.in
src/lib/kdb/t_kdb.c

index 7693dc1f49a0836990107ef0c2f9e9ce6365ca6a..fa3a680930349b32eef3e5cda7605f689f5c606f 100644 (file)
@@ -1,3 +1,10 @@
+Mon Mar 24 12:19:03 1997  Theodore Ts'o  <tytso@rsts-11.mit.edu>
+
+       * t_kdb.c (do_testing): Clean up error handling for krb5_init_context.
+
+       * Makefile.in (check): Define and use KRB5_CONFIG_SETUP which sets
+               up the environment variables appropriately.
+
 Sun Mar 16 21:20:00 1997  Tom Yu  <tlyu@mit.edu>
 
        * keytab.c: Don't assume dbm_db_get_mkey() and dbe_find_enctype
index 90e73b28b89f9d21db3d43e4b51a573e2a486b25..b842f95242d6089e99437a840ec8dcc22e055e7a 100644 (file)
@@ -1,5 +1,6 @@
 CFLAGS = $(CCOPTS) $(DEFS)
 KRB5_RUN_ENV = @KRB5_RUN_ENV@
+KRB5_CONFIG_SETUP = KRB5_CONFIG=$(SRCTOP)/config-files/krb5.conf ; export KRB5_CONFIG ;
 PROG_LIBPATH=-L$(TOPLIBD)
 PROG_RPATH=$(KRB5_LIBDIR)
 
@@ -51,10 +52,8 @@ t_kdb:       t_kdb.o $(OBJS) $(KDB5_DEPLIBS) $(KRB5_BASE_DEPLIBS)
        $(CC_LINK) -o t_kdb t_kdb.o $(OBJS) $(KDB5_LIBS) $(KRB5_BASE_LIBS)
 
 check::        t_kdb
-       KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-               $(KRB5_RUN_ENV) ./t_kdb -tcv
-       KRB5_CONFIG=$(srcdir)/t_krb5.conf ; export KRB5_CONFIG ;\
-               $(KRB5_RUN_ENV) ./t_kdb -tcvr
+       $(KRB5_CONFIG_SETUP) $(KRB5_RUN_ENV) ./t_kdb -tcv
+       $(KRB5_CONFIG_SETUP) $(KRB5_RUN_ENV) ./t_kdb -tcvr
 
 clean::
        $(RM) t_kdb t_kdb.o
index 1f727654a75904f6247c264a347c4fc245a96238..799df31a1fac5fa9f6ed2e8864513df1299a8591 100644 (file)
@@ -487,11 +487,10 @@ do_testing(db, passes, verbose, timing, rcases, check, save_db, dontclean,
     oparg = "";
 
     /* Set up some initial context */
+    op = "initializing krb5";
     kret = krb5_init_context(&kcontext);
-    if (kret) {
-           com_err(programname, kret, "while initializing krb5");
-           exit(1);
-    }
+    if (kret)
+           goto goodbye;
 
     /* 
      * The database had better not exist.