diff options
Diffstat (limited to 'servconf.c')
-rw-r--r-- | servconf.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/servconf.c b/servconf.c index b08772601..11a69f819 100644 --- a/servconf.c +++ b/servconf.c | |||
@@ -104,6 +104,7 @@ initialize_server_options(ServerOptions *options) | |||
104 | options->password_authentication = -1; | 104 | options->password_authentication = -1; |
105 | options->kbd_interactive_authentication = -1; | 105 | options->kbd_interactive_authentication = -1; |
106 | options->challenge_response_authentication = -1; | 106 | options->challenge_response_authentication = -1; |
107 | options->permit_blacklisted_keys = -1; | ||
107 | options->permit_empty_passwd = -1; | 108 | options->permit_empty_passwd = -1; |
108 | options->permit_user_env = -1; | 109 | options->permit_user_env = -1; |
109 | options->use_login = -1; | 110 | options->use_login = -1; |
@@ -142,6 +143,7 @@ initialize_server_options(ServerOptions *options) | |||
142 | options->authorized_principals_file = NULL; | 143 | options->authorized_principals_file = NULL; |
143 | options->ip_qos_interactive = -1; | 144 | options->ip_qos_interactive = -1; |
144 | options->ip_qos_bulk = -1; | 145 | options->ip_qos_bulk = -1; |
146 | options->debian_banner = -1; | ||
145 | } | 147 | } |
146 | 148 | ||
147 | void | 149 | void |
@@ -243,6 +245,8 @@ fill_default_server_options(ServerOptions *options) | |||
243 | options->kbd_interactive_authentication = 0; | 245 | options->kbd_interactive_authentication = 0; |
244 | if (options->challenge_response_authentication == -1) | 246 | if (options->challenge_response_authentication == -1) |
245 | options->challenge_response_authentication = 1; | 247 | options->challenge_response_authentication = 1; |
248 | if (options->permit_blacklisted_keys == -1) | ||
249 | options->permit_blacklisted_keys = 0; | ||
246 | if (options->permit_empty_passwd == -1) | 250 | if (options->permit_empty_passwd == -1) |
247 | options->permit_empty_passwd = 0; | 251 | options->permit_empty_passwd = 0; |
248 | if (options->permit_user_env == -1) | 252 | if (options->permit_user_env == -1) |
@@ -290,6 +294,8 @@ fill_default_server_options(ServerOptions *options) | |||
290 | options->ip_qos_interactive = IPTOS_LOWDELAY; | 294 | options->ip_qos_interactive = IPTOS_LOWDELAY; |
291 | if (options->ip_qos_bulk == -1) | 295 | if (options->ip_qos_bulk == -1) |
292 | options->ip_qos_bulk = IPTOS_THROUGHPUT; | 296 | options->ip_qos_bulk = IPTOS_THROUGHPUT; |
297 | if (options->debian_banner == -1) | ||
298 | options->debian_banner = 1; | ||
293 | 299 | ||
294 | /* Turn privilege separation on by default */ | 300 | /* Turn privilege separation on by default */ |
295 | if (use_privsep == -1) | 301 | if (use_privsep == -1) |
@@ -322,7 +328,7 @@ typedef enum { | |||
322 | sListenAddress, sAddressFamily, | 328 | sListenAddress, sAddressFamily, |
323 | sPrintMotd, sPrintLastLog, sIgnoreRhosts, | 329 | sPrintMotd, sPrintLastLog, sIgnoreRhosts, |
324 | sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, | 330 | sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, |
325 | sStrictModes, sEmptyPasswd, sTCPKeepAlive, | 331 | sStrictModes, sPermitBlacklistedKeys, sEmptyPasswd, sTCPKeepAlive, |
326 | sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, | 332 | sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, |
327 | sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, | 333 | sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
328 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, | 334 | sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, |
@@ -339,6 +345,7 @@ typedef enum { | |||
339 | sZeroKnowledgePasswordAuthentication, sHostCertificate, | 345 | sZeroKnowledgePasswordAuthentication, sHostCertificate, |
340 | sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile, | 346 | sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile, |
341 | sKexAlgorithms, sIPQoS, | 347 | sKexAlgorithms, sIPQoS, |
348 | sDebianBanner, | ||
342 | sDeprecated, sUnsupported | 349 | sDeprecated, sUnsupported |
343 | } ServerOpCodes; | 350 | } ServerOpCodes; |
344 | 351 | ||
@@ -432,6 +439,7 @@ static struct { | |||
432 | { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, | 439 | { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, |
433 | { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, | 440 | { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, |
434 | { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, | 441 | { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, |
442 | { "permitblacklistedkeys", sPermitBlacklistedKeys, SSHCFG_GLOBAL }, | ||
435 | { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, | 443 | { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, |
436 | { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, | 444 | { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, |
437 | { "uselogin", sUseLogin, SSHCFG_GLOBAL }, | 445 | { "uselogin", sUseLogin, SSHCFG_GLOBAL }, |
@@ -473,6 +481,7 @@ static struct { | |||
473 | { "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL }, | 481 | { "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL }, |
474 | { "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL }, | 482 | { "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL }, |
475 | { "ipqos", sIPQoS, SSHCFG_ALL }, | 483 | { "ipqos", sIPQoS, SSHCFG_ALL }, |
484 | { "debianbanner", sDebianBanner, SSHCFG_GLOBAL }, | ||
476 | { NULL, sBadOption, 0 } | 485 | { NULL, sBadOption, 0 } |
477 | }; | 486 | }; |
478 | 487 | ||
@@ -1029,6 +1038,10 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1029 | intptr = &options->tcp_keep_alive; | 1038 | intptr = &options->tcp_keep_alive; |
1030 | goto parse_flag; | 1039 | goto parse_flag; |
1031 | 1040 | ||
1041 | case sPermitBlacklistedKeys: | ||
1042 | intptr = &options->permit_blacklisted_keys; | ||
1043 | goto parse_flag; | ||
1044 | |||
1032 | case sEmptyPasswd: | 1045 | case sEmptyPasswd: |
1033 | intptr = &options->permit_empty_passwd; | 1046 | intptr = &options->permit_empty_passwd; |
1034 | goto parse_flag; | 1047 | goto parse_flag; |
@@ -1431,6 +1444,10 @@ process_server_config_line(ServerOptions *options, char *line, | |||
1431 | } | 1444 | } |
1432 | break; | 1445 | break; |
1433 | 1446 | ||
1447 | case sDebianBanner: | ||
1448 | intptr = &options->debian_banner; | ||
1449 | goto parse_int; | ||
1450 | |||
1434 | case sDeprecated: | 1451 | case sDeprecated: |
1435 | logit("%s line %d: Deprecated option %s", | 1452 | logit("%s line %d: Deprecated option %s", |
1436 | filename, linenum, arg); | 1453 | filename, linenum, arg); |
@@ -1757,6 +1774,7 @@ dump_config(ServerOptions *o) | |||
1757 | dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); | 1774 | dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); |
1758 | dump_cfg_fmtint(sStrictModes, o->strict_modes); | 1775 | dump_cfg_fmtint(sStrictModes, o->strict_modes); |
1759 | dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); | 1776 | dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); |
1777 | dump_cfg_fmtint(sPermitBlacklistedKeys, o->permit_blacklisted_keys); | ||
1760 | dump_cfg_fmtint(sEmptyPasswd, o->permit_empty_passwd); | 1778 | dump_cfg_fmtint(sEmptyPasswd, o->permit_empty_passwd); |
1761 | dump_cfg_fmtint(sPermitUserEnvironment, o->permit_user_env); | 1779 | dump_cfg_fmtint(sPermitUserEnvironment, o->permit_user_env); |
1762 | dump_cfg_fmtint(sUseLogin, o->use_login); | 1780 | dump_cfg_fmtint(sUseLogin, o->use_login); |