=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -r1.101 -r1.102 --- src/usr.bin/ssh/session.c 2001/09/14 18:59:11 1.101 +++ src/usr.bin/ssh/session.c 2001/09/16 14:46:54 1.102 @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.101 2001/09/14 18:59:11 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.102 2001/09/16 14:46:54 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -851,18 +851,6 @@ shell = login_getcapstr(lc, "shell", (char *)shell, (char *)shell); #endif -#ifdef AFS - /* Try to get AFS tokens for the local cell. */ - if (k_hasafs()) { - char cell[64]; - - if (k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0) - krb_afslog(cell, 0); - - krb_afslog(0, 0); - } -#endif /* AFS */ - /* Initialize the environment. */ envsize = 100; env = xmalloc(envsize * sizeof(char *)); @@ -998,6 +986,18 @@ * xauth are run in the proper environment. */ environ = env; + +#ifdef AFS + /* Try to get AFS tokens for the local cell. */ + if (k_hasafs()) { + char cell[64]; + + if (k_afs_cell_of_file(pw->pw_dir, cell, sizeof(cell)) == 0) + krb_afslog(cell, 0); + + krb_afslog(0, 0); + } +#endif /* AFS */ /* * Run $HOME/.ssh/rc, /etc/sshrc, or xauth (whichever is found first