version 1.192, 2011/05/06 21:34:32 |
version 1.193, 2011/05/24 07:15:47 |
|
|
{ "host", oHost }, |
{ "host", oHost }, |
{ "escapechar", oEscapeChar }, |
{ "escapechar", oEscapeChar }, |
{ "globalknownhostsfile", oGlobalKnownHostsFile }, |
{ "globalknownhostsfile", oGlobalKnownHostsFile }, |
{ "globalknownhostsfile2", oGlobalKnownHostsFile2 }, /* obsolete */ |
{ "globalknownhostsfile2", oDeprecated }, |
{ "userknownhostsfile", oUserKnownHostsFile }, |
{ "userknownhostsfile", oUserKnownHostsFile }, |
{ "userknownhostsfile2", oUserKnownHostsFile2 }, /* obsolete */ |
{ "userknownhostsfile2", oDeprecated }, |
{ "connectionattempts", oConnectionAttempts }, |
{ "connectionattempts", oConnectionAttempts }, |
{ "batchmode", oBatchMode }, |
{ "batchmode", oBatchMode }, |
{ "checkhostip", oCheckHostIP }, |
{ "checkhostip", oCheckHostIP }, |
|
|
char *line, const char *filename, int linenum, |
char *line, const char *filename, int linenum, |
int *activep) |
int *activep) |
{ |
{ |
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, fwdarg[256]; |
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2; |
|
char **cpptr, fwdarg[256]; |
|
u_int *uintptr, max_entries = 0; |
int negated, opcode, *intptr, value, value2, scale; |
int negated, opcode, *intptr, value, value2, scale; |
LogLevel *log_level_ptr; |
LogLevel *log_level_ptr; |
long long orig, val64; |
long long orig, val64; |
|
|
parse_string: |
parse_string: |
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 (*activep && *charptr == NULL) |
if (*activep && *charptr == NULL) |
*charptr = xstrdup(arg); |
*charptr = xstrdup(arg); |
break; |
break; |
|
|
case oGlobalKnownHostsFile: |
case oGlobalKnownHostsFile: |
charptr = &options->system_hostfile; |
cpptr = (char **)&options->system_hostfiles; |
goto parse_string; |
uintptr = &options->num_system_hostfiles; |
|
max_entries = SSH_MAX_HOSTS_FILES; |
|
parse_char_array: |
|
if (*activep && *uintptr == 0) { |
|
while ((arg = strdelim(&s)) != NULL && *arg != '\0') { |
|
if ((*uintptr) >= max_entries) |
|
fatal("%s line %d: " |
|
"too many authorized keys files.", |
|
filename, linenum); |
|
cpptr[(*uintptr)++] = xstrdup(arg); |
|
} |
|
} |
|
return 0; |
|
|
case oUserKnownHostsFile: |
case oUserKnownHostsFile: |
charptr = &options->user_hostfile; |
cpptr = (char **)&options->user_hostfiles; |
goto parse_string; |
uintptr = &options->num_user_hostfiles; |
|
max_entries = SSH_MAX_HOSTS_FILES; |
|
goto parse_char_array; |
|
|
case oGlobalKnownHostsFile2: |
|
charptr = &options->system_hostfile2; |
|
goto parse_string; |
|
|
|
case oUserKnownHostsFile2: |
|
charptr = &options->user_hostfile2; |
|
goto parse_string; |
|
|
|
case oHostName: |
case oHostName: |
charptr = &options->hostname; |
charptr = &options->hostname; |
goto parse_string; |
goto parse_string; |
|
|
options->proxy_command = NULL; |
options->proxy_command = NULL; |
options->user = NULL; |
options->user = NULL; |
options->escape_char = -1; |
options->escape_char = -1; |
options->system_hostfile = NULL; |
options->num_system_hostfiles = 0; |
options->user_hostfile = NULL; |
options->num_user_hostfiles = 0; |
options->system_hostfile2 = NULL; |
|
options->user_hostfile2 = NULL; |
|
options->local_forwards = NULL; |
options->local_forwards = NULL; |
options->num_local_forwards = 0; |
options->num_local_forwards = 0; |
options->remote_forwards = NULL; |
options->remote_forwards = NULL; |
|
|
} |
} |
if (options->escape_char == -1) |
if (options->escape_char == -1) |
options->escape_char = '~'; |
options->escape_char = '~'; |
if (options->system_hostfile == NULL) |
if (options->num_system_hostfiles == 0) { |
options->system_hostfile = _PATH_SSH_SYSTEM_HOSTFILE; |
options->system_hostfiles[options->num_system_hostfiles++] = |
if (options->user_hostfile == NULL) |
xstrdup(_PATH_SSH_SYSTEM_HOSTFILE); |
options->user_hostfile = _PATH_SSH_USER_HOSTFILE; |
options->system_hostfiles[options->num_system_hostfiles++] = |
if (options->system_hostfile2 == NULL) |
xstrdup(_PATH_SSH_SYSTEM_HOSTFILE2); |
options->system_hostfile2 = _PATH_SSH_SYSTEM_HOSTFILE2; |
} |
if (options->user_hostfile2 == NULL) |
if (options->num_user_hostfiles == 0) { |
options->user_hostfile2 = _PATH_SSH_USER_HOSTFILE2; |
options->user_hostfiles[options->num_user_hostfiles++] = |
|
xstrdup(_PATH_SSH_USER_HOSTFILE); |
|
options->user_hostfiles[options->num_user_hostfiles++] = |
|
xstrdup(_PATH_SSH_USER_HOSTFILE2); |
|
} |
if (options->log_level == SYSLOG_LEVEL_NOT_SET) |
if (options->log_level == SYSLOG_LEVEL_NOT_SET) |
options->log_level = SYSLOG_LEVEL_INFO; |
options->log_level = SYSLOG_LEVEL_INFO; |
if (options->clear_forwardings == 1) |
if (options->clear_forwardings == 1) |