version 1.350, 2021/01/26 05:32:21 |
version 1.351, 2021/02/15 20:43:15 |
|
|
oPasswordAuthentication, |
oPasswordAuthentication, |
oChallengeResponseAuthentication, oXAuthLocation, |
oChallengeResponseAuthentication, oXAuthLocation, |
oIdentityFile, oHostname, oPort, oRemoteForward, oLocalForward, |
oIdentityFile, oHostname, oPort, oRemoteForward, oLocalForward, |
|
oPermitRemoteOpen, |
oCertificateFile, oAddKeysToAgent, oIdentityAgent, |
oCertificateFile, oAddKeysToAgent, oIdentityAgent, |
oUser, oEscapeChar, oProxyCommand, |
oUser, oEscapeChar, oProxyCommand, |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
oGlobalKnownHostsFile, oUserKnownHostsFile, oConnectionAttempts, |
|
|
{ "macs", oMacs }, |
{ "macs", oMacs }, |
{ "remoteforward", oRemoteForward }, |
{ "remoteforward", oRemoteForward }, |
{ "localforward", oLocalForward }, |
{ "localforward", oLocalForward }, |
|
{ "permitremoteopen", oPermitRemoteOpen }, |
{ "user", oUser }, |
{ "user", oUser }, |
{ "host", oHost }, |
{ "host", oHost }, |
{ "match", oMatch }, |
{ "match", oMatch }, |
|
|
{ NULL, oBadOption } |
{ NULL, oBadOption } |
}; |
}; |
|
|
|
static const char *lookup_opcode_name(OpCodes code); |
|
|
const char * |
const char * |
kex_default_pk_alg(void) |
kex_default_pk_alg(void) |
|
|
const char *original_host, char *line, const char *filename, |
const char *original_host, char *line, const char *filename, |
int linenum, int *activep, int flags, int *want_final_pass, int depth) |
int linenum, int *activep, int flags, int *want_final_pass, int depth) |
{ |
{ |
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2; |
char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, *p, ch; |
char **cpptr, ***cppptr, fwdarg[256]; |
char **cpptr, ***cppptr, fwdarg[256]; |
u_int i, *uintptr, max_entries = 0; |
u_int i, *uintptr, uvalue, max_entries = 0; |
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; |
int r, oactive, negated, opcode, *intptr, value, value2, cmdline = 0; |
int remotefwd, dynamicfwd; |
int remotefwd, dynamicfwd; |
LogLevel *log_level_ptr; |
LogLevel *log_level_ptr; |
|
|
} |
} |
break; |
break; |
|
|
|
case oPermitRemoteOpen: |
|
uintptr = &options->num_permitted_remote_opens; |
|
cppptr = &options->permitted_remote_opens; |
|
arg = strdelim(&s); |
|
if (!arg || *arg == '\0') |
|
fatal("%s line %d: missing %s specification", |
|
filename, linenum, lookup_opcode_name(opcode)); |
|
uvalue = *uintptr; /* modified later */ |
|
if (strcmp(arg, "any") == 0 || strcmp(arg, "none") == 0) { |
|
if (*activep && uvalue == 0) { |
|
*uintptr = 1; |
|
*cppptr = xcalloc(1, sizeof(**cppptr)); |
|
(*cppptr)[0] = xstrdup(arg); |
|
} |
|
break; |
|
} |
|
for (; arg != NULL && *arg != '\0'; arg = strdelim(&s)) { |
|
arg2 = xstrdup(arg); |
|
ch = '\0'; |
|
p = hpdelim2(&arg, &ch); |
|
if (p == NULL || ch == '/') { |
|
fatal("%s line %d: missing host in %s", |
|
filename, linenum, |
|
lookup_opcode_name(opcode)); |
|
} |
|
p = cleanhostname(p); |
|
/* |
|
* don't want to use permitopen_port to avoid |
|
* dependency on channels.[ch] here. |
|
*/ |
|
if (arg == NULL || |
|
(strcmp(arg, "*") != 0 && a2port(arg) <= 0)) { |
|
fatal("%s line %d: bad port number in %s", |
|
filename, linenum, |
|
lookup_opcode_name(opcode)); |
|
} |
|
if (*activep && uvalue == 0) { |
|
opt_array_append(filename, linenum, |
|
lookup_opcode_name(opcode), |
|
cppptr, uintptr, arg2); |
|
} |
|
free(arg2); |
|
} |
|
break; |
|
|
case oClearAllForwardings: |
case oClearAllForwardings: |
intptr = &options->clear_forwardings; |
intptr = &options->clear_forwardings; |
goto parse_flag; |
goto parse_flag; |
|
|
options->num_local_forwards = 0; |
options->num_local_forwards = 0; |
options->remote_forwards = NULL; |
options->remote_forwards = NULL; |
options->num_remote_forwards = 0; |
options->num_remote_forwards = 0; |
|
options->permitted_remote_opens = NULL; |
|
options->num_permitted_remote_opens = 0; |
options->log_facility = SYSLOG_FACILITY_NOT_SET; |
options->log_facility = SYSLOG_FACILITY_NOT_SET; |
options->log_level = SYSLOG_LEVEL_NOT_SET; |
options->log_level = SYSLOG_LEVEL_NOT_SET; |
options->num_log_verbose = 0; |
options->num_log_verbose = 0; |
|
|
o->num_log_verbose, o->log_verbose); |
o->num_log_verbose, o->log_verbose); |
|
|
/* Special cases */ |
/* Special cases */ |
|
|
|
/* PermitRemoteOpen */ |
|
if (o->num_permitted_remote_opens == 0) |
|
printf("%s any\n", lookup_opcode_name(oPermitRemoteOpen)); |
|
else |
|
dump_cfg_strarray_oneline(oPermitRemoteOpen, |
|
o->num_permitted_remote_opens, o->permitted_remote_opens); |
|
|
/* AddKeysToAgent */ |
/* AddKeysToAgent */ |
if (o->add_keys_to_agent_lifespan <= 0) |
if (o->add_keys_to_agent_lifespan <= 0) |