diff options
author | Matt Johnston <matt@ucc.asn.au> | 2008-11-05 13:30:23 +0000 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2008-11-05 13:30:23 +0000 |
commit | 51dcfc06dc1157e81d732fccb32d311f09aad191 (patch) | |
tree | bafd3c7ff29e46c72838cc31b1d09ec5057752d8 | |
parent | 8edc0c2afc3da182f46cdd0cae29e03089a18eb6 (diff) |
- Set a default path, since bash won't export one otherwise (though it will set
one, leading to mysterious problems)
- Rearrange some options
--HG--
extra : convert_revision : 6e81becf6e96479e10d9244186a900fab7079bf8
-rw-r--r-- | options.h | 19 | ||||
-rw-r--r-- | svr-chansession.c | 1 |
2 files changed, 14 insertions, 6 deletions
@@ -60,19 +60,23 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */ #define ENABLE_CLI_LOCALTCPFWD #define ENABLE_CLI_REMOTETCPFWD -/* Allow using -J <proxycommand> 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. */ -#define ENABLE_CLI_NETCAT +/* Note: Both ENABLE_CLI_PROXYCMD and ENABLE_CLI_NETCAT must be set to + * allow multihop dbclient connections */ + +/* Allow using -J <proxycommand> 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. @@ -254,6 +258,9 @@ etc) slower (perhaps by 50%). Recommended for most small systems. */ 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 --git a/svr-chansession.c b/svr-chansession.c index e7a2106..23dad8c 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -878,6 +878,7 @@ static void execchild(void *user_data) { 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); } |