Bug 33851 - OpenSSH 2.5 packages do not correctly restart the server
OpenSSH 2.5 packages do not correctly restart the server
Status: CLOSED DUPLICATE of bug 33633
Product: Red Hat Linux
Classification: Retired
Component: openssh (Show other bugs)
i386 Linux
medium Severity high
: ---
: ---
Assigned To: Nalin Dahyabhai
Depends On:
  Show dependency treegraph
Reported: 2001-03-29 09:38 EST by Phil Mayers
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-03-29 09:38:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Phil Mayers 2001-03-29 09:38:40 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

The OpenSSH-2.3.0p1-4 to openssh-2.5.2p2-1.7 RPM update dated Mar 27 does 
not correctly restart the sshd - when installed on a machine, if someone 
is logged in over SSH, the server will not restart. This did not happen 
with the 2.1.1p4-1 to 2.3 upgrade

Reproducible: Always
Steps to Reproduce:
1. Login over SSH
2. rpm -Uvh openssh-server-2.5.2p2-1.7.i386.rpm
3. ps faux | grep sshd

Actual Results:  The SSH daemon was not restarted, and remote logins to 
the machine were not possible.

Expected Results:  The SSH daemon would be correctly restarted :o)

The file /var/lock/subsys/sshd appears to still be present after upgrading 
from 2.3 to 2.5 - In fact...

After further investigation, here's what happened: In 2.3.0, the start 
function of the init script did this:

echo starting

Or something like that. The new init script does this:

echo starting
daemon /usr/sbin/sshd

This function (daemon) does this:

        # See if it's already running.
        pidlist=`pidofproc $1`

        for apid in $pidlist ; do
           [ -d /proc/$apid ] && pid="$pid $apid"

        [ -n "$pid" ] && return

So, if someone is logged in (say, with an SSH PID of 2345), this will 

pidlist <- "2345"
pid = " 2345"
[ -n "2345" ] && return

...And returns without starting the SSHD. In *fact*, this init script will 
*never* start SSHD if someone is logged in, since pidofproc will always 
return a value, and the shell above will fail to get past the return 

I'd pull the 2.5 package if I were you, and hope that all you downstream 
mirrors are checking for file removal (hint: www.mirror.ac.uk don't)


| Phil Mayers, Network Support     |
| Centre for Computing Services    |
| Imperial College                 |
Comment 1 Bill Nottingham 2001-03-29 10:54:07 EST

*** This bug has been marked as a duplicate of 33633 ***

Note You need to log in before you can comment on or make changes to this bug.