Bug 67624 - init script kills all running sshd's if listening server is stopped
Summary: init script kills all running sshd's if listening server is stopped
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: openssh
Version: rawhide
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Tomas Mraz
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-06-28 14:16 UTC by Dominic Hargreaves
Modified: 2007-11-30 22:10 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-02-04 13:44:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Dominic Hargreaves 2002-06-28 14:16:22 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 Galeon/1.2.0 (X11; Linux i686; U;) Gecko/20020412
Debian/1.2.0-6

Description of problem:
The init script /etc/init.d/sshd uses the function killproc from
/etc/rc.d/init.d/functions. This falls back to using the pidof command to get
PIDs for the daemon, if /var/run/[service].pid does not exist. This means that
if the ssh server is already stopped, instead of failing with "ssh server is not
running" or something similiar, it kills all other running sshd's, which,
obviously, kills everyone's connections to the server. This has a high inpact
if the server is remote and there is no easy console access.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.Log on via ssh
2.run /etc/init.d/sshd stop
3.run /etc/init.d/sshd stop again.
	

Actual Results:  All ssh connections to the server were closed.

Expected Results:  It should have returned with a failure to find a process to kill.

Additional info:

Comment 1 Brian Brock 2002-07-02 17:21:39 UTC
which version of openssh is installed (and showing the error)?

Comment 2 Dominic Hargreaves 2002-07-08 13:06:47 UTC
openssh-3.1p1-5 -- the most recent security update.

Comment 3 Tomas Mraz 2005-02-03 15:17:35 UTC
I have patch for this.


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