Skip to content

Commit 071b0d4

Browse files
committed
Env:SSH_ORIGINAL_COMMAND added when needed
#243
1 parent ff96264 commit 071b0d4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

session.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,9 @@ do_exec_no_pty(Session *s, const char *command)
758758

759759
SetEnvironmentVariable("SSH_CONNECTION", buf);
760760

761+
if (original_command)
762+
SetEnvironmentVariable("SSH_ORIGINAL_COMMAND", original_command);
763+
761764
// set better prompt for Windows cmd shell
762765
if (!s -> is_subsystem) {
763766
snprintf(buf,sizeof buf, "%s@%s $P$G", s->pw->pw_name, getenv("COMPUTERNAME"));

0 commit comments

Comments
 (0)