changeset 567:893a9dd0b9dd

- set $SSH_TTY environment variable - remove extraneous (crash causing) printf()
author Matt Johnston <matt@ucc.asn.au>
date Mon, 31 Aug 2009 15:25:39 +0000
parents b321aeb57c64
children 005530560594
files svr-chansession.c
diffstat 1 files changed, 4 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/svr-chansession.c	Wed Aug 26 14:09:22 2009 +0000
+++ b/svr-chansession.c	Mon Aug 31 15:25:39 2009 +0000
@@ -742,8 +742,6 @@
 		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 @@
 		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) {