|
Lines 325-338
static struct {
Link Here
|
| 325 |
{ "syslogfacility", sLogFacility, SSHCFG_GLOBAL }, |
325 |
{ "syslogfacility", sLogFacility, SSHCFG_GLOBAL }, |
| 326 |
{ "loglevel", sLogLevel, SSHCFG_GLOBAL }, |
326 |
{ "loglevel", sLogLevel, SSHCFG_GLOBAL }, |
| 327 |
{ "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL }, |
327 |
{ "rhostsauthentication", sDeprecated, SSHCFG_GLOBAL }, |
| 328 |
{ "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_GLOBAL }, |
328 |
{ "rhostsrsaauthentication", sRhostsRSAAuthentication, SSHCFG_ALL }, |
| 329 |
{ "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_GLOBAL }, |
329 |
{ "hostbasedauthentication", sHostbasedAuthentication, SSHCFG_ALL }, |
| 330 |
{ "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_GLOBAL }, |
330 |
{ "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_GLOBAL }, |
| 331 |
{ "rsaauthentication", sRSAAuthentication, SSHCFG_GLOBAL }, |
331 |
{ "rsaauthentication", sRSAAuthentication, SSHCFG_ALL }, |
| 332 |
{ "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, |
332 |
{ "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_ALL }, |
| 333 |
{ "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */ |
333 |
{ "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */ |
| 334 |
#ifdef KRB5 |
334 |
#ifdef KRB5 |
| 335 |
{ "kerberosauthentication", sKerberosAuthentication, SSHCFG_GLOBAL }, |
335 |
{ "kerberosauthentication", sKerberosAuthentication, SSHCFG_ALL }, |
| 336 |
{ "kerberosorlocalpasswd", sKerberosOrLocalPasswd, SSHCFG_GLOBAL }, |
336 |
{ "kerberosorlocalpasswd", sKerberosOrLocalPasswd, SSHCFG_GLOBAL }, |
| 337 |
{ "kerberosticketcleanup", sKerberosTicketCleanup, SSHCFG_GLOBAL }, |
337 |
{ "kerberosticketcleanup", sKerberosTicketCleanup, SSHCFG_GLOBAL }, |
| 338 |
#ifdef USE_AFS |
338 |
#ifdef USE_AFS |
|
Lines 341-347
static struct {
Link Here
|
| 341 |
{ "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, |
341 |
{ "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, |
| 342 |
#endif |
342 |
#endif |
| 343 |
#else |
343 |
#else |
| 344 |
{ "kerberosauthentication", sUnsupported, SSHCFG_GLOBAL }, |
344 |
{ "kerberosauthentication", sUnsupported, SSHCFG_ALL }, |
| 345 |
{ "kerberosorlocalpasswd", sUnsupported, SSHCFG_GLOBAL }, |
345 |
{ "kerberosorlocalpasswd", sUnsupported, SSHCFG_GLOBAL }, |
| 346 |
{ "kerberosticketcleanup", sUnsupported, SSHCFG_GLOBAL }, |
346 |
{ "kerberosticketcleanup", sUnsupported, SSHCFG_GLOBAL }, |
| 347 |
{ "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, |
347 |
{ "kerberosgetafstoken", sUnsupported, SSHCFG_GLOBAL }, |
|
Lines 349-363
static struct {
Link Here
|
| 349 |
{ "kerberostgtpassing", sUnsupported, SSHCFG_GLOBAL }, |
349 |
{ "kerberostgtpassing", sUnsupported, SSHCFG_GLOBAL }, |
| 350 |
{ "afstokenpassing", sUnsupported, SSHCFG_GLOBAL }, |
350 |
{ "afstokenpassing", sUnsupported, SSHCFG_GLOBAL }, |
| 351 |
#ifdef GSSAPI |
351 |
#ifdef GSSAPI |
| 352 |
{ "gssapiauthentication", sGssAuthentication, SSHCFG_GLOBAL }, |
352 |
{ "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, |
| 353 |
{ "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, |
353 |
{ "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, |
| 354 |
#else |
354 |
#else |
| 355 |
{ "gssapiauthentication", sUnsupported, SSHCFG_GLOBAL }, |
355 |
{ "gssapiauthentication", sUnsupported, SSHCFG_ALL }, |
| 356 |
{ "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL }, |
356 |
{ "gssapicleanupcredentials", sUnsupported, SSHCFG_GLOBAL }, |
| 357 |
#endif |
357 |
#endif |
| 358 |
{ "passwordauthentication", sPasswordAuthentication, SSHCFG_GLOBAL }, |
358 |
{ "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, |
| 359 |
{ "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_GLOBAL }, |
359 |
{ "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, |
| 360 |
{ "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, |
360 |
{ "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_ALL }, |
| 361 |
{ "skeyauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, /* alias */ |
361 |
{ "skeyauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, /* alias */ |
| 362 |
{ "checkmail", sDeprecated, SSHCFG_GLOBAL }, |
362 |
{ "checkmail", sDeprecated, SSHCFG_GLOBAL }, |
| 363 |
{ "listenaddress", sListenAddress, SSHCFG_GLOBAL }, |
363 |
{ "listenaddress", sListenAddress, SSHCFG_GLOBAL }, |
|
Lines 389-395
static struct {
Link Here
|
| 389 |
{ "subsystem", sSubsystem, SSHCFG_GLOBAL }, |
389 |
{ "subsystem", sSubsystem, SSHCFG_GLOBAL }, |
| 390 |
{ "maxstartups", sMaxStartups, SSHCFG_GLOBAL }, |
390 |
{ "maxstartups", sMaxStartups, SSHCFG_GLOBAL }, |
| 391 |
{ "maxauthtries", sMaxAuthTries, SSHCFG_GLOBAL }, |
391 |
{ "maxauthtries", sMaxAuthTries, SSHCFG_GLOBAL }, |
| 392 |
{ "banner", sBanner, SSHCFG_GLOBAL }, |
392 |
{ "banner", sBanner, SSHCFG_ALL }, |
| 393 |
{ "usedns", sUseDNS, SSHCFG_GLOBAL }, |
393 |
{ "usedns", sUseDNS, SSHCFG_GLOBAL }, |
| 394 |
{ "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL }, |
394 |
{ "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL }, |
| 395 |
{ "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL }, |
395 |
{ "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL }, |
|
Lines 1316-1345
parse_server_match_config(ServerOptions
Link Here
|
| 1316 |
|
1316 |
|
| 1317 |
initialize_server_options(&mo); |
1317 |
initialize_server_options(&mo); |
| 1318 |
parse_server_config(&mo, "reprocess config", &cfg, user, host, address); |
1318 |
parse_server_config(&mo, "reprocess config", &cfg, user, host, address); |
| 1319 |
copy_set_server_options(options, &mo); |
1319 |
copy_set_server_options(options, &mo, 0); |
| 1320 |
} |
1320 |
} |
| 1321 |
|
1321 |
|
| 1322 |
/* Copy any (supported) values that are set */ |
1322 |
/* Helper macros */ |
|
|
1323 |
#define M_CP_INTOPT(n) do {\ |
| 1324 |
if (src->n != -1) \ |
| 1325 |
dst->n = src->n; \ |
| 1326 |
} while (0) |
| 1327 |
#define M_CP_STROPT(n) do {\ |
| 1328 |
if (src->n != NULL) { \ |
| 1329 |
if (dst->n != NULL) \ |
| 1330 |
xfree(dst->n); \ |
| 1331 |
dst->n = src->n; \ |
| 1332 |
} \ |
| 1333 |
} while(0) |
| 1334 |
|
| 1335 |
/* |
| 1336 |
* Copy any supported values that are set. |
| 1337 |
* |
| 1338 |
* If the preauth flag is set, we do not bother copying the the string or |
| 1339 |
* array values that are not used pre-authentication, because any that we |
| 1340 |
* do use must be explictly sent in mm_getpwnamallow(). |
| 1341 |
*/ |
| 1323 |
void |
1342 |
void |
| 1324 |
copy_set_server_options(ServerOptions *dst, ServerOptions *src) |
1343 |
copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth) |
| 1325 |
{ |
1344 |
{ |
| 1326 |
if (src->allow_tcp_forwarding != -1) |
1345 |
M_CP_INTOPT(password_authentication); |
| 1327 |
dst->allow_tcp_forwarding = src->allow_tcp_forwarding; |
1346 |
M_CP_INTOPT(gss_authentication); |
| 1328 |
if (src->gateway_ports != -1) |
1347 |
M_CP_INTOPT(rsa_authentication); |
| 1329 |
dst->gateway_ports = src->gateway_ports; |
1348 |
M_CP_INTOPT(pubkey_authentication); |
| 1330 |
if (src->adm_forced_command != NULL) { |
1349 |
M_CP_INTOPT(kerberos_authentication); |
| 1331 |
if (dst->adm_forced_command != NULL) |
1350 |
M_CP_INTOPT(hostbased_authentication); |
| 1332 |
xfree(dst->adm_forced_command); |
1351 |
M_CP_INTOPT(kbd_interactive_authentication); |
| 1333 |
dst->adm_forced_command = src->adm_forced_command; |
1352 |
M_CP_INTOPT(challenge_response_authentication); |
| 1334 |
} |
1353 |
|
| 1335 |
if (src->x11_display_offset != -1) |
1354 |
M_CP_INTOPT(allow_tcp_forwarding); |
| 1336 |
dst->x11_display_offset = src->x11_display_offset; |
1355 |
M_CP_INTOPT(gateway_ports); |
| 1337 |
if (src->x11_forwarding != -1) |
1356 |
M_CP_INTOPT(x11_display_offset); |
| 1338 |
dst->x11_forwarding = src->x11_forwarding; |
1357 |
M_CP_INTOPT(x11_forwarding); |
| 1339 |
if (src->x11_use_localhost != -1) |
1358 |
M_CP_INTOPT(x11_use_localhost); |
| 1340 |
dst->x11_use_localhost = src->x11_use_localhost; |
1359 |
|
|
|
1360 |
M_CP_STROPT(banner); |
| 1361 |
if (preauth) |
| 1362 |
return; |
| 1363 |
M_CP_STROPT(adm_forced_command); |
| 1341 |
} |
1364 |
} |
| 1342 |
|
1365 |
|
|
|
1366 |
#undef M_CP_INTOPT |
| 1367 |
#undef M_CP_STROPT |
| 1368 |
|
| 1343 |
void |
1369 |
void |
| 1344 |
parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, |
1370 |
parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, |
| 1345 |
const char *user, const char *host, const char *address) |
1371 |
const char *user, const char *host, const char *address) |