From dbe3ab1e10187882bbc7a92f76a114e525229d95 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 5 Aug 1996 18:17:23 +0000 Subject: [PATCH] * Enough removal of db from aname_to_localname so that Linux compiles; 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 | 8 ++++++++ src/lib/krb5/os/Makefile.in | 18 +++++++++--------- src/lib/krb5/os/an_to_ln.c | 7 ++++++- 3 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/lib/krb5/os/ChangeLog b/src/lib/krb5/os/ChangeLog index 2b42f387e..5d0ab54b9 100644 --- a/src/lib/krb5/os/ChangeLog +++ b/src/lib/krb5/os/ChangeLog @@ -1,3 +1,11 @@ +Tue Jul 30 19:15:55 1996 Sam Hartman + + * 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 * an_to_ln.c (aname_do_match): #elif HAVE_REGEXP_H should have diff --git a/src/lib/krb5/os/Makefile.in b/src/lib/krb5/os/Makefile.in index 8c49fbe40..72c7e0402 100644 --- a/src/lib/krb5/os/Makefile.in +++ b/src/lib/krb5/os/Makefile.in @@ -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 ; \ diff --git a/src/lib/krb5/os/an_to_ln.c b/src/lib/krb5/os/an_to_ln.c index f362cdc63..e69be0b48 100644 --- a/src/lib/krb5/os/an_to_ln.c +++ b/src/lib/krb5/os/an_to_ln.c @@ -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, -- 2.26.2