]> andersk Git - openssh.git/blobdiff - session.c
- markus@cvs.openbsd.org 2001/06/19 15:40:45
[openssh.git] / session.c
index 005f7ab17f6f6d87a7f19fde594f4c1e3face9f9..fbdc419eb5d73d4d6e67487e8d275c8ee3c58cc1 100644 (file)
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: session.c,v 1.90 2001/06/19 12:34:09 markus Exp $");
+RCSID("$OpenBSD: session.c,v 1.92 2001/06/19 15:40:45 markus Exp $");
 
 #include "ssh.h"
 #include "ssh1.h"
@@ -150,7 +150,7 @@ extern int startup_pipe;
 extern void destroy_sensitive_data(void);
 
 /* original command from peer. */
-char *original_command = NULL;
+const char *original_command = NULL;
 
 /* data */
 #define MAX_SESSIONS 10
@@ -309,12 +309,12 @@ do_authenticated1(Authctxt *authctxt)
                        if (type == SSH_CMSG_EXEC_CMD) {
                                command = packet_get_string(&dlen);
                                debug("Exec command '%.500s'", command);
-                               packet_integrity_check(plen, 4 + dlen, type);
+                               do_exec(s, command);
+                               xfree(command);
                        } else {
-                               command = NULL;
-                               packet_integrity_check(plen, 0, type);
+                               do_exec(s, NULL);
                        }
-                       do_exec(s, command);
+                       packet_done();
                        session_close(s);
                        return;
 
@@ -608,13 +608,7 @@ do_exec(Session *s, const char *command)
        else
                do_exec_no_pty(s, command);
 
-       if (command != NULL)
-               xfree(command);
-
-       if (original_command != NULL) {
-               xfree(original_command);
-               original_command = NULL;
-       }
+       original_command = NULL;
 }
 
 
@@ -1698,6 +1692,7 @@ session_exec_req(Session *s)
        char *command = packet_get_string(&len);
        packet_done();
        do_exec(s, command);
+       xfree(command);
        return 1;
 }
 
@@ -1980,6 +1975,11 @@ session_setup_x11fwd(Session *s)
                packet_send_debug("No xauth program; cannot forward with spoofing.");
                return 0;
        }
+       if (options.use_login) {
+               packet_send_debug("X11 forwarding disabled; "
+                   "not compatible with UseLogin=yes.");
+               return 0;
+       }
        if (s->display != NULL) {
                debug("X11 display already set.");
                return 0;
This page took 0.041505 seconds and 4 git commands to generate.