summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2002-08-01 01:28:38 +0000
committerBen Lindstrom <mouring@eviladmin.org>2002-08-01 01:28:38 +0000
commit5d860f02ca352cd8e51fe266cc2e1b5d58704964 (patch)
tree72fd795930f9ce2773dfd3f61c4d3d46c638c850 /servconf.c
parent4b99be899cc47064c13d8beabc32fe5c3a8f94b5 (diff)
- markus@cvs.openbsd.org 2002/07/30 17:03:55
[auth-options.c servconf.c servconf.h session.c sshd_config sshd_config.5] add PermitUserEnvironment (off by default!); from dot@dotat.at; ok provos, deraadt
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/servconf.c b/servconf.c
index bdf39afb8..50fccdda8 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.113 2002/07/30 17:03:55 markus 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;
@@ -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)
@@ -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;