version 1.92, 2001/11/17 19:14:34 |
version 1.93, 2001/12/19 07:18:56 |
|
|
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
oDynamicForward, oPreferredAuthentications, oHostbasedAuthentication, |
oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, |
oHostKeyAlgorithms, oBindAddress, oSmartcardDevice, |
oClearAllForwardings, oNoHostAuthenticationForLocalhost |
oClearAllForwardings, oNoHostAuthenticationForLocalhost |
} OpCodes; |
} OpCodes; |
|
|
/* Textual representations of the tokens. */ |
/* Textual representations of the tokens. */ |
|
|
{ "hostkeyalgorithms", oHostKeyAlgorithms }, |
{ "hostkeyalgorithms", oHostKeyAlgorithms }, |
{ "bindaddress", oBindAddress }, |
{ "bindaddress", oBindAddress }, |
{ "smartcarddevice", oSmartcardDevice }, |
{ "smartcarddevice", oSmartcardDevice }, |
{ "clearallforwardings", oClearAllForwardings }, |
{ "clearallforwardings", oClearAllForwardings }, |
{ "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, |
{ "nohostauthenticationforlocalhost", oNoHostAuthenticationForLocalhost }, |
{ NULL, oBadOption } |
{ NULL, oBadOption } |
}; |
}; |
|
|
|
|
Forward *fwd; |
Forward *fwd; |
if (options->num_remote_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) |
if (options->num_remote_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) |
fatal("Too many remote forwards (max %d).", |
fatal("Too many remote forwards (max %d).", |
SSH_MAX_FORWARDS_PER_DIRECTION); |
SSH_MAX_FORWARDS_PER_DIRECTION); |
fwd = &options->remote_forwards[options->num_remote_forwards++]; |
fwd = &options->remote_forwards[options->num_remote_forwards++]; |
fwd->port = port; |
fwd->port = port; |
fwd->host = xstrdup(host); |
fwd->host = xstrdup(host); |
|
|
arg = strdelim(&s); |
arg = strdelim(&s); |
if (!arg || *arg == '\0') |
if (!arg || *arg == '\0') |
fatal("%.200s line %d: Missing yes/no/ask argument.", |
fatal("%.200s line %d: Missing yes/no/ask argument.", |
filename, linenum); |
filename, linenum); |
value = 0; /* To avoid compiler warning... */ |
value = 0; /* To avoid compiler warning... */ |
if (strcmp(arg, "yes") == 0 || strcmp(arg, "true") == 0) |
if (strcmp(arg, "yes") == 0 || strcmp(arg, "true") == 0) |
value = 1; |
value = 1; |
|
|
intptr = &options->num_identity_files; |
intptr = &options->num_identity_files; |
if (*intptr >= SSH_MAX_IDENTITY_FILES) |
if (*intptr >= SSH_MAX_IDENTITY_FILES) |
fatal("%.200s line %d: Too many identity files specified (max %d).", |
fatal("%.200s line %d: Too many identity files specified (max %d).", |
filename, linenum, SSH_MAX_IDENTITY_FILES); |
filename, linenum, SSH_MAX_IDENTITY_FILES); |
charptr = &options->identity_files[*intptr]; |
charptr = &options->identity_files[*intptr]; |
*charptr = xstrdup(arg); |
*charptr = xstrdup(arg); |
*intptr = *intptr + 1; |
*intptr = *intptr + 1; |
|
|
value = cipher_number(arg); |
value = cipher_number(arg); |
if (value == -1) |
if (value == -1) |
fatal("%.200s line %d: Bad cipher '%s'.", |
fatal("%.200s line %d: Bad cipher '%s'.", |
filename, linenum, arg ? arg : "<NONE>"); |
filename, linenum, arg ? arg : "<NONE>"); |
if (*activep && *intptr == -1) |
if (*activep && *intptr == -1) |
*intptr = value; |
*intptr = value; |
break; |
break; |
|
|
fatal("%.200s line %d: Missing argument.", filename, linenum); |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
if (!ciphers_valid(arg)) |
if (!ciphers_valid(arg)) |
fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.", |
fatal("%.200s line %d: Bad SSH2 cipher spec '%s'.", |
filename, linenum, arg ? arg : "<NONE>"); |
filename, linenum, arg ? arg : "<NONE>"); |
if (*activep && options->ciphers == NULL) |
if (*activep && options->ciphers == NULL) |
options->ciphers = xstrdup(arg); |
options->ciphers = xstrdup(arg); |
break; |
break; |
|
|
fatal("%.200s line %d: Missing argument.", filename, linenum); |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
if (!mac_valid(arg)) |
if (!mac_valid(arg)) |
fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.", |
fatal("%.200s line %d: Bad SSH2 Mac spec '%s'.", |
filename, linenum, arg ? arg : "<NONE>"); |
filename, linenum, arg ? arg : "<NONE>"); |
if (*activep && options->macs == NULL) |
if (*activep && options->macs == NULL) |
options->macs = xstrdup(arg); |
options->macs = xstrdup(arg); |
break; |
break; |
|
|
fatal("%.200s line %d: Missing argument.", filename, linenum); |
fatal("%.200s line %d: Missing argument.", filename, linenum); |
if (!key_names_valid2(arg)) |
if (!key_names_valid2(arg)) |
fatal("%.200s line %d: Bad protocol 2 host key algorithms '%s'.", |
fatal("%.200s line %d: Bad protocol 2 host key algorithms '%s'.", |
filename, linenum, arg ? arg : "<NONE>"); |
filename, linenum, arg ? arg : "<NONE>"); |
if (*activep && options->hostkeyalgorithms == NULL) |
if (*activep && options->hostkeyalgorithms == NULL) |
options->hostkeyalgorithms = xstrdup(arg); |
options->hostkeyalgorithms = xstrdup(arg); |
break; |
break; |
|
|
value = proto_spec(arg); |
value = proto_spec(arg); |
if (value == SSH_PROTO_UNKNOWN) |
if (value == SSH_PROTO_UNKNOWN) |
fatal("%.200s line %d: Bad protocol spec '%s'.", |
fatal("%.200s line %d: Bad protocol spec '%s'.", |
filename, linenum, arg ? arg : "<NONE>"); |
filename, linenum, arg ? arg : "<NONE>"); |
if (*activep && *intptr == SSH_PROTO_UNKNOWN) |
if (*activep && *intptr == SSH_PROTO_UNKNOWN) |
*intptr = value; |
*intptr = value; |
break; |
break; |
|
|
value = log_level_number(arg); |
value = log_level_number(arg); |
if (value == (LogLevel) - 1) |
if (value == (LogLevel) - 1) |
fatal("%.200s line %d: unsupported log level '%s'", |
fatal("%.200s line %d: unsupported log level '%s'", |
filename, linenum, arg ? arg : "<NONE>"); |
filename, linenum, arg ? arg : "<NONE>"); |
if (*activep && (LogLevel) * intptr == -1) |
if (*activep && (LogLevel) * intptr == -1) |
*intptr = (LogLevel) value; |
*intptr = (LogLevel) value; |
break; |
break; |
|
|
value = SSH_ESCAPECHAR_NONE; |
value = SSH_ESCAPECHAR_NONE; |
else { |
else { |
fatal("%.200s line %d: Bad escape character.", |
fatal("%.200s line %d: Bad escape character.", |
filename, linenum); |
filename, linenum); |
/* NOTREACHED */ |
/* NOTREACHED */ |
value = 0; /* Avoid compiler warning. */ |
value = 0; /* Avoid compiler warning. */ |
} |
} |
|
|
/* Check that there is no garbage at end of line. */ |
/* Check that there is no garbage at end of line. */ |
if ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
if ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
fatal("%.200s line %d: garbage at end of line; \"%.200s\".", |
fatal("%.200s line %d: garbage at end of line; \"%.200s\".", |
filename, linenum, arg); |
filename, linenum, arg); |
} |
} |
return 0; |
return 0; |
} |
} |
|
|
fclose(f); |
fclose(f); |
if (bad_options > 0) |
if (bad_options > 0) |
fatal("%s: terminating, %d bad configuration options", |
fatal("%s: terminating, %d bad configuration options", |
filename, bad_options); |
filename, bad_options); |
return 1; |
return 1; |
} |
} |
|
|