|
Lines 108-115
Link Here
|
| 108 |
options->verify_reverse_mapping = -1; |
108 |
options->verify_reverse_mapping = -1; |
| 109 |
options->client_alive_interval = -1; |
109 |
options->client_alive_interval = -1; |
| 110 |
options->client_alive_count_max = -1; |
110 |
options->client_alive_count_max = -1; |
| 111 |
options->authorized_keys_file = NULL; |
111 |
options->num_authorized_keys_files = 0; |
| 112 |
options->authorized_keys_file2 = NULL; |
|
|
| 113 |
} |
112 |
} |
| 114 |
|
113 |
|
| 115 |
void |
114 |
void |
|
Lines 226-240
Link Here
|
| 226 |
options->client_alive_interval = 0; |
225 |
options->client_alive_interval = 0; |
| 227 |
if (options->client_alive_count_max == -1) |
226 |
if (options->client_alive_count_max == -1) |
| 228 |
options->client_alive_count_max = 3; |
227 |
options->client_alive_count_max = 3; |
| 229 |
if (options->authorized_keys_file2 == NULL) { |
228 |
if (options->num_authorized_keys_files == 0) { |
| 230 |
/* authorized_keys_file2 falls back to authorized_keys_file */ |
229 |
/* fill default authorized keys files */ |
| 231 |
if (options->authorized_keys_file != NULL) |
230 |
options->authorized_keys_files[options->num_authorized_keys_files++] = _PATH_SSH_USER_PERMITTED_KEYS; |
| 232 |
options->authorized_keys_file2 = options->authorized_keys_file; |
231 |
options->authorized_keys_files[options->num_authorized_keys_files++] = _PATH_SSH_USER_PERMITTED_KEYS2; |
| 233 |
else |
232 |
} |
| 234 |
options->authorized_keys_file2 = _PATH_SSH_USER_PERMITTED_KEYS2; |
|
|
| 235 |
} |
| 236 |
if (options->authorized_keys_file == NULL) |
| 237 |
options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; |
| 238 |
} |
233 |
} |
| 239 |
|
234 |
|
| 240 |
/* Keyword tokens. */ |
235 |
/* Keyword tokens. */ |
|
Lines 266-273
Link Here
|
| 266 |
sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, |
261 |
sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, |
| 267 |
sBanner, sVerifyReverseMapping, sHostbasedAuthentication, |
262 |
sBanner, sVerifyReverseMapping, sHostbasedAuthentication, |
| 268 |
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
263 |
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, |
| 269 |
sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, |
264 |
sClientAliveCountMax, sAuthorizedKeysFile, |
| 270 |
sDeprecated |
265 |
sDeprecated |
| 271 |
} ServerOpCodes; |
266 |
} ServerOpCodes; |
| 272 |
|
267 |
|
| 273 |
/* Textual representation of the tokens. */ |
268 |
/* Textual representation of the tokens. */ |
|
Lines 341-347
Link Here
|
| 341 |
{ "clientaliveinterval", sClientAliveInterval }, |
336 |
{ "clientaliveinterval", sClientAliveInterval }, |
| 342 |
{ "clientalivecountmax", sClientAliveCountMax }, |
337 |
{ "clientalivecountmax", sClientAliveCountMax }, |
| 343 |
{ "authorizedkeysfile", sAuthorizedKeysFile }, |
338 |
{ "authorizedkeysfile", sAuthorizedKeysFile }, |
| 344 |
{ "authorizedkeysfile2", sAuthorizedKeysFile2 }, |
339 |
{ "authorizedkeysfile2", sAuthorizedKeysFile }, |
| 345 |
{ NULL, sBadOption } |
340 |
{ NULL, sBadOption } |
| 346 |
}; |
341 |
}; |
| 347 |
|
342 |
|
|
Lines 843-852
Link Here
|
| 843 |
* AuthorizedKeysFile /etc/ssh_keys/%u |
838 |
* AuthorizedKeysFile /etc/ssh_keys/%u |
| 844 |
*/ |
839 |
*/ |
| 845 |
case sAuthorizedKeysFile: |
840 |
case sAuthorizedKeysFile: |
| 846 |
case sAuthorizedKeysFile2: |
841 |
intptr = &options->num_authorized_keys_files; |
| 847 |
charptr = (opcode == sAuthorizedKeysFile ) ? |
842 |
if (*intptr >= MAX_AUTHKEYFILES) |
| 848 |
&options->authorized_keys_file : |
843 |
fatal("%s line %d: too many authorized keys " |
| 849 |
&options->authorized_keys_file2; |
844 |
"files specified (max %d).", |
|
|
845 |
filename, linenum, MAX_AUTHKEYFILES); |
| 846 |
|
| 847 |
charptr = &options->authorized_keys_files[*intptr]; |
| 850 |
goto parse_filename; |
848 |
goto parse_filename; |
| 851 |
|
849 |
|
| 852 |
case sClientAliveInterval: |
850 |
case sClientAliveInterval: |