*/
#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"
extern void destroy_sensitive_data(void);
/* original command from peer. */
-char *original_command = NULL;
+const char *original_command = NULL;
/* data */
#define MAX_SESSIONS 10
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;
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;
}
char *command = packet_get_string(&len);
packet_done();
do_exec(s, command);
+ xfree(command);
return 1;
}
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;