version 1.49.2.3, 2001/03/21 19:46:27 |
version 1.49.2.4, 2001/05/07 21:09:32 |
|
|
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
oPreferredAuthentications |
oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
|
oHostKeyAlgorithms |
} OpCodes; |
} OpCodes; |
|
|
/* Textual representations of the tokens. */ |
/* Textual representations of the tokens. */ |
|
|
{ "rsaauthentication", oRSAAuthentication }, |
{ "rsaauthentication", oRSAAuthentication }, |
{ "pubkeyauthentication", oPubkeyAuthentication }, |
{ "pubkeyauthentication", oPubkeyAuthentication }, |
{ "dsaauthentication", oPubkeyAuthentication }, /* alias */ |
{ "dsaauthentication", oPubkeyAuthentication }, /* alias */ |
|
{ "rhostsrsaauthentication", oRhostsRSAAuthentication }, |
|
{ "hostbasedauthentication", oHostbasedAuthentication }, |
{ "challengeresponseauthentication", oChallengeResponseAuthentication }, |
{ "challengeresponseauthentication", oChallengeResponseAuthentication }, |
{ "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ |
{ "skeyauthentication", oChallengeResponseAuthentication }, /* alias */ |
{ "tisauthentication", oChallengeResponseAuthentication }, /* alias */ |
{ "tisauthentication", oChallengeResponseAuthentication }, /* alias */ |
|
|
{ "user", oUser }, |
{ "user", oUser }, |
{ "host", oHost }, |
{ "host", oHost }, |
{ "escapechar", oEscapeChar }, |
{ "escapechar", oEscapeChar }, |
{ "rhostsrsaauthentication", oRhostsRSAAuthentication }, |
|
{ "globalknownhostsfile", oGlobalKnownHostsFile }, |
{ "globalknownhostsfile", oGlobalKnownHostsFile }, |
{ "userknownhostsfile", oUserKnownHostsFile }, |
{ "userknownhostsfile", oUserKnownHostsFile }, |
{ "globalknownhostsfile2", oGlobalKnownHostsFile2 }, |
{ "globalknownhostsfile2", oGlobalKnownHostsFile2 }, |
|
|
{ "keepalive", oKeepAlives }, |
{ "keepalive", oKeepAlives }, |
{ "numberofpasswordprompts", oNumberOfPasswordPrompts }, |
{ "numberofpasswordprompts", oNumberOfPasswordPrompts }, |
{ "loglevel", oLogLevel }, |
{ "loglevel", oLogLevel }, |
|
{ "dynamicforward", oDynamicForward }, |
{ "preferredauthentications", oPreferredAuthentications }, |
{ "preferredauthentications", oPreferredAuthentications }, |
|
{ "hostkeyalgorithms", oHostKeyAlgorithms }, |
{ NULL, 0 } |
{ NULL, 0 } |
}; |
}; |
|
|
|
|
} |
} |
|
|
/* |
/* |
* Returns the number of the token pointed to by cp of length len. Never |
* Returns the number of the token pointed to by cp or oBadOption. |
* returns if the token is not known. |
|
*/ |
*/ |
|
|
static OpCodes |
static OpCodes |
|
|
if (strcasecmp(cp, keywords[i].name) == 0) |
if (strcasecmp(cp, keywords[i].name) == 0) |
return keywords[i].opcode; |
return keywords[i].opcode; |
|
|
fprintf(stderr, "%s: line %d: Bad configuration option: %s\n", |
error("%s: line %d: Bad configuration option: %s", |
filename, linenum, cp); |
filename, linenum, cp); |
return oBadOption; |
return oBadOption; |
} |
} |
|
|
|
|
intptr = &options->rhosts_rsa_authentication; |
intptr = &options->rhosts_rsa_authentication; |
goto parse_flag; |
goto parse_flag; |
|
|
|
case oHostbasedAuthentication: |
|
intptr = &options->hostbased_authentication; |
|
goto parse_flag; |
|
|
case oChallengeResponseAuthentication: |
case oChallengeResponseAuthentication: |
intptr = &options->challenge_reponse_authentication; |
intptr = &options->challenge_reponse_authentication; |
goto parse_flag; |
goto parse_flag; |
|
|
options->macs = xstrdup(arg); |
options->macs = xstrdup(arg); |
break; |
break; |
|
|
|
case oHostKeyAlgorithms: |
|
arg = strdelim(&s); |
|
if (!arg || *arg == '\0') |
|
fatal("%.200s line %d: Missing argument.", filename, linenum); |
|
if (!key_names_valid2(arg)) |
|
fatal("%.200s line %d: Bad protocol 2 host key algorithms '%s'.", |
|
filename, linenum, arg ? arg : "<NONE>"); |
|
if (*activep && options->hostkeyalgorithms == NULL) |
|
options->hostkeyalgorithms = xstrdup(arg); |
|
break; |
|
|
case oProtocol: |
case oProtocol: |
intptr = &options->protocol; |
intptr = &options->protocol; |
arg = strdelim(&s); |
arg = strdelim(&s); |
|
|
arg = strdelim(&s); |
arg = strdelim(&s); |
if (!arg || *arg == '\0') |
if (!arg || *arg == '\0') |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
if (arg[0] < '0' || arg[0] > '9') |
fwd_port = a2port(arg); |
|
if (fwd_port == 0) |
fatal("%.200s line %d: Badly formatted port number.", |
fatal("%.200s line %d: Badly formatted port number.", |
filename, linenum); |
filename, linenum); |
fwd_port = atoi(arg); |
|
arg = strdelim(&s); |
arg = strdelim(&s); |
if (!arg || *arg == '\0') |
if (!arg || *arg == '\0') |
fatal("%.200s line %d: Missing second argument.", |
fatal("%.200s line %d: Missing second argument.", |
|
|
arg = strdelim(&s); |
arg = strdelim(&s); |
if (!arg || *arg == '\0') |
if (!arg || *arg == '\0') |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
if (arg[0] < '0' || arg[0] > '9') |
fwd_port = a2port(arg); |
|
if (fwd_port == 0) |
fatal("%.200s line %d: Badly formatted port number.", |
fatal("%.200s line %d: Badly formatted port number.", |
filename, linenum); |
filename, linenum); |
fwd_port = atoi(arg); |
|
arg = strdelim(&s); |
arg = strdelim(&s); |
if (!arg || *arg == '\0') |
if (!arg || *arg == '\0') |
fatal("%.200s line %d: Missing second argument.", |
fatal("%.200s line %d: Missing second argument.", |
|
|
add_local_forward(options, fwd_port, buf, fwd_host_port); |
add_local_forward(options, fwd_port, buf, fwd_host_port); |
break; |
break; |
|
|
|
case oDynamicForward: |
|
arg = strdelim(&s); |
|
if (!arg || *arg == '\0') |
|
fatal("%.200s line %d: Missing port argument.", |
|
filename, linenum); |
|
fwd_port = a2port(arg); |
|
if (fwd_port == 0) |
|
fatal("%.200s line %d: Badly formatted port number.", |
|
filename, linenum); |
|
add_local_forward(options, fwd_port, "socks4", 0); |
|
break; |
|
|
case oHost: |
case oHost: |
*activep = 0; |
*activep = 0; |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') |
while ((arg = strdelim(&s)) != NULL && *arg != '\0') |
|
|
options->kbd_interactive_authentication = -1; |
options->kbd_interactive_authentication = -1; |
options->kbd_interactive_devices = NULL; |
options->kbd_interactive_devices = NULL; |
options->rhosts_rsa_authentication = -1; |
options->rhosts_rsa_authentication = -1; |
|
options->hostbased_authentication = -1; |
options->fallback_to_rsh = -1; |
options->fallback_to_rsh = -1; |
options->use_rsh = -1; |
options->use_rsh = -1; |
options->batch_mode = -1; |
options->batch_mode = -1; |
|
|
options->cipher = -1; |
options->cipher = -1; |
options->ciphers = NULL; |
options->ciphers = NULL; |
options->macs = NULL; |
options->macs = NULL; |
|
options->hostkeyalgorithms = NULL; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->num_identity_files = 0; |
options->num_identity_files = 0; |
options->hostname = NULL; |
options->hostname = NULL; |
|
|
options->kbd_interactive_authentication = 1; |
options->kbd_interactive_authentication = 1; |
if (options->rhosts_rsa_authentication == -1) |
if (options->rhosts_rsa_authentication == -1) |
options->rhosts_rsa_authentication = 1; |
options->rhosts_rsa_authentication = 1; |
|
if (options->hostbased_authentication == -1) |
|
options->hostbased_authentication = 0; |
if (options->fallback_to_rsh == -1) |
if (options->fallback_to_rsh == -1) |
options->fallback_to_rsh = 0; |
options->fallback_to_rsh = 0; |
if (options->use_rsh == -1) |
if (options->use_rsh == -1) |
|
|
options->cipher = SSH_CIPHER_NOT_SET; |
options->cipher = SSH_CIPHER_NOT_SET; |
/* options->ciphers, default set in myproposals.h */ |
/* options->ciphers, default set in myproposals.h */ |
/* options->macs, default set in myproposals.h */ |
/* options->macs, default set in myproposals.h */ |
|
/* options->hostkeyalgorithms, default set in myproposals.h */ |
if (options->protocol == SSH_PROTO_UNKNOWN) |
if (options->protocol == SSH_PROTO_UNKNOWN) |
options->protocol = SSH_PROTO_1|SSH_PROTO_2|SSH_PROTO_1_PREFERRED; |
options->protocol = SSH_PROTO_1|SSH_PROTO_2; |
if (options->num_identity_files == 0) { |
if (options->num_identity_files == 0) { |
if (options->protocol & SSH_PROTO_1) { |
if (options->protocol & SSH_PROTO_1) { |
len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1; |
len = 2 + strlen(_PATH_SSH_CLIENT_IDENTITY) + 1; |