diff options
author | Matt Johnston <matt@ucc.asn.au> | 2012-02-21 23:00:30 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2012-02-21 23:00:30 +0800 |
commit | 6c4390c8486cf6927274133a771d6d3de75efd50 (patch) | |
tree | f71392e68428b50b91d3c94b86188c88bd83e417 /svr-chansession.c | |
parent | a3188b44f005c883c0136079e910aac095ca3460 (diff) | |
parent | aec23e5f791b78ed195358057f07f3050ab5bf94 (diff) |
- Merge
Diffstat (limited to 'svr-chansession.c')
-rw-r--r-- | svr-chansession.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index e6ad713..4d6d4fe 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -218,6 +218,8 @@ static int newchansess(struct Channel *channel) { struct ChanSess *chansess; + TRACE(("new chansess %p", channel)) + dropbear_assert(channel->typedata == NULL); chansess = (struct ChanSess*)m_malloc(sizeof(struct ChanSess)); @@ -280,6 +282,10 @@ static void closechansess(struct Channel *channel) { m_free(chansess->cmd); m_free(chansess->term); +#ifdef ENABLE_SVR_PUBKEY_OPTIONS + m_free(chansess->original_command); +#endif + if (chansess->tty) { /* write the utmp/wtmp login record */ li = chansess_login_alloc(chansess); @@ -925,10 +931,8 @@ static void execchild(void *user_data) { } #ifdef ENABLE_SVR_PUBKEY_OPTIONS - if (ses.authstate.pubkey_options && - ses.authstate.pubkey_options->original_command) { - addnewvar("SSH_ORIGINAL_COMMAND", - ses.authstate.pubkey_options->original_command); + if (chansess->original_command) { + addnewvar("SSH_ORIGINAL_COMMAND", chansess->original_command); } #endif |