* Enough removal of db from aname_to_localname so that Linux compiles;
authorSam Hartman <hartmans@mit.edu>
Mon, 5 Aug 1996 18:17:23 +0000 (18:17 +0000)
committerSam Hartman <hartmans@mit.edu>
Mon, 5 Aug 1996 18:17:23 +0000 (18:17 +0000)
easily reversed.

If we decide to remove permanently, the following additional changes should happen:

* admin/un_add should go away
* Ifdef'd code should be remove from an_to_ln.c
* Remove commented lines from Makefile
* Remove cruft from aclocal.m4
* Remove from associated configure.in files

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

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

index 2b42f387e6e5e49320d4aa89600dbb6466b25ca3..5d0ab54b99655743d0134d61703fda2a7e643a8d 100644 (file)
@@ -1,3 +1,11 @@
+Tue Jul 30 19:15:55 1996  Sam Hartman  <hartmans@tertius.mit.edu>
+
+       * Makefile.in (check-unix): Comment out an_2_ln tests that use
+        database.
+
+       * an_to_ln.c (krb5_aname_to_localname): Make the db lookup verison
+        of aname_2_localname optional.
+
 Sun Jul 28 22:39:12 1996  Tom Yu  <tlyu@mit.edu>
 
        * an_to_ln.c (aname_do_match): #elif HAVE_REGEXP_H should have
index 8c49fbe40537fde281075935547de369cf61329f..72c7e04025b61a367887997e4aa821eda7890eee 100644 (file)
@@ -129,19 +129,19 @@ check-unix::
        echo '  default_realm = r' >> ./t_an.conf
        echo '[realms]' >> ./t_an.conf
        echo 'r = {' >> ./t_an.conf
-       if test -r ../../../admin/aname/kdb5_anadd ; then \
-               $(KRB5_RUN_ENV) ../../../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
+#      if test -r ../../../admin/aname/kdb5_anadd ; then \
+#              $(KRB5_RUN_ENV) ../../../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 -r ../../../admin/aname/kdb5_anadd ; then \
-               KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \
-               $(KRB5_RUN_ENV) ./t_an_to_ln p/i/i/i@r p/a/b/c@r; \
-       fi
+#      if test -r ../../../admin/aname/kdb5_anadd ; then \
+#              KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \
+#              $(KRB5_RUN_ENV) ./t_an_to_ln p/i/i/i@r p/a/b/c@r; \
+#      fi
        KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \
        $(KRB5_RUN_ENV) ./t_an_to_ln rul/helpme/e@r ru/123/le@r
        KRB5_CONFIG=./t_an.conf ; export KRB5_CONFIG ; \
index f362cdc6319d2e5b2fabce50b9b0e48d27893f48..e69be0b481499c751fd85f3ccd6d4adc2e113e72 100644 (file)
@@ -41,7 +41,7 @@
 #ifndef        min
 #define        min(a,b)        ((a>b) ? b : a)
 #endif /* min */
-
+#ifdef ANAME_DB
 #ifdef BERK_DB_DBM
 /*
  * Use Berkeley Hashed Database code.
@@ -60,6 +60,7 @@ extern datum  db_dbm_fetch KRB5_PROTOTYPE((DBM *, datum));
 #define        KDBM_CLOSE(db)          dbm_close(db)
 #define        KDBM_FETCH(db, key)     dbm_fetch(db, key)
 #endif /* BERK_DB_DBM */
+#endif /*ANAME_DB*/
 
 /*
  * Find the portion of the flattened principal name that we use for mapping.
@@ -87,6 +88,7 @@ aname_full_to_mapping_name(fprincname)
     return(mname);
 }
 
+#ifdef ANAME_DB
 /*
  * Implementation:  This version uses a DBM database, indexed by aname,
  * to generate a lname.
@@ -146,6 +148,7 @@ db_an_to_ln(context, dbname, aname, lnsize, lname)
     return KRB5_LNAME_NOTRANS;
 #endif /* BERK_DB_DBM && !_MSDOS && !_WIN32 && !MACINTOSH */
 }
+#endif /*ANAME_DB*/
 
 #ifdef AN_TO_LN_RULES
 /*
@@ -743,6 +746,7 @@ krb5_aname_to_localname(context, aname, lnsize, lname)
                                *argp = '\0';
                                argp++;
                            }
+#ifdef ANAME_DB
                            if (!strcmp(typep, "DB") && argp) {
                                kret = db_an_to_ln(context,
                                                   argp,
@@ -753,6 +757,7 @@ krb5_aname_to_localname(context, aname, lnsize, lname)
                                    break;
                            }
                            else
+#endif
 #ifdef AN_TO_LN_RULES
                            if (!strcmp(typep, "RULE") && argp) {
                                kret = rule_an_to_ln(context,