summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/readconf.c b/readconf.c
index 1d61145c4..73f6eb361 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.166 2008/06/11 21:01:35 grunk Exp $ */ 1/* $OpenBSD: readconf.c,v 1.167 2008/06/26 11:46:31 grunk Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -130,6 +130,7 @@ typedef enum {
130 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, 130 oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly,
131 oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, 131 oSendEnv, oControlPath, oControlMaster, oHashKnownHosts,
132 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 132 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
133 oVisualHostKey,
133 oDeprecated, oUnsupported 134 oDeprecated, oUnsupported
134} OpCodes; 135} OpCodes;
135 136
@@ -226,6 +227,7 @@ static struct {
226 { "tunneldevice", oTunnelDevice }, 227 { "tunneldevice", oTunnelDevice },
227 { "localcommand", oLocalCommand }, 228 { "localcommand", oLocalCommand },
228 { "permitlocalcommand", oPermitLocalCommand }, 229 { "permitlocalcommand", oPermitLocalCommand },
230 { "visualhostkey", oVisualHostKey },
229 { NULL, oBadOption } 231 { NULL, oBadOption }
230}; 232};
231 233
@@ -452,23 +454,7 @@ parse_flag:
452 454
453 case oCheckHostIP: 455 case oCheckHostIP:
454 intptr = &options->check_host_ip; 456 intptr = &options->check_host_ip;
455 arg = strdelim(&s); 457 goto parse_flag;
456 if (!arg || *arg == '\0')
457 fatal("%.200s line %d: Missing CheckHostIP argument.",
458 filename, linenum);
459 value = 0; /* To avoid compiler warning... */
460 if (strcmp(arg, "yes") == 0 || strcmp(arg, "true") == 0)
461 value = SSHCTL_CHECKHOSTIP_YES;
462 else if (strcmp(arg, "no") == 0 || strcmp(arg, "false") == 0)
463 value = SSHCTL_CHECKHOSTIP_NO;
464 else if (strcmp(arg, "fingerprint") == 0)
465 value = SSHCTL_CHECKHOSTIP_FPR;
466 else
467 fatal("%.200s line %d: Bad CheckHostIP argument.",
468 filename, linenum);
469 if (*activep && *intptr == -1)
470 *intptr = value;
471 break;
472 458
473 case oVerifyHostKeyDNS: 459 case oVerifyHostKeyDNS:
474 intptr = &options->verify_host_key_dns; 460 intptr = &options->verify_host_key_dns;
@@ -931,6 +917,10 @@ parse_int:
931 intptr = &options->permit_local_command; 917 intptr = &options->permit_local_command;
932 goto parse_flag; 918 goto parse_flag;
933 919
920 case oVisualHostKey:
921 intptr = &options->visual_host_key;
922 goto parse_flag;
923
934 case oDeprecated: 924 case oDeprecated:
935 debug("%s line %d: Deprecated option \"%s\"", 925 debug("%s line %d: Deprecated option \"%s\"",
936 filename, linenum, keyword); 926 filename, linenum, keyword);
@@ -1081,6 +1071,7 @@ initialize_options(Options * options)
1081 options->tun_remote = -1; 1071 options->tun_remote = -1;
1082 options->local_command = NULL; 1072 options->local_command = NULL;
1083 options->permit_local_command = -1; 1073 options->permit_local_command = -1;
1074 options->visual_host_key = -1;
1084} 1075}
1085 1076
1086/* 1077/*
@@ -1215,6 +1206,8 @@ fill_default_options(Options * options)
1215 options->tun_remote = SSH_TUNID_ANY; 1206 options->tun_remote = SSH_TUNID_ANY;
1216 if (options->permit_local_command == -1) 1207 if (options->permit_local_command == -1)
1217 options->permit_local_command = 0; 1208 options->permit_local_command = 0;
1209 if (options->visual_host_key == -1)
1210 options->visual_host_key = 0;
1218 /* options->local_command should not be set by default */ 1211 /* options->local_command should not be set by default */
1219 /* options->proxy_command should not be set by default */ 1212 /* options->proxy_command should not be set by default */
1220 /* options->user will be set in the main program if appropriate */ 1213 /* options->user will be set in the main program if appropriate */