summaryrefslogtreecommitdiffstats
path: root/servconf.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-06-21 08:20:44 +0200
committerDamien Miller <djm@mindrot.org>2002-06-21 08:20:44 +0200
commit4903eb4b7461081c9a55cff3a4075fa3311e5e23 (patch)
tree84226438eb9e2ced41f0b9847757146deab9c41e /servconf.c
parent - ID sync for auth-passwd.c (diff)
downloadopenssh-4903eb4b7461081c9a55cff3a4075fa3311e5e23.tar.xz
openssh-4903eb4b7461081c9a55cff3a4075fa3311e5e23.zip
- (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 b7f941ab5..fb6332c31 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. */