summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c
index 4d5eb53ae..8e876d1f1 100644
--- a/servconf.c
+++ b/servconf.c
@@ -10,7 +10,7 @@
10 */ 10 */
11 11
12#include "includes.h" 12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.74 2001/04/06 22:25:25 stevesk Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.75 2001/04/12 19:15:25 markus Exp $");
14 14
15#ifdef KRB4 15#ifdef KRB4
16#include <krb.h> 16#include <krb.h>
@@ -67,6 +67,8 @@ initialize_server_options(ServerOptions *options)
67 options->log_level = (LogLevel) - 1; 67 options->log_level = (LogLevel) - 1;
68 options->rhosts_authentication = -1; 68 options->rhosts_authentication = -1;
69 options->rhosts_rsa_authentication = -1; 69 options->rhosts_rsa_authentication = -1;
70 options->hostbased_authentication = -1;
71 options->hostbased_uses_name_from_packet_only = -1;
70 options->rsa_authentication = -1; 72 options->rsa_authentication = -1;
71 options->pubkey_authentication = -1; 73 options->pubkey_authentication = -1;
72#ifdef KRB4 74#ifdef KRB4
@@ -156,6 +158,10 @@ fill_default_server_options(ServerOptions *options)
156 options->rhosts_authentication = 0; 158 options->rhosts_authentication = 0;
157 if (options->rhosts_rsa_authentication == -1) 159 if (options->rhosts_rsa_authentication == -1)
158 options->rhosts_rsa_authentication = 0; 160 options->rhosts_rsa_authentication = 0;
161 if (options->hostbased_authentication == -1)
162 options->hostbased_authentication = 0;
163 if (options->hostbased_uses_name_from_packet_only == -1)
164 options->hostbased_uses_name_from_packet_only = 0;
159 if (options->rsa_authentication == -1) 165 if (options->rsa_authentication == -1)
160 options->rsa_authentication = 1; 166 options->rsa_authentication = 1;
161 if (options->pubkey_authentication == -1) 167 if (options->pubkey_authentication == -1)
@@ -219,7 +225,8 @@ typedef enum {
219 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 225 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
220 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 226 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
221 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, 227 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups,
222 sBanner, sReverseMappingCheck 228 sBanner, sReverseMappingCheck, sHostbasedAuthentication,
229 sHostbasedUsesNameFromPacketOnly
223} ServerOpCodes; 230} ServerOpCodes;
224 231
225/* Textual representation of the tokens. */ 232/* Textual representation of the tokens. */
@@ -239,6 +246,8 @@ static struct {
239 { "loglevel", sLogLevel }, 246 { "loglevel", sLogLevel },
240 { "rhostsauthentication", sRhostsAuthentication }, 247 { "rhostsauthentication", sRhostsAuthentication },
241 { "rhostsrsaauthentication", sRhostsRSAAuthentication }, 248 { "rhostsrsaauthentication", sRhostsRSAAuthentication },
249 { "hostbasedauthentication", sHostbasedAuthentication },
250 { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly },
242 { "rsaauthentication", sRSAAuthentication }, 251 { "rsaauthentication", sRSAAuthentication },
243 { "pubkeyauthentication", sPubkeyAuthentication }, 252 { "pubkeyauthentication", sPubkeyAuthentication },
244 { "dsaauthentication", sPubkeyAuthentication }, /* alias */ 253 { "dsaauthentication", sPubkeyAuthentication }, /* alias */
@@ -537,6 +546,14 @@ parse_flag:
537 intptr = &options->rhosts_rsa_authentication; 546 intptr = &options->rhosts_rsa_authentication;
538 goto parse_flag; 547 goto parse_flag;
539 548
549 case sHostbasedAuthentication:
550 intptr = &options->hostbased_authentication;
551 goto parse_flag;
552
553 case sHostbasedUsesNameFromPacketOnly:
554 intptr = &options->hostbased_uses_name_from_packet_only;
555 goto parse_flag;
556
540 case sRSAAuthentication: 557 case sRSAAuthentication:
541 intptr = &options->rsa_authentication; 558 intptr = &options->rsa_authentication;
542 goto parse_flag; 559 goto parse_flag;