summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-09 01:11:59 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-09 01:11:59 +0000
commit838394ca26ff175e7f2d1729112f3f2605de4096 (patch)
tree5bd1822927d6a6af8ad46d27eccac8c103b12e70 /session.c
parentc4b7225b8ddbc4932d5d4a63183b911a9f2a1d73 (diff)
- markus@cvs.openbsd.org 2001/06/03 14:55:39
[channels.c channels.h session.c] use fatal_register_cleanup instead of atexit, sync with x11 authdir handling
Diffstat (limited to 'session.c')
-rw-r--r--session.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/session.c b/session.c
index 0625bf81f..ce9b2002b 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.78 2001/05/31 10:30:16 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.79 2001/06/03 14:55:39 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -132,6 +132,7 @@ void do_pre_login(Session *s);
132void do_child(Session *s, const char *command); 132void do_child(Session *s, const char *command);
133void do_motd(void); 133void do_motd(void);
134int check_quietlogin(Session *s, const char *command); 134int check_quietlogin(Session *s, const char *command);
135void xauthfile_cleanup_proc(void *ignore);
135 136
136void do_authenticated1(Authctxt *authctxt); 137void do_authenticated1(Authctxt *authctxt);
137void do_authenticated2(Authctxt *authctxt); 138void do_authenticated2(Authctxt *authctxt);
@@ -196,6 +197,12 @@ do_authenticated(Authctxt *authctxt)
196 do_authenticated2(authctxt); 197 do_authenticated2(authctxt);
197 else 198 else
198 do_authenticated1(authctxt); 199 do_authenticated1(authctxt);
200
201 /* remote user's local Xauthority file and agent socket */
202 if (xauthfile)
203 xauthfile_cleanup_proc(NULL);
204 if (auth_get_socket_name())
205 auth_sock_cleanup_proc(NULL);
199} 206}
200 207
201/* 208/*
@@ -446,9 +453,6 @@ do_authenticated1(Authctxt *authctxt)
446 453
447 if (command != NULL) 454 if (command != NULL)
448 xfree(command); 455 xfree(command);
449 /* Cleanup user's local Xauthority file. */
450 if (xauthfile)
451 xauthfile_cleanup_proc(NULL);
452 return; 456 return;
453 457
454 default: 458 default:
@@ -2105,6 +2109,4 @@ do_authenticated2(Authctxt *authctxt)
2105{ 2109{
2106 2110
2107 server_loop2(); 2111 server_loop2();
2108 if (xauthfile)
2109 xauthfile_cleanup_proc(NULL);
2110} 2112}