From a6df5b7cfd9c6f9f591c2d0bb5f6e9bcfbaaa8a4 Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sat, 21 Jun 2008 09:47:05 +0000 Subject: Clarify documentation of SSHD_OOM_ADJUST, and make setting it to the empty string actually skip adjustment as intended (closes: #487325). --- debian/changelog | 2 ++ debian/openssh-server.default | 3 ++- sshd.c | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a1f6ea457..ba45adfb6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -14,6 +14,8 @@ openssh (1:4.7p1-13) UNRELEASED; urgency=low takes care of that (thanks, Frans Pop; closes: #484404). * Update DEB_BUILD_OPTIONS parsing code from policy 3.8.0. * Add documentation on removing openssh-blacklist locally (see #484269). + * Clarify documentation of SSHD_OOM_ADJUST, and make setting it to the + empty string actually skip adjustment as intended (closes: #487325). * debconf template translations: - Update Romanian (thanks, Cătălin Feștilă; closes: #485415). diff --git a/debian/openssh-server.default b/debian/openssh-server.default index c4569e6c1..9680d3427 100644 --- a/debian/openssh-server.default +++ b/debian/openssh-server.default @@ -6,5 +6,6 @@ SSHD_OPTS= # OOM-killer adjustment for sshd (see # linux/Documentation/filesystems/proc.txt; lower values reduce likelihood -# of being killed, -17 = disable) +# of being killed, while -17 means the OOM-killer will ignore sshd; set to +# the empty string to skip adjustment) SSHD_OOM_ADJUST=-17 diff --git a/sshd.c b/sshd.c index ac539d6bb..9097d71ad 100644 --- a/sshd.c +++ b/sshd.c @@ -921,7 +921,7 @@ oom_adjust_startup(void) { const char *oom_adj = getenv("SSHD_OOM_ADJUST"); - if (!oom_adj) + if (!oom_adj || !*oom_adj) return; oom_adj_get(oom_adj_save, sizeof(oom_adj_save)); oom_adj_set(oom_adj); -- cgit v1.2.3