diff options
author | Matt Johnston <matt@ucc.asn.au> | 2009-08-31 15:25:39 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2009-08-31 15:25:39 +0000 |
commit | ccd02552ddf0fd0b7bfcc29d8c5eb38dd459c465 (patch) | |
tree | f9b215598ad6ff564b1dbeb17af756bc18a504f6 /svr-chansession.c | |
parent | 4b1f9e50f27d8bcd36479cb837fdb9711fc41951 (diff) |
- set $SSH_TTY environment variable
- remove extraneous (crash causing) printf()
--HG--
extra : convert_revision : cf4b256bf6785be384eca32f7b229b89e58539eb
Diffstat (limited to 'svr-chansession.c')
-rw-r--r-- | svr-chansession.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/svr-chansession.c b/svr-chansession.c index cb5acda..2664382 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -742,8 +742,6 @@ static int ptycommand(struct Channel *channel, struct ChanSess *chansess) { login_login(li); login_free_entry(li); - m_free(chansess->tty); - #ifdef DO_MOTD if (svr_opts.domotd) { /* don't show the motd if ~/.hushlogin exists */ @@ -884,9 +882,10 @@ static void execchild(void *user_data) { addnewvar("TERM", chansess->term); } - printf("adding option %p %s\n", ses.authstate.pubkey_options, - ses.authstate.pubkey_options->original_command); - + if (chansess->tty) { + addnewvar("SSH_TTY", chansess->tty); + } + #ifdef ENABLE_SVR_PUBKEY_OPTIONS if (ses.authstate.pubkey_options && ses.authstate.pubkey_options->original_command) { |