From: Ezra Peisach Date: Mon, 3 Mar 1997 20:16:55 +0000 (+0000) Subject: * kconfig.c (main): Move krb5_init_context earlier in order to X-Git-Tag: krb5-1.1-beta1~1198 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=f7e37a7c50262e27ca8d1b439f62550f4e68e808;p=krb5.git * kconfig.c (main): Move krb5_init_context earlier in order to initialize kcontext before use. This allows for more graceful handling of scenario where krb5.ini is missing - we now get an error box. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9997 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/mac/kconfig/ChangeLog b/src/mac/kconfig/ChangeLog index 522ec54ea..b1d91c4f0 100644 --- a/src/mac/kconfig/ChangeLog +++ b/src/mac/kconfig/ChangeLog @@ -1,3 +1,8 @@ +Mon Mar 3 15:14:34 1997 Ezra Peisach + + * kconfig.c (main): Move krb5_init_context earlier in order to + initialize kcontext before use. + Fri Dec 20 12:01:10 1996 Marshall Vale * kconfig.c: Adjusted time-bomb date to June 1, 1997 diff --git a/src/mac/kconfig/kconfig.c b/src/mac/kconfig/kconfig.c index 0697ec59d..1b633dba1 100644 --- a/src/mac/kconfig/kconfig.c +++ b/src/mac/kconfig/kconfig.c @@ -207,6 +207,10 @@ int main (void) DateTimeRec goalTimeBomb; long currentTime, goalTimeBombInSecs; #endif +#ifdef KRB5 + krb5_error_code code; +#endif + /* * Setup @@ -243,6 +247,15 @@ int main (void) #ifdef KRB4 init_cornell_des(); #endif +#ifdef KRB5 + code = krb5_init_context(&kcontext); + if (code) + { + doalert("Kerberos configuration file not present"); + getout(0); + } +#endif + #ifdef KRB5 k5_init_ccache (&k5_ccache); /*strcpy(gUserName, kUNKNOWNUSERNAME);*/ @@ -302,14 +315,6 @@ int main (void) } #endif -#ifdef KRB5 - krb5_init_context(&kcontext); - if (kcontext->profile == 0) - { - doalert("Kerberos configuration file not present"); - getout(0); - } -#endif /* * build the main window