* t_krb5.conf: Dummy krb5.conf file from the krb5 library
authorEzra Peisach <epeisach@mit.edu>
Sat, 9 Nov 1996 21:12:38 +0000 (21:12 +0000)
committerEzra Peisach <epeisach@mit.edu>
Sat, 9 Nov 1996 21:12:38 +0000 (21:12 +0000)
* Makefile.in (check): Set KRB5_CONFIG to a valid krb5.conf file.

* t_kdb.c (do_testing): Check return value from krb5_init_context.

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

src/lib/kdb/ChangeLog
src/lib/kdb/Makefile.in
src/lib/kdb/t_kdb.c
src/lib/kdb/t_krb5.conf [new file with mode: 0644]

index 4f8222597ae12108287e86b27ed1c4e50feedb36..d4131f0f4584e975f7af9b8b6982bc64390568e6 100644 (file)
@@ -1,3 +1,11 @@
+Sat Nov  9 15:57:50 1996  Ezra Peisach  <epeisach@mit.edu>
+
+       * t_krb5.conf: Dummy krb5.conf file from the krb5 library. 
+
+       * Makefile.in (check): Set KRB5_CONFIG to a valid krb5.conf file.
+
+       * t_kdb.c (do_testing): Check return value from krb5_init_context.
+
 Thu Oct 31 11:10:56 1996  Ezra Peisach  <epeisach@trane.rose.brandeis.edu>
 
        * Makefile.in (t_kdb): Link with $(TOPLIBD)/libdb.a
index f15eba87f58af842a55f0ee2e7c16e7f5b470129..fad8268ae602d54abd8d34b9a0633e1346e1358f 100644 (file)
@@ -71,8 +71,10 @@ t_kdb:       t_kdb.o $(OBJS) $(TOPLIBD)/libkrb5.a $(TOPLIBD)/libcrypto.a $(TOPLIBD)/li
        $(LD) $(LDFLAGS) $(LDARGS) -o t_kdb t_kdb.o $(OBJS) $(LIBS) $(TOPLIBD)/libdb.a
 
 check::        t_kdb
-       $(KRB5_RUN_ENV) ./t_kdb -tcv
-       $(KRB5_RUN_ENV) ./t_kdb -tcvr
+       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
 
 clean::
        $(RM) t_kdb t_kdb.o
index 3d887234c45468ae092ff7caa7115f3010df694a..1f727654a75904f6247c264a347c4fc245a96238 100644 (file)
@@ -487,8 +487,11 @@ do_testing(db, passes, verbose, timing, rcases, check, save_db, dontclean,
     oparg = "";
 
     /* Set up some initial context */
-    krb5_init_context(&kcontext);
-    krb5_init_ets(kcontext);
+    kret = krb5_init_context(&kcontext);
+    if (kret) {
+           com_err(programname, kret, "while initializing krb5");
+           exit(1);
+    }
 
     /* 
      * The database had better not exist.
@@ -868,8 +871,11 @@ do_testing(db, passes, verbose, timing, rcases, check, save_db, dontclean,
                struct stat stbuf;
 
                while (stat("./test.lock", &stbuf) == -1)
-               krb5_init_context(&ccontext);
-               krb5_init_ets(ccontext);
+               kret = krb5_init_context(&ccontext);
+               if (kret) {
+                   com_err(programname, kret, "while initializing krb5");
+                   exit(1);
+               }
                if ((kret = krb5_db_set_name(ccontext, db)) ||
                    (kret = krb5_db_init(ccontext)))
                    exit(1);
diff --git a/src/lib/kdb/t_krb5.conf b/src/lib/kdb/t_krb5.conf
new file mode 100644 (file)
index 0000000..5882d97
--- /dev/null
@@ -0,0 +1,29 @@
+[libdefaults]
+       ticket_lifetime = 600
+       default_realm = ATHENA.MIT.EDU
+
+[realms]
+       ATHENA.MIT.EDU = {
+               kdc = KERBEROS-2.MIT.EDU:88
+               kdc = KERBEROS.MIT.EDU
+               kdc = KERBEROS-1.MIT.EDU
+               admin_server = KERBEROS.MIT.EDU
+               default_domain = MIT.EDU
+               v4_instance_convert = {
+                       mit = mit.edu
+                       lithium = lithium.lcs.mit.edu
+               }
+       }
+       CYGNUS.COM = {
+               kdc = KERBEROS-1.CYGNUS.COM
+               kdc = KERBEROS.CYGNUS.COM
+               admin_server = KERBEROS.MIT.EDU
+       }
+
+[domain_realm]
+       .mit.edu = ATHENA.MIT.EDU
+       mit.edu = ATHENA.MIT.EDU
+       .media.mit.edu = MEDIA-LAB.MIT.EDU
+       media.mit.edu = MEDIA-LAB.MIT.EDU
+       .ucsc.edu = CATS.UCSC.EDU
+