- markus@cvs.openbsd.org 2001/06/19 15:40:45
[session.c] allocate and free at the same level.
This commit is contained in:
parent
699776e9ec
commit
0a7ca6c7ba
|
@ -18,6 +18,9 @@
|
||||||
- markus@cvs.openbsd.org 2001/06/19 14:09:45
|
- markus@cvs.openbsd.org 2001/06/19 14:09:45
|
||||||
[session.c sshd.8]
|
[session.c sshd.8]
|
||||||
disable x11-fwd if use_login is enabled; from lukem@wasabisystems.com
|
disable x11-fwd if use_login is enabled; from lukem@wasabisystems.com
|
||||||
|
- markus@cvs.openbsd.org 2001/06/19 15:40:45
|
||||||
|
[session.c]
|
||||||
|
allocate and free at the same level.
|
||||||
|
|
||||||
20010615
|
20010615
|
||||||
- (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL
|
- (stevesk) don't set SA_RESTART and set SIGCHLD to SIG_DFL
|
||||||
|
@ -5670,4 +5673,4 @@
|
||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1294 2001/06/21 03:14:49 mouring Exp $
|
$Id: ChangeLog,v 1.1295 2001/06/21 03:17:42 mouring Exp $
|
||||||
|
|
21
session.c
21
session.c
|
@ -33,7 +33,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
RCSID("$OpenBSD: session.c,v 1.91 2001/06/19 14:09:45 markus Exp $");
|
RCSID("$OpenBSD: session.c,v 1.92 2001/06/19 15:40:45 markus Exp $");
|
||||||
|
|
||||||
#include "ssh.h"
|
#include "ssh.h"
|
||||||
#include "ssh1.h"
|
#include "ssh1.h"
|
||||||
|
@ -150,7 +150,7 @@ extern int startup_pipe;
|
||||||
extern void destroy_sensitive_data(void);
|
extern void destroy_sensitive_data(void);
|
||||||
|
|
||||||
/* original command from peer. */
|
/* original command from peer. */
|
||||||
char *original_command = NULL;
|
const char *original_command = NULL;
|
||||||
|
|
||||||
/* data */
|
/* data */
|
||||||
#define MAX_SESSIONS 10
|
#define MAX_SESSIONS 10
|
||||||
|
@ -309,12 +309,12 @@ do_authenticated1(Authctxt *authctxt)
|
||||||
if (type == SSH_CMSG_EXEC_CMD) {
|
if (type == SSH_CMSG_EXEC_CMD) {
|
||||||
command = packet_get_string(&dlen);
|
command = packet_get_string(&dlen);
|
||||||
debug("Exec command '%.500s'", command);
|
debug("Exec command '%.500s'", command);
|
||||||
packet_integrity_check(plen, 4 + dlen, type);
|
|
||||||
} else {
|
|
||||||
command = NULL;
|
|
||||||
packet_integrity_check(plen, 0, type);
|
|
||||||
}
|
|
||||||
do_exec(s, command);
|
do_exec(s, command);
|
||||||
|
xfree(command);
|
||||||
|
} else {
|
||||||
|
do_exec(s, NULL);
|
||||||
|
}
|
||||||
|
packet_done();
|
||||||
session_close(s);
|
session_close(s);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -608,13 +608,7 @@ do_exec(Session *s, const char *command)
|
||||||
else
|
else
|
||||||
do_exec_no_pty(s, command);
|
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);
|
char *command = packet_get_string(&len);
|
||||||
packet_done();
|
packet_done();
|
||||||
do_exec(s, command);
|
do_exec(s, command);
|
||||||
|
xfree(command);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue