diff options
author | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-09 01:11:59 +0000 |
---|---|---|
committer | Ben Lindstrom <mouring@eviladmin.org> | 2001-06-09 01:11:59 +0000 |
commit | 838394ca26ff175e7f2d1729112f3f2605de4096 (patch) | |
tree | 5bd1822927d6a6af8ad46d27eccac8c103b12e70 /session.c | |
parent | c4b7225b8ddbc4932d5d4a63183b911a9f2a1d73 (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.c | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -33,7 +33,7 @@ | |||
33 | */ | 33 | */ |
34 | 34 | ||
35 | #include "includes.h" | 35 | #include "includes.h" |
36 | RCSID("$OpenBSD: session.c,v 1.78 2001/05/31 10:30:16 markus Exp $"); | 36 | RCSID("$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); | |||
132 | void do_child(Session *s, const char *command); | 132 | void do_child(Session *s, const char *command); |
133 | void do_motd(void); | 133 | void do_motd(void); |
134 | int check_quietlogin(Session *s, const char *command); | 134 | int check_quietlogin(Session *s, const char *command); |
135 | void xauthfile_cleanup_proc(void *ignore); | ||
135 | 136 | ||
136 | void do_authenticated1(Authctxt *authctxt); | 137 | void do_authenticated1(Authctxt *authctxt); |
137 | void do_authenticated2(Authctxt *authctxt); | 138 | void 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 | } |