# HG changeset patch # User Matt Johnston # Date 1225891823 0 # Node ID d4bbc003900845abbe98b5ebb39c0422d96f45b2 # Parent ada77f43c79ace50c6492460d421fb5314bbf19d - Set a default path, since bash won't export one otherwise (though it will set one, leading to mysterious problems) - Rearrange some options diff -r ada77f43c79a -r d4bbc0039008 options.h --- a/options.h Wed Nov 05 13:14:38 2008 +0000 +++ b/options.h Wed Nov 05 13:30:23 2008 +0000 @@ -60,20 +60,24 @@ #define ENABLE_CLI_LOCALTCPFWD #define ENABLE_CLI_REMOTETCPFWD -/* Allow using -J to run the connection through a - pipe to a program, rather the normal TCP connection */ -#define ENABLE_CLI_PROXYCMD - #define ENABLE_SVR_LOCALTCPFWD #define ENABLE_SVR_REMOTETCPFWD /* Enable Authentication Agent Forwarding - server only for now */ #define ENABLE_AGENTFWD -/* Enable "Netcat mode". TODO describe here. */ + +/* Note: Both ENABLE_CLI_PROXYCMD and ENABLE_CLI_NETCAT must be set to + * allow multihop dbclient connections */ + +/* Allow using -J to run the connection through a + pipe to a program, rather the normal TCP connection */ +#define ENABLE_CLI_PROXYCMD + +/* Enable "Netcat mode" option. This will forward standard input/output + * to a remote TCP-forwarded connection */ #define ENABLE_CLI_NETCAT - /* Encryption - at least one required. * Protocol RFC requires 3DES and recommends AES128 for interoperability. * Including multiple keysize variants the same cipher @@ -254,6 +258,9 @@ be overridden at runtime with -K. 0 disables keepalives */ #define DEFAULT_KEEPALIVE 0 +/* The default path. This will often get replaced by the shell */ +#define DEFAULT_PATH "/bin:/usr/bin" + /* Some other defines (that mostly should be left alone) are defined * in sysoptions.h */ #include "sysoptions.h" diff -r ada77f43c79a -r d4bbc0039008 svr-chansession.c --- a/svr-chansession.c Wed Nov 05 13:14:38 2008 +0000 +++ b/svr-chansession.c Wed Nov 05 13:30:23 2008 +0000 @@ -878,6 +878,7 @@ addnewvar("LOGNAME", ses.authstate.pw_name); addnewvar("HOME", ses.authstate.pw_dir); addnewvar("SHELL", get_user_shell()); + addnewvar("PATH", DEFAULT_PATH); if (chansess->term != NULL) { addnewvar("TERM", chansess->term); }