summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/servconf.c b/servconf.c
index f311ae48d..e3939df40 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.112 2002/06/23 09:46:51 deraadt Exp $"); 13RCSID("$OpenBSD: servconf.c,v 1.115 2002/09/04 18:52:42 stevesk Exp $");
14 14
15#if defined(KRB4) 15#if defined(KRB4)
16#include <krb.h> 16#include <krb.h>
@@ -101,6 +101,7 @@ initialize_server_options(ServerOptions *options)
101 options->kbd_interactive_authentication = -1; 101 options->kbd_interactive_authentication = -1;
102 options->challenge_response_authentication = -1; 102 options->challenge_response_authentication = -1;
103 options->permit_empty_passwd = -1; 103 options->permit_empty_passwd = -1;
104 options->permit_user_env = -1;
104 options->use_login = -1; 105 options->use_login = -1;
105 options->compression = -1; 106 options->compression = -1;
106 options->allow_tcp_forwarding = -1; 107 options->allow_tcp_forwarding = -1;
@@ -158,7 +159,7 @@ fill_default_server_options(ServerOptions *options)
158 if (options->server_key_bits == -1) 159 if (options->server_key_bits == -1)
159 options->server_key_bits = 768; 160 options->server_key_bits = 768;
160 if (options->login_grace_time == -1) 161 if (options->login_grace_time == -1)
161 options->login_grace_time = 600; 162 options->login_grace_time = 120;
162 if (options->key_regeneration_time == -1) 163 if (options->key_regeneration_time == -1)
163 options->key_regeneration_time = 3600; 164 options->key_regeneration_time = 3600;
164 if (options->permit_root_login == PERMIT_NOT_SET) 165 if (options->permit_root_login == PERMIT_NOT_SET)
@@ -223,6 +224,8 @@ fill_default_server_options(ServerOptions *options)
223 options->challenge_response_authentication = 1; 224 options->challenge_response_authentication = 1;
224 if (options->permit_empty_passwd == -1) 225 if (options->permit_empty_passwd == -1)
225 options->permit_empty_passwd = 0; 226 options->permit_empty_passwd = 0;
227 if (options->permit_user_env == -1)
228 options->permit_user_env = 0;
226 if (options->use_login == -1) 229 if (options->use_login == -1)
227 options->use_login = 0; 230 options->use_login = 0;
228 if (options->compression == -1) 231 if (options->compression == -1)
@@ -257,7 +260,7 @@ fill_default_server_options(ServerOptions *options)
257 if (use_privsep == -1) 260 if (use_privsep == -1)
258 use_privsep = 1; 261 use_privsep = 1;
259 262
260#if !defined(HAVE_MMAP_ANON_SHARED) 263#ifndef HAVE_MMAP
261 if (use_privsep && options->compression == 1) { 264 if (use_privsep && options->compression == 1) {
262 error("This platform does not support both privilege " 265 error("This platform does not support both privilege "
263 "separation and compression"); 266 "separation and compression");
@@ -291,7 +294,7 @@ typedef enum {
291 sPrintMotd, sPrintLastLog, sIgnoreRhosts, 294 sPrintMotd, sPrintLastLog, sIgnoreRhosts,
292 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, 295 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
293 sStrictModes, sEmptyPasswd, sKeepAlives, 296 sStrictModes, sEmptyPasswd, sKeepAlives,
294 sUseLogin, sAllowTcpForwarding, sCompression, 297 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression,
295 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 298 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
296 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 299 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
297 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups, 300 sGatewayPorts, sPubkeyAuthentication, sXAuthLocation, sSubsystem, sMaxStartups,
@@ -354,6 +357,7 @@ static struct {
354 { "xauthlocation", sXAuthLocation }, 357 { "xauthlocation", sXAuthLocation },
355 { "strictmodes", sStrictModes }, 358 { "strictmodes", sStrictModes },
356 { "permitemptypasswords", sEmptyPasswd }, 359 { "permitemptypasswords", sEmptyPasswd },
360 { "permituserenvironment", sPermitUserEnvironment },
357 { "uselogin", sUseLogin }, 361 { "uselogin", sUseLogin },
358 { "compression", sCompression }, 362 { "compression", sCompression },
359 { "keepalive", sKeepAlives }, 363 { "keepalive", sKeepAlives },
@@ -713,6 +717,10 @@ parse_flag:
713 intptr = &options->permit_empty_passwd; 717 intptr = &options->permit_empty_passwd;
714 goto parse_flag; 718 goto parse_flag;
715 719
720 case sPermitUserEnvironment:
721 intptr = &options->permit_user_env;
722 goto parse_flag;
723
716 case sUseLogin: 724 case sUseLogin:
717 intptr = &options->use_login; 725 intptr = &options->use_login;
718 goto parse_flag; 726 goto parse_flag;