summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-06-21 16:20:44 +1000
committerDamien Miller <djm@mindrot.org>2002-06-21 16:20:44 +1000
commit4903eb4b7461081c9a55cff3a4075fa3311e5e23 (patch)
tree84226438eb9e2ced41f0b9847757146deab9c41e
parent444f9fca60cb9f331e5add08bf398aaa47dd3ed6 (diff)
- (djm) Warn and disable compression on platforms which can't handle both
useprivilegeseparation=yes and compression=yes
-rw-r--r--ChangeLog4
-rw-r--r--servconf.c10
2 files changed, 13 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index e19e8d6d..84212ea1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
Don't initialise compression buffers when compression=no in sshd_config;
ok Niels@
- ID sync for auth-passwd.c
+ - (djm) Warn and disable compression on platforms which can't handle both
+ useprivilegeseparation=yes and compression=yes
20020620
- (bal) Fixed AIX environment handling, use setpcred() instead of existing
@@ -994,4 +996,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
-$Id: ChangeLog,v 1.2236 2002/06/21 06:05:12 djm Exp $
+$Id: ChangeLog,v 1.2237 2002/06/21 06:20:44 djm Exp $
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. */