From a521817e49820cb854d2b78e275996239ae0b749 Mon Sep 17 00:00:00 2001 From: Manoj Ampalam Date: Fri, 30 Sep 2016 13:22:01 -0700 Subject: [PATCH] Fix - attach PTY only when requested --- session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/session.c b/session.c index cf96680..8bfb1f3 100644 --- a/session.c +++ b/session.c @@ -813,7 +813,7 @@ do_exec_no_pty(Session *s, const char *command) exit(1); } - else { + else if (s->ttyfd != -1) { /*attach to shell console */ FreeConsole(); if (!debug_flag) ImpersonateLoggedOnUser(hToken);