summaryrefslogtreecommitdiff
path: root/session.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-06-09 01:34:15 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-06-09 01:34:15 +0000
commitcb3929d1d9ef6ca0059c39a9659668dd7c52ca6e (patch)
treea067169f9561099928d1f0cdc68d66f7d4298bea /session.c
parentdf4981bc316d6f9fc9aab8c6198d2396890ba255 (diff)
- markus@cvs.openbsd.org 2001/06/05 16:46:19
[session.c] let session_close() delete the pty. deny x11fwd if xauthfile is set.
Diffstat (limited to 'session.c')
-rw-r--r--session.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/session.c b/session.c
index cedd8ad6f..a29546d2f 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.81 2001/06/04 23:16:16 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.82 2001/06/05 16:46:19 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -124,6 +124,7 @@ void session_set_fds(Session *s, int fdin, int fdout, int fderr);
124void session_pty_cleanup(Session *s); 124void session_pty_cleanup(Session *s);
125void session_proctitle(Session *s); 125void session_proctitle(Session *s);
126int session_setup_x11fwd(Session *s); 126int session_setup_x11fwd(Session *s);
127void session_close(Session *s);
127void do_exec_pty(Session *s, const char *command); 128void do_exec_pty(Session *s, const char *command);
128void do_exec_no_pty(Session *s, const char *command); 129void do_exec_no_pty(Session *s, const char *command);
129void do_login(Session *s, const char *command); 130void do_login(Session *s, const char *command);
@@ -413,9 +414,9 @@ do_authenticated1(Authctxt *authctxt)
413 do_exec_pty(s, command); 414 do_exec_pty(s, command);
414 else 415 else
415 do_exec_no_pty(s, command); 416 do_exec_no_pty(s, command);
416
417 if (command != NULL) 417 if (command != NULL)
418 xfree(command); 418 xfree(command);
419 session_close(s);
419 return; 420 return;
420 421
421 default: 422 default:
@@ -658,7 +659,6 @@ do_exec_pty(Session *s, const char *command)
658 } else { 659 } else {
659 server_loop(pid, ptyfd, fdout, -1); 660 server_loop(pid, ptyfd, fdout, -1);
660 /* server_loop _has_ closed ptyfd and fdout. */ 661 /* server_loop _has_ closed ptyfd and fdout. */
661 session_pty_cleanup(s);
662 } 662 }
663} 663}
664 664
@@ -2047,7 +2047,7 @@ session_setup_x11fwd(Session *s)
2047 packet_send_debug("No xauth program; cannot forward with spoofing."); 2047 packet_send_debug("No xauth program; cannot forward with spoofing.");
2048 return 0; 2048 return 0;
2049 } 2049 }
2050 if (s->display != NULL) { 2050 if (s->display != NULL || xauthfile != NULL) {
2051 debug("X11 display already set."); 2051 debug("X11 display already set.");
2052 return 0; 2052 return 0;
2053 } 2053 }
@@ -2079,6 +2079,5 @@ session_setup_x11fwd(Session *s)
2079void 2079void
2080do_authenticated2(Authctxt *authctxt) 2080do_authenticated2(Authctxt *authctxt)
2081{ 2081{
2082
2083 server_loop2(); 2082 server_loop2();
2084} 2083}