summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authordjm <djm>2002-06-21 06:20:44 +0000
committerdjm <djm>2002-06-21 06:20:44 +0000
commit6ca9089837cdb5bbc42246b5962e41af2632dd11 (patch)
tree00792d3e6ff5efc477a953a6d05232a7c905d925 /servconf.c
parent8dc1bab6a7bd093716b2dff2fd02502f0f830a24 (diff)
downloadopenssh-6ca9089837cdb5bbc42246b5962e41af2632dd11.tar.gz
- (djm) Warn and disable compression on platforms which can't handle both
useprivilegeseparation=yes and compression=yes
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/servconf.c b/servconf.c
index b7f941ab..fb6332c3 100644
--- a/servconf.c
+++ b/servconf.c
@@ -256,6 +256,16 @@ fill_default_server_options(ServerOptions *options)
/* Turn privilege separation on by default */
if (use_privsep == -1)
use_privsep = 1;
+
+#if !defined(HAVE_MMAP) || !defined(MAP_ANON)
+ if (use_privsep && options->compression == 1) {
+ error("This platform does not support both privilege "
+ "separation and compression");
+ error("Compression disabled");
+ options->compression = 0;
+ }
+#endif
+
}
/* Keyword tokens. */