diff options
author | Damien Miller <djm@mindrot.org> | 2005-06-16 13:19:41 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2005-06-16 13:19:41 +1000 |
commit | d14b1e731cf4cb79c3ff5ced9315cc11f1fceced (patch) | |
tree | 9ae43dce762d8452154b48d4a5b792ecd2db487e /readconf.c | |
parent | ac7ef6a7360f7b1e417790d288f42f474c4ceb55 (diff) |
- djm@cvs.openbsd.org 2005/06/08 11:25:09
[clientloop.c readconf.c readconf.h ssh.c ssh_config.5]
add ControlMaster=auto/autoask options to support opportunistic
multiplexing; tested avsm@ and jakob@, ok markus@
Diffstat (limited to 'readconf.c')
-rw-r--r-- | readconf.c | 24 |
1 files changed, 22 insertions, 2 deletions
@@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: readconf.c,v 1.140 2005/05/16 15:30:51 markus Exp $"); +RCSID("$OpenBSD: readconf.c,v 1.141 2005/06/08 11:25:09 djm Exp $"); #include "ssh.h" #include "xmalloc.h" @@ -796,7 +796,27 @@ parse_int: case oControlMaster: intptr = &options->control_master; - goto parse_yesnoask; + arg = strdelim(&s); + if (!arg || *arg == '\0') + fatal("%.200s line %d: Missing ControlMaster argument.", + filename, linenum); + value = 0; /* To avoid compiler warning... */ + if (strcmp(arg, "yes") == 0 || strcmp(arg, "true") == 0) + value = SSHCTL_MASTER_YES; + else if (strcmp(arg, "no") == 0 || strcmp(arg, "false") == 0) + value = SSHCTL_MASTER_NO; + else if (strcmp(arg, "auto") == 0) + value = SSHCTL_MASTER_AUTO; + else if (strcmp(arg, "ask") == 0) + value = SSHCTL_MASTER_ASK; + else if (strcmp(arg, "autoask") == 0) + value = SSHCTL_MASTER_AUTO_ASK; + else + fatal("%.200s line %d: Bad ControlMaster argument.", + filename, linenum); + if (*activep && *intptr == -1) + *intptr = value; + break; case oHashKnownHosts: intptr = &options->hash_known_hosts; |