version 1.378, 2021/03/12 04:08:19 |
version 1.379, 2021/04/03 06:18:40 |
|
|
case sMatch: |
case sMatch: |
if (cmdline) |
if (cmdline) |
fatal("Match directive not supported as a command-line " |
fatal("Match directive not supported as a command-line " |
"option"); |
"option"); |
value = match_cfg_line(&cp, linenum, |
value = match_cfg_line(&cp, linenum, |
(*inc_flags & SSHCFG_NEVERMATCH ? NULL : connectinfo)); |
(*inc_flags & SSHCFG_NEVERMATCH ? NULL : connectinfo)); |
if (value < 0) |
if (value < 0) |
|
|
sshbuf_reset(conf); |
sshbuf_reset(conf); |
/* grow buffer, so realloc is avoided for large config files */ |
/* grow buffer, so realloc is avoided for large config files */ |
if (fstat(fileno(f), &st) == 0 && st.st_size > 0 && |
if (fstat(fileno(f), &st) == 0 && st.st_size > 0 && |
(r = sshbuf_allocate(conf, st.st_size)) != 0) |
(r = sshbuf_allocate(conf, st.st_size)) != 0) |
fatal_fr(r, "allocate"); |
fatal_fr(r, "allocate"); |
while (getline(&line, &linesize, f) != -1) { |
while (getline(&line, &linesize, f) != -1) { |
lineno++; |
lineno++; |
|
|
ci->lport = a2port(p + 6); |
ci->lport = a2port(p + 6); |
if (ci->lport == -1) { |
if (ci->lport == -1) { |
fprintf(stderr, "Invalid port '%s' in test mode" |
fprintf(stderr, "Invalid port '%s' in test mode" |
" specification %s\n", p+6, p); |
" specification %s\n", p+6, p); |
return -1; |
return -1; |
} |
} |
} else { |
} else { |
fprintf(stderr, "Invalid test mode specification %s\n", |
fprintf(stderr, "Invalid test mode specification %s\n", |
p); |
p); |
return -1; |
return -1; |
} |
} |
} |
} |
|
|
dump_cfg_strarray_oneline(sAuthorizedKeysFile, o->num_authkeys_files, |
dump_cfg_strarray_oneline(sAuthorizedKeysFile, o->num_authkeys_files, |
o->authorized_keys_files); |
o->authorized_keys_files); |
dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, |
dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, |
o->host_key_files); |
o->host_key_files); |
dump_cfg_strarray(sHostCertificate, o->num_host_cert_files, |
dump_cfg_strarray(sHostCertificate, o->num_host_cert_files, |
o->host_cert_files); |
o->host_cert_files); |
dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users); |
dump_cfg_strarray(sAllowUsers, o->num_allow_users, o->allow_users); |
dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users); |
dump_cfg_strarray(sDenyUsers, o->num_deny_users, o->deny_users); |
dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups); |
dump_cfg_strarray(sAllowGroups, o->num_allow_groups, o->allow_groups); |