version 1.134.2.3, 2005/09/02 03:45:00 |
version 1.135, 2005/03/01 10:09:52 |
|
|
oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, |
oEnableSSHKeysign, oRekeyLimit, oVerifyHostKeyDNS, oConnectTimeout, |
oAddressFamily, oGssAuthentication, oGssDelegateCreds, |
oAddressFamily, oGssAuthentication, oGssDelegateCreds, |
oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, |
oServerAliveInterval, oServerAliveCountMax, oIdentitiesOnly, |
oSendEnv, oControlPath, oControlMaster, oHashKnownHosts, |
oSendEnv, oControlPath, oControlMaster, |
oDeprecated, oUnsupported |
oDeprecated, oUnsupported |
} OpCodes; |
} OpCodes; |
|
|
|
|
{ "sendenv", oSendEnv }, |
{ "sendenv", oSendEnv }, |
{ "controlpath", oControlPath }, |
{ "controlpath", oControlPath }, |
{ "controlmaster", oControlMaster }, |
{ "controlmaster", oControlMaster }, |
{ "hashknownhosts", oHashKnownHosts }, |
|
{ NULL, oBadOption } |
{ NULL, oBadOption } |
}; |
}; |
|
|
|
|
int i; |
int i; |
|
|
for (i = 0; i < options->num_local_forwards; i++) { |
for (i = 0; i < options->num_local_forwards; i++) { |
if (options->local_forwards[i].listen_host != NULL) |
xfree(options->local_forwards[i].listen_host); |
xfree(options->local_forwards[i].listen_host); |
|
xfree(options->local_forwards[i].connect_host); |
xfree(options->local_forwards[i].connect_host); |
} |
} |
options->num_local_forwards = 0; |
options->num_local_forwards = 0; |
for (i = 0; i < options->num_remote_forwards; i++) { |
for (i = 0; i < options->num_remote_forwards; i++) { |
if (options->remote_forwards[i].listen_host != NULL) |
xfree(options->remote_forwards[i].listen_host); |
xfree(options->remote_forwards[i].listen_host); |
|
xfree(options->remote_forwards[i].connect_host); |
xfree(options->remote_forwards[i].connect_host); |
} |
} |
options->num_remote_forwards = 0; |
options->num_remote_forwards = 0; |
|
|
Forward fwd; |
Forward fwd; |
|
|
/* Strip trailing whitespace */ |
/* Strip trailing whitespace */ |
for (len = strlen(line) - 1; len > 0; len--) { |
for(len = strlen(line) - 1; len > 0; len--) { |
if (strchr(WHITESPACE, line[len]) == NULL) |
if (strchr(WHITESPACE, line[len]) == NULL) |
break; |
break; |
line[len] = '\0'; |
line[len] = '\0'; |
|
|
fwd.listen_host = cleanhostname(fwd.listen_host); |
fwd.listen_host = cleanhostname(fwd.listen_host); |
} else { |
} else { |
fwd.listen_port = a2port(fwd.listen_host); |
fwd.listen_port = a2port(fwd.listen_host); |
fwd.listen_host = NULL; |
fwd.listen_host = ""; |
} |
} |
if (fwd.listen_port == 0) |
if (fwd.listen_port == 0) |
fatal("%.200s line %d: Badly formatted port number.", |
fatal("%.200s line %d: Badly formatted port number.", |
|
|
|
|
case oAddressFamily: |
case oAddressFamily: |
arg = strdelim(&s); |
arg = strdelim(&s); |
if (!arg || *arg == '\0') |
|
fatal("%s line %d: missing address family.", |
|
filename, linenum); |
|
intptr = &options->address_family; |
intptr = &options->address_family; |
if (strcasecmp(arg, "inet") == 0) |
if (strcasecmp(arg, "inet") == 0) |
value = AF_INET; |
value = AF_INET; |
|
|
if (strchr(arg, '=') != NULL) |
if (strchr(arg, '=') != NULL) |
fatal("%s line %d: Invalid environment name.", |
fatal("%s line %d: Invalid environment name.", |
filename, linenum); |
filename, linenum); |
if (!*activep) |
|
continue; |
|
if (options->num_send_env >= MAX_SEND_ENV) |
if (options->num_send_env >= MAX_SEND_ENV) |
fatal("%s line %d: too many send env.", |
fatal("%s line %d: too many send env.", |
filename, linenum); |
filename, linenum); |
|
|
|
|
case oControlMaster: |
case oControlMaster: |
intptr = &options->control_master; |
intptr = &options->control_master; |
arg = strdelim(&s); |
goto parse_yesnoask; |
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; |
|
goto parse_flag; |
|
|
|
case oDeprecated: |
case oDeprecated: |
debug("%s line %d: Deprecated option \"%s\"", |
debug("%s line %d: Deprecated option \"%s\"", |
filename, linenum, keyword); |
filename, linenum, keyword); |
|
|
/* 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; |
} |
} |
|
|
options->num_send_env = 0; |
options->num_send_env = 0; |
options->control_path = NULL; |
options->control_path = NULL; |
options->control_master = -1; |
options->control_master = -1; |
options->hash_known_hosts = -1; |
|
} |
} |
|
|
/* |
/* |
|
|
options->server_alive_count_max = 3; |
options->server_alive_count_max = 3; |
if (options->control_master == -1) |
if (options->control_master == -1) |
options->control_master = 0; |
options->control_master = 0; |
if (options->hash_known_hosts == -1) |
|
options->hash_known_hosts = 0; |
|
/* options->proxy_command should not be set by default */ |
/* options->proxy_command should not be set by default */ |
/* options->user will be set in the main program if appropriate */ |
/* options->user will be set in the main program if appropriate */ |
/* options->hostname will be set in the main program if appropriate */ |
/* options->hostname will be set in the main program if appropriate */ |