On Mon, Mar 31, 2008 at 02:47:17PM +0200, Olivier Berger wrote:
> The recently introduced OOM tweak with /proc/processnumber/oom_adj
> does not seem to be valid for SSH servers running inside a vserver if
> I get it right.
> 
> This results in upgrade being impossible :
> 
> Setting up openssh-server (1:4.7p1-6) ...
> Restarting OpenBSD Secure Shell server: sshd.
> /etc/init.d/ssh: line 78: /proc/22772/oom_adj: Operation not permitted

Drat. Thanks for the report. Does applying this change to
/etc/init.d/ssh fix it?

Index: debian/openssh-server.init
===================================================================
RCS file: /home/cjwatson/cvs/openssh/openssh/debian/openssh-server.init,v
retrieving revision 1.11
diff -p -u -r1.11 openssh-server.init
--- debian/openssh-server.init  30 Mar 2008 20:42:51 -0000      1.11
+++ debian/openssh-server.init  31 Mar 2008 13:54:42 -0000
@@ -75,7 +75,7 @@ adjust_oom() {
     if [ -e /var/run/sshd.pid ]; then
        PID="$(head -n1 /var/run/sshd.pid)"
        if [ -e "/proc/$PID/oom_adj" ]; then
-           printf '%s' "$SSHD_OOM_ADJUST" >"/proc/$PID/oom_adj"
+           printf '%s' "$SSHD_OOM_ADJUST" >"/proc/$PID/oom_adj" || true
        fi
     fi
 }

-- 
Colin Watson                                       [EMAIL PROTECTED]



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to