FS#18799 - sshd rc script incorrectly identifying PID of existing instances
Attached to Project:
Arch Linux
Opened by Phillip Smith (fukawi2) - Tuesday, 23 March 2010, 03:26 GMT
Last edited by Allan McRae (Allan) - Wednesday, 24 March 2010, 02:43 GMT
Opened by Phillip Smith (fukawi2) - Tuesday, 23 March 2010, 03:26 GMT
Last edited by Allan McRae (Allan) - Wednesday, 24 March 2010, 02:43 GMT
|
Details
Description:
The rc script for sshd currently uses the following line to determine the PID of any running daemons: PID=$(pidof -o %PPID /usr/sbin/sshd) This incorrectly matches any processes of users *already* logged in, even if the actual listening daemon is not running. Perhaps a better way is to use pgrep or `netstat -tnlp | egrep '/sshd$'` Additional info: Version : 5.3p1-4 Steps to reproduce: 1) Login via SSH 2) Shutdown the sshd daemon 3) Attempt the restart the daemon. It will fail because the PID identification line above incorrectly matches the sshd process of your login. |
This task depends upon
PS: Just noticed: this version is still in testing though.