if (!pw)
return 0;
- /* deny if shell does not exists or is not executable */
/*
* Get the shell from the password data. An empty shell field is
* legal, and means /bin/sh.
/* nonblocking IO */
set_nonblock(fdin);
set_nonblock(fdout);
- set_nonblock(fderr);
+ /* we don't have stderr for interactive terminal sessions, see below */
+ if (fderr != -1)
+ set_nonblock(fderr);
connection_in = packet_get_connection_in();
connection_out = packet_get_connection_out();
buffer_init(&command);
OpenSSL_add_all_algorithms();
-
+
/*
* Save the command to execute on the remote host in a buffer. There
* is no limit on the length of the command, except by the maximum