Commit c7356ad3 authored by Stas Korobeynikov's avatar Stas Korobeynikov Committed by Pavel Vainerman

add nx params to read conf

parent 22cc954c
...@@ -150,8 +150,8 @@ typedef enum { ...@@ -150,8 +150,8 @@ typedef enum {
oCertificateFile, oAddKeysToAgent, oIdentityAgent, oCertificateFile, oAddKeysToAgent, oIdentityAgent,
oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand, oUser, oEscapeChar, oRhostsRSAAuthentication, oProxyCommand,
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts,
oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oCompression, oBatchMode, oCheckHostIP, oStrictHostKeyChecking, oHostKeyAdd, oOnlyCheck,
oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts, oCompression, oCompressionLevel, oTCPKeepAlive, oNumberOfPasswordPrompts,
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs,
oPubkeyAuthentication, oPubkeyAuthentication,
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias,
...@@ -261,6 +261,8 @@ static struct { ...@@ -261,6 +261,8 @@ static struct {
{ "batchmode", oBatchMode }, { "batchmode", oBatchMode },
{ "checkhostip", oCheckHostIP }, { "checkhostip", oCheckHostIP },
{ "stricthostkeychecking", oStrictHostKeyChecking }, { "stricthostkeychecking", oStrictHostKeyChecking },
{ "hostkeyadd", oHostKeyAdd },
{ "onlycheck", oOnlyCheck },
{ "compression", oCompression }, { "compression", oCompression },
{ "tcpkeepalive", oTCPKeepAlive }, { "tcpkeepalive", oTCPKeepAlive },
{ "keepalive", oTCPKeepAlive }, /* obsolete */ { "keepalive", oTCPKeepAlive }, /* obsolete */
...@@ -995,6 +997,16 @@ parse_time: ...@@ -995,6 +997,16 @@ parse_time:
multistate_ptr = multistate_yesnoask; multistate_ptr = multistate_yesnoask;
goto parse_multistate; goto parse_multistate;
case oHostKeyAdd:
intptr = &options->hostkeyadd;
multistate_ptr = multistate_flag;
goto parse_multistate;
case oOnlyCheck:
intptr = &options->onlycheck;
multistate_ptr = multistate_flag;
goto parse_multistate;
case oCompression: case oCompression:
intptr = &options->compression; intptr = &options->compression;
goto parse_flag; goto parse_flag;
...@@ -1807,6 +1819,8 @@ initialize_options(Options * options) ...@@ -1807,6 +1819,8 @@ initialize_options(Options * options)
options->batch_mode = -1; options->batch_mode = -1;
options->check_host_ip = -1; options->check_host_ip = -1;
options->strict_host_key_checking = -1; options->strict_host_key_checking = -1;
options->hostkeyadd = -1;
options->onlycheck = -1;
options->compression = -1; options->compression = -1;
options->tcp_keep_alive = -1; options->tcp_keep_alive = -1;
options->compression_level = -1; options->compression_level = -1;
...@@ -1879,6 +1893,7 @@ initialize_options(Options * options) ...@@ -1879,6 +1893,7 @@ initialize_options(Options * options)
options->update_hostkeys = -1; options->update_hostkeys = -1;
options->hostbased_key_types = NULL; options->hostbased_key_types = NULL;
options->pubkey_key_types = NULL; options->pubkey_key_types = NULL;
options->home = NULL;
} }
/* /*
...@@ -1958,6 +1973,10 @@ fill_default_options(Options * options) ...@@ -1958,6 +1973,10 @@ fill_default_options(Options * options)
options->check_host_ip = 1; options->check_host_ip = 1;
if (options->strict_host_key_checking == -1) if (options->strict_host_key_checking == -1)
options->strict_host_key_checking = 2; /* 2 is default */ options->strict_host_key_checking = 2; /* 2 is default */
if (options->hostkeyadd == -1)
options->hostkeyadd = 0; /* 0 is default */
if (options->onlycheck == -1)
options->onlycheck = 0; /* 0 is default */
if (options->compression == -1) if (options->compression == -1)
options->compression = 0; options->compression = 0;
if (options->tcp_keep_alive == -1) if (options->tcp_keep_alive == -1)
......
...@@ -53,6 +53,8 @@ typedef struct { ...@@ -53,6 +53,8 @@ typedef struct {
int batch_mode; /* Batch mode: do not ask for passwords. */ int batch_mode; /* Batch mode: do not ask for passwords. */
int check_host_ip; /* Also keep track of keys for IP address */ int check_host_ip; /* Also keep track of keys for IP address */
int strict_host_key_checking; /* Strict host key checking. */ int strict_host_key_checking; /* Strict host key checking. */
int hostkeyadd;
int onlycheck;
int compression; /* Compress packets in both directions. */ int compression; /* Compress packets in both directions. */
int compression_level; /* Compression level 1 (fast) to 9 int compression_level; /* Compression level 1 (fast) to 9
* (best). */ * (best). */
...@@ -169,6 +171,7 @@ typedef struct { ...@@ -169,6 +171,7 @@ typedef struct {
char *jump_extra; char *jump_extra;
char *ignored_unknown; /* Pattern list of unknown tokens to ignore */ char *ignored_unknown; /* Pattern list of unknown tokens to ignore */
char *home;
} Options; } Options;
#define SSH_CANONICALISE_NO 0 #define SSH_CANONICALISE_NO 0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment