summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2008-05-25 22:32:48 +0000
committerColin Watson <cjwatson@debian.org>2008-05-25 22:32:48 +0000
commit1c35a89108e4c8a0913a408f0885d53c4899351a (patch)
tree790d2867539c5952fb0c7615cb1188369a6ef599 /debian
parent8f03e38340e0da0aa566551a71770f0fbc4a8e8d (diff)
Restore OOM killer adjustment for child processes (thanks, Vaclav Ovsik;
closes: #480020).
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog2
-rw-r--r--debian/openssh-server.init13
2 files changed, 3 insertions, 12 deletions
diff --git a/debian/changelog b/debian/changelog
index f0c715daf..99640e763 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -33,6 +33,8 @@ openssh (1:4.7p1-11) UNRELEASED; urgency=low
33 glitches (thanks, Petter Reinholdtsen; closes: #481018). 33 glitches (thanks, Petter Reinholdtsen; closes: #481018).
34 * Remove 0 and 6 from Default-Stop in init script (thanks, Kel Modderman; 34 * Remove 0 and 6 from Default-Stop in init script (thanks, Kel Modderman;
35 closes: #481151). 35 closes: #481151).
36 * Restore OOM killer adjustment for child processes (thanks, Vaclav Ovsik;
37 closes: #480020).
36 38
37 -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200 39 -- Colin Watson <cjwatson@debian.org> Sat, 17 May 2008 08:48:45 +0200
38 40
diff --git a/debian/openssh-server.init b/debian/openssh-server.init
index ddd1e292c..01f00dc0a 100644
--- a/debian/openssh-server.init
+++ b/debian/openssh-server.init
@@ -16,7 +16,7 @@ set -e
16test -x /usr/sbin/sshd || exit 0 16test -x /usr/sbin/sshd || exit 0
17( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0 17( /usr/sbin/sshd -\? 2>&1 | grep -q OpenSSH ) 2>/dev/null || exit 0
18 18
19SSHD_OOM_ADJUST=-17 19export SSHD_OOM_ADJUST=-17
20if test -f /etc/default/ssh; then 20if test -f /etc/default/ssh; then
21 . /etc/default/ssh 21 . /etc/default/ssh
22fi 22fi
@@ -71,15 +71,6 @@ check_config() {
71 fi 71 fi
72} 72}
73 73
74adjust_oom() {
75 if [ -e /var/run/sshd.pid ]; then
76 PID="$(head -n1 /var/run/sshd.pid)"
77 if [ -e "/proc/$PID/oom_adj" ]; then
78 printf '%s' "$SSHD_OOM_ADJUST" >"/proc/$PID/oom_adj" || true
79 fi
80 fi
81}
82
83export PATH="${PATH:+$PATH:}/usr/sbin:/sbin" 74export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
84 75
85case "$1" in 76case "$1" in
@@ -90,7 +81,6 @@ case "$1" in
90 log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd" 81 log_daemon_msg "Starting OpenBSD Secure Shell server" "sshd"
91 if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then 82 if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then
92 log_end_msg 0 83 log_end_msg 0
93 adjust_oom
94 else 84 else
95 log_end_msg 1 85 log_end_msg 1
96 fi 86 fi
@@ -124,7 +114,6 @@ case "$1" in
124 check_dev_null log_end_msg 114 check_dev_null log_end_msg
125 if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then 115 if start-stop-daemon --start --quiet --oknodo --pidfile /var/run/sshd.pid --exec /usr/sbin/sshd -- $SSHD_OPTS; then
126 log_end_msg 0 116 log_end_msg 0
127 adjust_oom
128 else 117 else
129 log_end_msg 1 118 log_end_msg 1
130 fi 119 fi