From: Paul Park Date: Thu, 31 Aug 1995 21:25:59 +0000 (+0000) Subject: Test aname_to_lname during make check X-Git-Tag: krb5-1.0-beta6~1210 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9dcaee1c2caf3adb6dc9a4fd0acbe4df167cae1;p=krb5.git Test aname_to_lname during make check git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6646 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 0593a9cce..8c36e44c5 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,8 @@ + +Thu Aug 31 17:24:48 EDT 1995 Paul Park (pjpark@mit.edu) + * t_an_to_ln.c - Translate until error and return status. + * Makefile.in - Test aname_to_lname under check-unix. + Thu Aug 24 18:56:35 1995 Theodore Y. Ts'o * .Sanitize: Update file list. diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index b24154f43..27ed3ccf4 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -123,6 +123,33 @@ check-unix:: $(TEST_PROGS) cmp test.out $(srcdir)/ref_std_conf.out $(RM) test.out +# +# Do some aname-to-lname testing. +# +check-unix:: + echo '[libdefaults]' > ./t_an.conf + echo ' default_realm = r' >> ./t_an.conf + echo '[realms]' >> ./t_an.conf + echo 'r = {' >> ./t_an.conf + if test -x ../../../admin/aname/kdb5_anadd ; then \ + ../../../admin/aname/kdb5_anadd -a -n ./t_an p/i/i/i@r piii; \ + ../../../admin/aname/kdb5_anadd -a -n ./t_an p/a/b/c@r pabc; \ + echo 'auth_to_local = DB:./t_an' >> ./t_an.conf; \ + fi + echo 'auth_to_local = RULE:[3:$$1$$3$$2](rule.*)s/rule//g' \ + >> ./t_an.conf + echo 'auth_to_local = DEFAULT' >> ./t_an.conf + echo '}' >> ./t_an.conf + if test -x ../../../admin/aname/kdb5_anadd ; then \ + KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \ + ./t_an_to_ln p/i/i/i@r p/a/b/c@r; \ + fi + KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \ + ./t_an_to_ln rul/helpme/e@r ru/123/le@r + KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \ + ./t_an_to_ln fred/r@r barney/r@r + rm ./t_an.* + clean:: clean-$(WHAT) $(RM) $(TEST_PROGS) test.out t_std_conf.o t_an_to_ln.o diff --git a/src/lib/krb5/os/t_an_to_ln.c b/src/lib/krb5/os/t_an_to_ln.c index b1740555b..be91868d8 100644 --- a/src/lib/krb5/os/t_an_to_ln.c +++ b/src/lib/krb5/os/t_an_to_ln.c @@ -34,6 +34,9 @@ main(argc, argv) printf("%s: parse_name returns %s\n", programname, error_message(kret)); } + if (kret) + break; } krb5_free_context(kcontext); + return((kret) ? 1 : 0); }