summaryrefslogtreecommitdiffhomepage
path: root/svr-chansession.c
diff options
context:
space:
mode:
authorMatt Johnston <matt@ucc.asn.au>2020-03-14 23:28:18 +0800
committerMatt Johnston <matt@ucc.asn.au>2020-03-14 23:28:18 +0800
commite35d0784a83ecb936c27599257d9e42b3dedd411 (patch)
treee4dc12a453d87a349216515703ce632166b16cdd /svr-chansession.c
parentcc6fa57a410a786804cee69c97e633f45304c88b (diff)
Set SSH_ORIGINAL_COMMAND for "dropbear -c" too, fix build without
DROPBEAR_SVR_PUBKEY_OPTIONS
Diffstat (limited to 'svr-chansession.c')
-rw-r--r--svr-chansession.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/svr-chansession.c b/svr-chansession.c
index 5a5a8c8..fff9dbc 100644
--- a/svr-chansession.c
+++ b/svr-chansession.c
@@ -322,10 +322,7 @@ static void cleanupchansess(const struct Channel *channel) {
m_free(chansess->cmd);
m_free(chansess->term);
-
-#if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
m_free(chansess->original_command);
-#endif
if (chansess->tty) {
/* write the utmp/wtmp login record */
@@ -833,7 +830,7 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) {
(dup2(chansess->slave, STDOUT_FILENO) < 0)) {
TRACE(("leave ptycommand: error redirecting filedesc"))
return DROPBEAR_FAILURE;
- }
+ }
close(chansess->slave);
@@ -997,11 +994,9 @@ static void execchild(const void *user_data) {
addnewvar("SSH_CLIENT", chansess->client_string);
}
-#if DROPBEAR_SVR_PUBKEY_OPTIONS_BUILT
if (chansess->original_command) {
addnewvar("SSH_ORIGINAL_COMMAND", chansess->original_command);
}
-#endif
/* change directory */
if (chdir(ses.authstate.pw_dir) < 0) {