version 1.101, 2002/02/04 12:15:25 |
version 1.102, 2002/03/18 17:50:31 |
|
|
|
|
/* 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; |
|
|
|
options->unprivileged_user = -1; |
|
options->unprivileged_group = -1; |
|
options->unprivileged_dir = NULL; |
|
|
|
/* Needs to be accessable in many places */ |
|
use_privsep = -1; |
} |
} |
|
|
void |
void |
|
|
} |
} |
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; |
|
if (options->unprivileged_user == -1) |
|
options->unprivileged_user = 32767; |
|
if (options->unprivileged_group == -1) |
|
options->unprivileged_group = 32767; |
|
if (options->unprivileged_dir == NULL) |
|
options->unprivileged_dir = "/var/empty"; |
} |
} |
|
|
/* Keyword tokens. */ |
/* Keyword tokens. */ |
|
|
sBanner, sVerifyReverseMapping, sHostbasedAuthentication, |
sBanner, sVerifyReverseMapping, sHostbasedAuthentication, |
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
|
sUsePrivilegeSeparation, sUnprivUser, sUnprivGroup, sUnprivDir, |
sDeprecated |
sDeprecated |
} ServerOpCodes; |
} ServerOpCodes; |
|
|
|
|
{ "clientalivecountmax", sClientAliveCountMax }, |
{ "clientalivecountmax", sClientAliveCountMax }, |
{ "authorizedkeysfile", sAuthorizedKeysFile }, |
{ "authorizedkeysfile", sAuthorizedKeysFile }, |
{ "authorizedkeysfile2", sAuthorizedKeysFile2 }, |
{ "authorizedkeysfile2", sAuthorizedKeysFile2 }, |
|
{ "useprivilegeseparation", sUsePrivilegeSeparation}, |
|
{ "unprivuser", sUnprivUser}, |
|
{ "unprivgroup", sUnprivGroup}, |
|
{ "unprivdir", sUnprivDir}, |
{ NULL, sBadOption } |
{ NULL, sBadOption } |
}; |
}; |
|
|
|
|
case sAllowTcpForwarding: |
case sAllowTcpForwarding: |
intptr = &options->allow_tcp_forwarding; |
intptr = &options->allow_tcp_forwarding; |
goto parse_flag; |
goto parse_flag; |
|
|
|
case sUsePrivilegeSeparation: |
|
intptr = &use_privsep; |
|
goto parse_flag; |
|
|
|
case sUnprivUser: |
|
intptr = &options->unprivileged_user; |
|
goto parse_flag; |
|
|
|
case sUnprivGroup: |
|
intptr = &options->unprivileged_group; |
|
goto parse_flag; |
|
|
|
case sUnprivDir: |
|
charptr = &options->unprivileged_dir; |
|
goto parse_filename; |
|
|
case sAllowUsers: |
case sAllowUsers: |
while ((arg = strdelim(&cp)) && *arg != '\0') { |
while ((arg = strdelim(&cp)) && *arg != '\0') { |