summaryrefslogtreecommitdiff
path: root/usr/src/cmd/ssh/libssh/common/readconf.c
diff options
context:
space:
mode:
authorjp161948 <none@none>2007-04-02 05:33:26 -0700
committerjp161948 <none@none>2007-04-02 05:33:26 -0700
commit47b374ff8413339e27ddb691c18d22ffe3482515 (patch)
tree5c4a679e4018638ed40b17ceae5b3478f0ec4f4d /usr/src/cmd/ssh/libssh/common/readconf.c
parentf763a6cdd6a48d48089e0c8473a138f32345775a (diff)
downloadillumos-gate-47b374ff8413339e27ddb691c18d22ffe3482515.tar.gz
PSARC 2007/034 ssh/sshd resync with OpenSSH
6480090 ConnectTimeout functionality desired for SUNWssh
Diffstat (limited to 'usr/src/cmd/ssh/libssh/common/readconf.c')
-rw-r--r--usr/src/cmd/ssh/libssh/common/readconf.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/usr/src/cmd/ssh/libssh/common/readconf.c b/usr/src/cmd/ssh/libssh/common/readconf.c
index 516cad749e..678632a126 100644
--- a/usr/src/cmd/ssh/libssh/common/readconf.c
+++ b/usr/src/cmd/ssh/libssh/common/readconf.c
@@ -11,7 +11,7 @@
* called by a name other than "ssh" or "Secure Shell".
*/
/*
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -126,7 +126,7 @@ typedef enum {
oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication,
oHostKeyAlgorithms, oBindAddress, oSmartcardDevice,
oClearAllForwardings, oNoHostAuthenticationForLocalhost,
- oFallBackToRsh, oUseRsh,
+ oFallBackToRsh, oUseRsh, oConnectTimeout,
oDeprecated
} OpCodes;
@@ -212,6 +212,7 @@ static struct {
{ "smartcarddevice", oSmartcardDevice },
{ "clearallforwardings", oClearAllForwardings },
{ "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost },
+ { "connecttimeout", oConnectTimeout },
{ NULL, oBadOption }
};
@@ -319,6 +320,20 @@ process_config_line(Options *options, const char *host,
/* don't panic, but count bad options */
return -1;
/* NOTREACHED */
+ case oConnectTimeout:
+ intptr = &options->connection_timeout;
+parse_time:
+ arg = strdelim(&s);
+ if (!arg || *arg == '\0')
+ fatal("%s line %d: missing time value.",
+ filename, linenum);
+ if ((value = convtime(arg)) == -1)
+ fatal("%s line %d: invalid time value.",
+ filename, linenum);
+ if (*intptr == -1)
+ *intptr = value;
+ break;
+
case oForwardAgent:
intptr = &options->forward_agent;
parse_flag:
@@ -833,6 +848,7 @@ initialize_options(Options * options)
options->compression_level = -1;
options->port = -1;
options->connection_attempts = -1;
+ options->connection_timeout = -1;
options->number_of_password_prompts = -1;
options->cipher = -1;
options->ciphers = NULL;