summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
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 096d1a71b..f4710e833 100644
--- a/readconf.c
+++ b/readconf.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: readconf.c,v 1.129 2004/04/18 23:10:26 djm Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.130 2004/04/27 09:46:36 djm Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -106,6 +106,7 @@ typedef enum {
106 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, 106 oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout,
107 oAddressFamily, oGssAuthentication, oGssDelegateCreds, 107 oAddressFamily, oGssAuthentication, oGssDelegateCreds,
108 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, 108 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
109 oSendEnv,
109 oDeprecated, oUnsupported 110 oDeprecated, oUnsupported
110} OpCodes; 111} OpCodes;
111 112
@@ -193,6 +194,7 @@ static struct {
193 { "addressfamily", oAddressFamily }, 194 { "addressfamily", oAddressFamily },
194 { "serveraliveinterval", oServerAliveInterval }, 195 { "serveraliveinterval", oServerAliveInterval },
195 { "serveralivecountmax", oServerAliveCountMax }, 196 { "serveralivecountmax", oServerAliveCountMax },
197 { "sendenv", oSendEnv },
196 { NULL, oBadOption } 198 { NULL, oBadOption }
197}; 199};
198 200
@@ -749,6 +751,19 @@ parse_int:
749 intptr = &options->server_alive_count_max; 751 intptr = &options->server_alive_count_max;
750 goto parse_int; 752 goto parse_int;
751 753
754 case oSendEnv:
755 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
756 if (strchr(arg, '=') != NULL)
757 fatal("%s line %d: Invalid environment name.",
758 filename, linenum);
759 if (options->num_send_env >= MAX_SEND_ENV)
760 fatal("%s line %d: too many send env.",
761 filename, linenum);
762 options->send_env[options->num_send_env++] =
763 xstrdup(arg);
764 }
765 break;
766
752 case oDeprecated: 767 case oDeprecated:
753 debug("%s line %d: Deprecated option \"%s\"", 768 debug("%s line %d: Deprecated option \"%s\"",
754 filename, linenum, keyword); 769 filename, linenum, keyword);
@@ -894,6 +909,7 @@ initialize_options(Options * options)
894 options->verify_host_key_dns = -1; 909 options->verify_host_key_dns = -1;
895 options->server_alive_interval = -1; 910 options->server_alive_interval = -1;
896 options->server_alive_count_max = -1; 911 options->server_alive_count_max = -1;
912 options->num_send_env = 0;
897} 913}
898 914
899/* 915/*