summaryrefslogtreecommitdiff
path: root/readconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'readconf.c')
-rw-r--r--readconf.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/readconf.c b/readconf.c
index d41220807..5ec89e2f0 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.140 2005/05/16 15:30:51 markus Exp $"); 15RCSID("$OpenBSD: readconf.c,v 1.141 2005/06/08 11:25:09 djm Exp $");
16 16
17#include "ssh.h" 17#include "ssh.h"
18#include "xmalloc.h" 18#include "xmalloc.h"
@@ -796,7 +796,27 @@ parse_int:
796 796
797 case oControlMaster: 797 case oControlMaster:
798 intptr = &options->control_master; 798 intptr = &options->control_master;
799 goto parse_yesnoask; 799 arg = strdelim(&s);
800 if (!arg || *arg == '\0')
801 fatal("%.200s line %d: Missing ControlMaster argument.",
802 filename, linenum);
803 value = 0; /* To avoid compiler warning... */
804 if (strcmp(arg, "yes") == 0 || strcmp(arg, "true") == 0)
805 value = SSHCTL_MASTER_YES;
806 else if (strcmp(arg, "no") == 0 || strcmp(arg, "false") == 0)
807 value = SSHCTL_MASTER_NO;
808 else if (strcmp(arg, "auto") == 0)
809 value = SSHCTL_MASTER_AUTO;
810 else if (strcmp(arg, "ask") == 0)
811 value = SSHCTL_MASTER_ASK;
812 else if (strcmp(arg, "autoask") == 0)
813 value = SSHCTL_MASTER_AUTO_ASK;
814 else
815 fatal("%.200s line %d: Bad ControlMaster argument.",
816 filename, linenum);
817 if (*activep && *intptr == -1)
818 *intptr = value;
819 break;
800 820
801 case oHashKnownHosts: 821 case oHashKnownHosts:
802 intptr = &options->hash_known_hosts; 822 intptr = &options->hash_known_hosts;