summaryrefslogtreecommitdiffstats
path: root/readconf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-05-02 22:11:30 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-05-02 22:11:30 +1000
commit46bc075474211c711b102f6278783bb68d7530a8 (patch)
tree5f099d7bdc006926bf393dfc51f7545d0787b33e /readconf.c
parent47abce45b20ba52c0eb7f19240851f45bc1babc2 (diff)
- djm@cvs.openbsd.org 2004/04/27 09:46:37
[readconf.c readconf.h servconf.c servconf.h session.c session.h ssh.c ssh_config.5 sshd_config.5] bz #815: implement ability to pass specified environment variables from the client to the server; ok markus@
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/readconf.c b/readconf.c
index 096d1a71..f4710e83 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
*/
#include "includes.h"
-RCSID("$OpenBSD: readconf.c,v 1.129 2004/04/18 23:10:26 djm Exp $");
+RCSID("$OpenBSD: readconf.c,v 1.130 2004/04/27 09:46:36 djm Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -106,6 +106,7 @@ typedef enum {
oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
oAddressFamily, oGssAuthentication, oGssDelegateCreds,
oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
+ oSendEnv,
oDeprecated, oUnsupported
} OpCodes;
@@ -193,6 +194,7 @@ static struct {
{ "addressfamily", oAddressFamily },
{ "serveraliveinterval", oServerAliveInterval },
{ "serveralivecountmax", oServerAliveCountMax },
+ { "sendenv", oSendEnv },
{ NULL, oBadOption }
};
@@ -749,6 +751,19 @@ parse_int:
intptr = &options->server_alive_count_max;
goto parse_int;
+ case oSendEnv:
+ while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
+ if (strchr(arg, '=') != NULL)
+ fatal("%s line %d: Invalid environment name.",
+ filename, linenum);
+ if (options->num_send_env >= MAX_SEND_ENV)
+ fatal("%s line %d: too many send env.",
+ filename, linenum);
+ options->send_env[options->num_send_env++] =
+ xstrdup(arg);
+ }
+ break;
+
case oDeprecated:
debug("%s line %d: Deprecated option \"%s\"",
filename, linenum, keyword);
@@ -894,6 +909,7 @@ initialize_options(Options * options)
options->verify_host_key_dns = -1;
options->server_alive_interval = -1;
options->server_alive_count_max = -1;
+ options->num_send_env = 0;
}
/*