From a739ec3952d173302a738dd8b1554e34167a306b Mon Sep 17 00:00:00 2001 From: Ezra Peisach Date: Sat, 9 Nov 1996 21:12:38 +0000 Subject: [PATCH] * 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9353 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/kdb/ChangeLog | 8 ++++++++ src/lib/kdb/Makefile.in | 6 ++++-- src/lib/kdb/t_kdb.c | 14 ++++++++++---- src/lib/kdb/t_krb5.conf | 29 +++++++++++++++++++++++++++++ 4 files changed, 51 insertions(+), 6 deletions(-) create mode 100644 src/lib/kdb/t_krb5.conf diff --git a/src/lib/kdb/ChangeLog b/src/lib/kdb/ChangeLog index 4f8222597..d4131f0f4 100644 --- a/src/lib/kdb/ChangeLog +++ b/src/lib/kdb/ChangeLog @@ -1,3 +1,11 @@ +Sat Nov 9 15:57:50 1996 Ezra Peisach + + * 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 * Makefile.in (t_kdb): Link with $(TOPLIBD)/libdb.a diff --git a/src/lib/kdb/Makefile.in b/src/lib/kdb/Makefile.in index f15eba87f..fad8268ae 100644 --- a/src/lib/kdb/Makefile.in +++ b/src/lib/kdb/Makefile.in @@ -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 diff --git a/src/lib/kdb/t_kdb.c b/src/lib/kdb/t_kdb.c index 3d887234c..1f727654a 100644 --- a/src/lib/kdb/t_kdb.c +++ b/src/lib/kdb/t_kdb.c @@ -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 index 000000000..5882d9770 --- /dev/null +++ b/src/lib/kdb/t_krb5.conf @@ -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 + -- 2.26.2