version 1.78.2.3, 2002/03/09 00:20:44 |
version 1.78.2.4, 2002/06/02 22:56:10 |
|
|
|
|
/* AF_UNSPEC or AF_INET or AF_INET6 */ |
/* AF_UNSPEC or AF_INET or AF_INET6 */ |
extern int IPv4or6; |
extern int IPv4or6; |
|
/* Use of privilege separation or not */ |
|
extern int use_privsep; |
|
|
/* Initializes the server options to their default values. */ |
/* Initializes the server options to their default values. */ |
|
|
|
|
options->client_alive_count_max = -1; |
options->client_alive_count_max = -1; |
options->authorized_keys_file = NULL; |
options->authorized_keys_file = NULL; |
options->authorized_keys_file2 = NULL; |
options->authorized_keys_file2 = NULL; |
|
|
|
/* Needs to be accessable in many places */ |
|
use_privsep = -1; |
} |
} |
|
|
void |
void |
|
|
options->pubkey_authentication = 1; |
options->pubkey_authentication = 1; |
#if defined(KRB4) || defined(KRB5) |
#if defined(KRB4) || defined(KRB5) |
if (options->kerberos_authentication == -1) |
if (options->kerberos_authentication == -1) |
options->kerberos_authentication = (access(KEYFILE, R_OK) == 0); |
options->kerberos_authentication = 0; |
if (options->kerberos_or_local_passwd == -1) |
if (options->kerberos_or_local_passwd == -1) |
options->kerberos_or_local_passwd = 1; |
options->kerberos_or_local_passwd = 1; |
if (options->kerberos_ticket_cleanup == -1) |
if (options->kerberos_ticket_cleanup == -1) |
|
|
#endif |
#endif |
#ifdef AFS |
#ifdef AFS |
if (options->afs_token_passing == -1) |
if (options->afs_token_passing == -1) |
options->afs_token_passing = k_hasafs(); |
options->afs_token_passing = 0; |
#endif |
#endif |
if (options->password_authentication == -1) |
if (options->password_authentication == -1) |
options->password_authentication = 1; |
options->password_authentication = 1; |
|
|
} |
} |
if (options->authorized_keys_file == NULL) |
if (options->authorized_keys_file == NULL) |
options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; |
options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; |
|
|
|
/* Turn privilege separation _off_ by default */ |
|
if (use_privsep == -1) |
|
use_privsep = 0; |
} |
} |
|
|
/* Keyword tokens. */ |
/* Keyword tokens. */ |
|
|
sBanner, sVerifyReverseMapping, sHostbasedAuthentication, |
sBanner, sVerifyReverseMapping, sHostbasedAuthentication, |
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
|
sUsePrivilegeSeparation, |
sDeprecated |
sDeprecated |
} ServerOpCodes; |
} ServerOpCodes; |
|
|
|
|
{ "clientalivecountmax", sClientAliveCountMax }, |
{ "clientalivecountmax", sClientAliveCountMax }, |
{ "authorizedkeysfile", sAuthorizedKeysFile }, |
{ "authorizedkeysfile", sAuthorizedKeysFile }, |
{ "authorizedkeysfile2", sAuthorizedKeysFile2 }, |
{ "authorizedkeysfile2", sAuthorizedKeysFile2 }, |
|
{ "useprivilegeseparation", sUsePrivilegeSeparation}, |
{ NULL, sBadOption } |
{ NULL, sBadOption } |
}; |
}; |
|
|
|
|
|
|
case sAllowTcpForwarding: |
case sAllowTcpForwarding: |
intptr = &options->allow_tcp_forwarding; |
intptr = &options->allow_tcp_forwarding; |
|
goto parse_flag; |
|
|
|
case sUsePrivilegeSeparation: |
|
intptr = &use_privsep; |
goto parse_flag; |
goto parse_flag; |
|
|
case sAllowUsers: |
case sAllowUsers: |