summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/servconf.c b/servconf.c
index 03b974617..91986e55d 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.c,v 1.221 2011/06/22 21:47:28 djm Exp $ */ 1/* $OpenBSD: servconf.c,v 1.222 2011/06/22 21:57:01 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -280,7 +280,7 @@ fill_default_server_options(ServerOptions *options)
280 280
281 /* Turn privilege separation on by default */ 281 /* Turn privilege separation on by default */
282 if (use_privsep == -1) 282 if (use_privsep == -1)
283 use_privsep = 1; 283 use_privsep = PRIVSEP_ON;
284 284
285#ifndef HAVE_MMAP 285#ifndef HAVE_MMAP
286 if (use_privsep && options->compression == 1) { 286 if (use_privsep && options->compression == 1) {
@@ -701,6 +701,12 @@ static const struct multistate multistate_gatewayports[] = {
701 { "no", 0 }, 701 { "no", 0 },
702 { NULL, -1 } 702 { NULL, -1 }
703}; 703};
704static const struct multistate multistate_privsep[] = {
705 { "sandbox", PRIVSEP_SANDBOX },
706 { "yes", PRIVSEP_ON },
707 { "no", PRIVSEP_OFF },
708 { NULL, -1 }
709};
704 710
705int 711int
706process_server_config_line(ServerOptions *options, char *line, 712process_server_config_line(ServerOptions *options, char *line,
@@ -1066,7 +1072,8 @@ process_server_config_line(ServerOptions *options, char *line,
1066 1072
1067 case sUsePrivilegeSeparation: 1073 case sUsePrivilegeSeparation:
1068 intptr = &use_privsep; 1074 intptr = &use_privsep;
1069 goto parse_flag; 1075 multistate_ptr = multistate_privsep;
1076 goto parse_multistate;
1070 1077
1071 case sAllowUsers: 1078 case sAllowUsers:
1072 while ((arg = strdelim(&cp)) && *arg != '\0') { 1079 while ((arg = strdelim(&cp)) && *arg != '\0') {
@@ -1574,6 +1581,8 @@ fmt_intarg(ServerOpCodes code, int val)
1574 return fmt_multistate_int(val, multistate_gatewayports); 1581 return fmt_multistate_int(val, multistate_gatewayports);
1575 case sCompression: 1582 case sCompression:
1576 return fmt_multistate_int(val, multistate_compression); 1583 return fmt_multistate_int(val, multistate_compression);
1584 case sUsePrivilegeSeparation:
1585 return fmt_multistate_int(val, multistate_privsep);
1577 case sProtocol: 1586 case sProtocol:
1578 switch (val) { 1587 switch (val) {
1579 case SSH_PROTO_1: 1588 case SSH_PROTO_1: