Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

If a platform allows hyphens before usernames, we need a -- passed to…

… /bin/login. (@EdSchouten in #219)
  • Loading branch information...
commit b26e5b200155625e5ee215eff9aa6722d18e96c1 1 parent 46b7052
@saurik authored
Showing with 4 additions and 3 deletions.
  1. +4 −3 src/frontend/mosh-server.cc
View
7 src/frontend/mosh-server.cc
@@ -303,7 +303,7 @@ int run_server( const char *desired_ip, const char *desired_port,
}
/* Get shell */
- char *my_argv[ 6 ];
+ char *my_argv[ 7 ];
if ( !command ) {
const char *login = "/usr/bin/login";
if ( access( "/bin/login", X_OK ) == 0 ) {
@@ -334,8 +334,9 @@ int run_server( const char *desired_ip, const char *desired_port,
my_argv[ 1 ] = strdup( "-f" );
my_argv[ 2 ] = strdup( "-h" );
my_argv[ 3 ] = strdup( host );
- my_argv[ 4 ] = strdup( user );
- my_argv[ 5 ] = NULL;
+ my_argv[ 4 ] = strdup( "--" );
+ my_argv[ 5 ] = strdup( user );
+ my_argv[ 6 ] = NULL;
command = my_argv;
}
Please sign in to comment.
Something went wrong with that request. Please try again.