version 1.49.2.2, 2001/02/19 17:19:12 |
version 1.49.2.3, 2001/03/21 19:46:27 |
|
|
oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, |
oCompressionLevel, oKeepAlives, oNumberOfPasswordPrompts, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, |
oUsePrivilegedPort, oLogLevel, oCiphers, oProtocol, oMacs, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, |
oGlobalKnownHostsFile2, oUserKnownHostsFile2, oPubkeyAuthentication, |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias |
oKbdInteractiveAuthentication, oKbdInteractiveDevices, oHostKeyAlias, |
|
oPreferredAuthentications |
} OpCodes; |
} OpCodes; |
|
|
/* Textual representations of the tokens. */ |
/* Textual representations of the tokens. */ |
|
|
{ "keepalive", oKeepAlives }, |
{ "keepalive", oKeepAlives }, |
{ "numberofpasswordprompts", oNumberOfPasswordPrompts }, |
{ "numberofpasswordprompts", oNumberOfPasswordPrompts }, |
{ "loglevel", oLogLevel }, |
{ "loglevel", oLogLevel }, |
|
{ "preferredauthentications", oPreferredAuthentications }, |
{ NULL, 0 } |
{ NULL, 0 } |
}; |
}; |
|
|
|
|
Forward *fwd; |
Forward *fwd; |
extern uid_t original_real_uid; |
extern uid_t original_real_uid; |
if (port < IPPORT_RESERVED && original_real_uid != 0) |
if (port < IPPORT_RESERVED && original_real_uid != 0) |
fatal("Privileged ports can only be forwarded by root.\n"); |
fatal("Privileged ports can only be forwarded by root."); |
if (options->num_local_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) |
if (options->num_local_forwards >= SSH_MAX_FORWARDS_PER_DIRECTION) |
fatal("Too many local forwards (max %d).", SSH_MAX_FORWARDS_PER_DIRECTION); |
fatal("Too many local forwards (max %d).", SSH_MAX_FORWARDS_PER_DIRECTION); |
fwd = &options->local_forwards[options->num_local_forwards++]; |
fwd = &options->local_forwards[options->num_local_forwards++]; |
|
|
charptr = &options->host_key_alias; |
charptr = &options->host_key_alias; |
goto parse_string; |
goto parse_string; |
|
|
|
case oPreferredAuthentications: |
|
charptr = &options->preferred_authentications; |
|
goto parse_string; |
|
|
case oProxyCommand: |
case oProxyCommand: |
charptr = &options->proxy_command; |
charptr = &options->proxy_command; |
string = xstrdup(""); |
string = xstrdup(""); |
|
|
arg = strdelim(&s); |
arg = strdelim(&s); |
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'\n", |
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; |
|
|
} |
} |
fclose(f); |
fclose(f); |
if (bad_options > 0) |
if (bad_options > 0) |
fatal("%s: terminating, %d bad configuration options\n", |
fatal("%s: terminating, %d bad configuration options", |
filename, bad_options); |
filename, bad_options); |
} |
} |
|
|
|
|
options->num_local_forwards = 0; |
options->num_local_forwards = 0; |
options->num_remote_forwards = 0; |
options->num_remote_forwards = 0; |
options->log_level = (LogLevel) - 1; |
options->log_level = (LogLevel) - 1; |
|
options->preferred_authentications = NULL; |
} |
} |
|
|
/* |
/* |
|
|
if (options->gateway_ports == -1) |
if (options->gateway_ports == -1) |
options->gateway_ports = 0; |
options->gateway_ports = 0; |
if (options->use_privileged_port == -1) |
if (options->use_privileged_port == -1) |
options->use_privileged_port = 1; |
options->use_privileged_port = 0; |
if (options->rhosts_authentication == -1) |
if (options->rhosts_authentication == -1) |
options->rhosts_authentication = 1; |
options->rhosts_authentication = 1; |
if (options->rsa_authentication == -1) |
if (options->rsa_authentication == -1) |
|
|
len, "~/%.100s", _PATH_SSH_CLIENT_IDENTITY); |
len, "~/%.100s", _PATH_SSH_CLIENT_IDENTITY); |
} |
} |
if (options->protocol & SSH_PROTO_2) { |
if (options->protocol & SSH_PROTO_2) { |
|
len = 2 + strlen(_PATH_SSH_CLIENT_ID_RSA) + 1; |
|
options->identity_files[options->num_identity_files] = |
|
xmalloc(len); |
|
snprintf(options->identity_files[options->num_identity_files++], |
|
len, "~/%.100s", _PATH_SSH_CLIENT_ID_RSA); |
|
|
len = 2 + strlen(_PATH_SSH_CLIENT_ID_DSA) + 1; |
len = 2 + strlen(_PATH_SSH_CLIENT_ID_DSA) + 1; |
options->identity_files[options->num_identity_files] = |
options->identity_files[options->num_identity_files] = |
xmalloc(len); |
xmalloc(len); |
|
|
/* 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 */ |
/* options->host_key_alias should not be set by default */ |
/* options->host_key_alias should not be set by default */ |
|
/* options->preferred_authentications will be set in ssh */ |
} |
} |