version 1.255, 2014/11/24 03:39:22 |
version 1.256, 2014/12/21 22:27:56 |
|
|
#include "hostfile.h" |
#include "hostfile.h" |
#include "auth.h" |
#include "auth.h" |
#include "myproposal.h" |
#include "myproposal.h" |
|
#include "digest.h" |
|
|
static void add_listen_addr(ServerOptions *, char *, int); |
static void add_listen_addr(ServerOptions *, char *, int); |
static void add_one_listen_addr(ServerOptions *, char *, int); |
static void add_one_listen_addr(ServerOptions *, char *, int); |
|
|
options->ip_qos_interactive = -1; |
options->ip_qos_interactive = -1; |
options->ip_qos_bulk = -1; |
options->ip_qos_bulk = -1; |
options->version_addendum = NULL; |
options->version_addendum = NULL; |
|
options->fingerprint_hash = -1; |
} |
} |
|
|
void |
void |
|
|
options->fwd_opts.streamlocal_bind_mask = 0177; |
options->fwd_opts.streamlocal_bind_mask = 0177; |
if (options->fwd_opts.streamlocal_bind_unlink == -1) |
if (options->fwd_opts.streamlocal_bind_unlink == -1) |
options->fwd_opts.streamlocal_bind_unlink = 0; |
options->fwd_opts.streamlocal_bind_unlink = 0; |
|
if (options->fingerprint_hash == -1) |
|
options->fingerprint_hash = SSH_FP_HASH_DEFAULT; |
/* Turn privilege separation on by default */ |
/* Turn privilege separation on by default */ |
if (use_privsep == -1) |
if (use_privsep == -1) |
use_privsep = PRIVSEP_NOSANDBOX; |
use_privsep = PRIVSEP_NOSANDBOX; |
|
|
sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, |
sAuthorizedKeysCommand, sAuthorizedKeysCommandUser, |
sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
sAuthenticationMethods, sHostKeyAgent, sPermitUserRC, |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
sStreamLocalBindMask, sStreamLocalBindUnlink, |
sAllowStreamLocalForwarding, |
sAllowStreamLocalForwarding, sFingerprintHash, |
sDeprecated, sUnsupported |
sDeprecated, sUnsupported |
} ServerOpCodes; |
} ServerOpCodes; |
|
|
|
|
{ "streamlocalbindmask", sStreamLocalBindMask, SSHCFG_ALL }, |
{ "streamlocalbindmask", sStreamLocalBindMask, SSHCFG_ALL }, |
{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL }, |
{ "streamlocalbindunlink", sStreamLocalBindUnlink, SSHCFG_ALL }, |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
{ "allowstreamlocalforwarding", sAllowStreamLocalForwarding, SSHCFG_ALL }, |
|
{ "fingerprinthash", sFingerprintHash, SSHCFG_GLOBAL }, |
{ NULL, sBadOption, 0 } |
{ NULL, sBadOption, 0 } |
}; |
}; |
|
|
|
|
intptr = &options->fwd_opts.streamlocal_bind_unlink; |
intptr = &options->fwd_opts.streamlocal_bind_unlink; |
goto parse_flag; |
goto parse_flag; |
|
|
|
case sFingerprintHash: |
|
arg = strdelim(&cp); |
|
if (!arg || *arg == '\0') |
|
fatal("%.200s line %d: Missing argument.", |
|
filename, linenum); |
|
if ((value = ssh_digest_alg_by_name(arg)) == -1) |
|
fatal("%.200s line %d: Invalid hash algorithm \"%s\".", |
|
filename, linenum, arg); |
|
if (*activep) |
|
options->fingerprint_hash = value; |
|
break; |
|
|
case sDeprecated: |
case sDeprecated: |
logit("%s line %d: Deprecated option %s", |
logit("%s line %d: Deprecated option %s", |
filename, linenum, arg); |
filename, linenum, arg); |
|
|
return fmt_multistate_int(val, multistate_tcpfwd); |
return fmt_multistate_int(val, multistate_tcpfwd); |
case sAllowStreamLocalForwarding: |
case sAllowStreamLocalForwarding: |
return fmt_multistate_int(val, multistate_tcpfwd); |
return fmt_multistate_int(val, multistate_tcpfwd); |
|
case sFingerprintHash: |
|
return ssh_digest_alg_name(val); |
case sProtocol: |
case sProtocol: |
switch (val) { |
switch (val) { |
case SSH_PROTO_1: |
case SSH_PROTO_1: |
|
|
dump_cfg_fmtint(sAllowTcpForwarding, o->allow_tcp_forwarding); |
dump_cfg_fmtint(sAllowTcpForwarding, o->allow_tcp_forwarding); |
dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding); |
dump_cfg_fmtint(sAllowStreamLocalForwarding, o->allow_streamlocal_forwarding); |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
dump_cfg_fmtint(sUsePrivilegeSeparation, use_privsep); |
|
dump_cfg_fmtint(sFingerprintHash, o->fingerprint_hash); |
|
|
/* string arguments */ |
/* string arguments */ |
dump_cfg_string(sPidFile, o->pid_file); |
dump_cfg_string(sPidFile, o->pid_file); |