summaryrefslogtreecommitdiff
path: root/servconf.c
diff options
context:
space:
mode:
authordtucker@openbsd.org <dtucker@openbsd.org>2020-01-23 10:24:29 +0000
committerDarren Tucker <dtucker@dtucker.net>2020-01-23 21:53:54 +1100
commit7f8e66fea8c4e2a910df9067cb7638999b7764d5 (patch)
tree88c1a4a73a03cfa993fee0c1f23b6327ef1351a1 /servconf.c
parent69ac4e33023b379e9a8e9b4b6aeeffa6d1fcf6fa (diff)
upstream: Make zlib optional. This adds a "ZLIB" build time option
that allows building without zlib compression and associated options. With feedback from markus@, ok djm@ OpenBSD-Commit-ID: 44c6e1133a90fd15a3aa865bdedc53bab28b7910
Diffstat (limited to 'servconf.c')
-rw-r--r--servconf.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/servconf.c b/servconf.c
index 1a4c49907..1e0718139 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,5 +1,5 @@
1 1
2/* $OpenBSD: servconf.c,v 1.358 2020/01/23 02:46:49 dtucker Exp $ */ 2/* $OpenBSD: servconf.c,v 1.359 2020/01/23 10:24:29 dtucker Exp $ */
3/* 3/*
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
5 * All rights reserved 5 * All rights reserved
@@ -384,7 +384,12 @@ fill_default_server_options(ServerOptions *options)
384 options->permit_user_env_whitelist = NULL; 384 options->permit_user_env_whitelist = NULL;
385 } 385 }
386 if (options->compression == -1) 386 if (options->compression == -1)
387#ifdef WITH_ZLIB
387 options->compression = COMP_DELAYED; 388 options->compression = COMP_DELAYED;
389#else
390 options->compression = COMP_NONE;
391#endif
392
388 if (options->rekey_limit == -1) 393 if (options->rekey_limit == -1)
389 options->rekey_limit = 0; 394 options->rekey_limit = 0;
390 if (options->rekey_interval == -1) 395 if (options->rekey_interval == -1)
@@ -1213,8 +1218,10 @@ static const struct multistate multistate_permitrootlogin[] = {
1213 { NULL, -1 } 1218 { NULL, -1 }
1214}; 1219};
1215static const struct multistate multistate_compression[] = { 1220static const struct multistate multistate_compression[] = {
1221#ifdef WITH_ZLIB
1216 { "yes", COMP_DELAYED }, 1222 { "yes", COMP_DELAYED },
1217 { "delayed", COMP_DELAYED }, 1223 { "delayed", COMP_DELAYED },
1224#endif
1218 { "no", COMP_NONE }, 1225 { "no", COMP_NONE },
1219 { NULL, -1 } 1226 { NULL, -1 }
1220}; 1227};