conditionalize the kafs calls on KRB4

git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@5997 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
Assar Westerlund
1999-04-19 13:19:02 +00:00
parent 1e5243f1d6
commit 64bc8cd775

View File

@@ -157,6 +157,8 @@ krb5_verify(struct passwd *pwd, const char *password)
return ret; return ret;
} }
#ifdef KRB4
static void static void
krb5_get_afs_tokens (struct passwd *pwd) krb5_get_afs_tokens (struct passwd *pwd)
{ {
@@ -198,6 +200,9 @@ krb5_get_afs_tokens (struct passwd *pwd)
krb5_cc_close (context, ccache); krb5_cc_close (context, ccache);
krb5_free_context (context); krb5_free_context (context);
} }
#endif /* KRB4 */
#endif /* KRB5 */ #endif /* KRB5 */
#ifdef KRB4 #ifdef KRB4
@@ -398,12 +403,12 @@ do_login(struct passwd *pwd)
pwd->pw_dir = "/"; pwd->pw_dir = "/";
fprintf(stderr, "Logging in with home = \"/\".\n"); fprintf(stderr, "Logging in with home = \"/\".\n");
} }
#ifdef KRB4
#ifdef KRB5 #ifdef KRB5
krb5_get_afs_tokens (pwd); krb5_get_afs_tokens (pwd);
#endif #endif
#ifdef KRB4
krb4_get_afs_tokens (pwd); krb4_get_afs_tokens (pwd);
#endif #endif /* KRB4 */
add_env("HOME", pwd->pw_dir); add_env("HOME", pwd->pw_dir);
add_env("USER", pwd->pw_name); add_env("USER", pwd->pw_name);