Test aname_to_lname during make check
authorPaul Park <pjpark@mit.edu>
Thu, 31 Aug 1995 21:25:59 +0000 (21:25 +0000)
committerPaul Park <pjpark@mit.edu>
Thu, 31 Aug 1995 21:25:59 +0000 (21:25 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6646 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/ChangeLog
src/lib/krb5/os/Makefile.in
src/lib/krb5/os/t_an_to_ln.c

index 0593a9cceef6a422c4d82db0f1924da06a1d9112..8c36e44c52b8cbc8a39e952216ee12d1ce1de52b 100644 (file)
@@ -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  <tytso@dcl>
 
        * .Sanitize: Update file list.
index b24154f437a2bca601cc72d407a2d606f0665bae..27ed3ccf464abaf0c248021cac42c95e6b0392d0 100644 (file)
@@ -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
 
index b1740555b862ede73f652a47908a1b36965c72e4..be91868d8a63c280986106d0f7c5ff0adc996228 100644 (file)
@@ -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);
 }