Skip to content

Commit

Permalink
Unset stale SSH_TTY (mobile-shell#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
msva committed Jun 17, 2024
1 parent e5eb290 commit 39175c6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/frontend/mosh-server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,12 @@ static int run_server( const char* desired_ip,
exit( 1 );
}

/* clear stale SSH_TTY environment variable */
if ( unsetenv( "SSH_TTY" ) < 0 ) {
perror( "unsetenv" );
exit( 1 );
}
chdir_homedir();

if ( with_motd && ( !motd_hushed() ) ) {
Expand Down

0 comments on commit 39175c6

Please sign in to comment.