=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/ssh/session.c,v retrieving revision 1.78 retrieving revision 1.79 diff -u -r1.78 -r1.79 --- src/usr.bin/ssh/session.c 2001/05/31 10:30:16 1.78 +++ src/usr.bin/ssh/session.c 2001/06/03 14:55:39 1.79 @@ -33,7 +33,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: session.c,v 1.78 2001/05/31 10:30:16 markus Exp $"); +RCSID("$OpenBSD: session.c,v 1.79 2001/06/03 14:55:39 markus Exp $"); #include "ssh.h" #include "ssh1.h" @@ -94,6 +94,7 @@ void do_child(Session *s, const char *command); void do_motd(void); int check_quietlogin(Session *s, const char *command); +void xauthfile_cleanup_proc(void *ignore); void do_authenticated1(Authctxt *authctxt); void do_authenticated2(Authctxt *authctxt); @@ -153,6 +154,12 @@ do_authenticated2(authctxt); else do_authenticated1(authctxt); + + /* remote user's local Xauthority file and agent socket */ + if (xauthfile) + xauthfile_cleanup_proc(NULL); + if (auth_get_socket_name()) + auth_sock_cleanup_proc(NULL); } /* @@ -403,9 +410,6 @@ if (command != NULL) xfree(command); - /* Cleanup user's local Xauthority file. */ - if (xauthfile) - xauthfile_cleanup_proc(NULL); return; default: @@ -1723,6 +1727,4 @@ { server_loop2(); - if (xauthfile) - xauthfile_cleanup_proc(NULL); }