opensshd.in

Tim Rice tim at multitalents.net
Tue Jul 16 12:41:21 EST 2002


I've had the wrong sshd daemon killed by "killing using alternate method"
too many times.

Would this cause anyone any grief?


--- opensshd.in.old	Sun Oct 21 16:42:02 2001
+++ opensshd.in	Mon Jul 15 19:34:16 2002
@@ -3,11 +3,8 @@
 #
 # Stripped PRNGd out of it for the time being.

-AWK=/usr/bin/awk
 CAT=/usr/bin/cat
 KILL=/usr/bin/kill
-PS=/usr/bin/ps
-XARGS=/usr/bin/xargs

 prefix=%%openSSHDir%%
 etcdir=%%configDir%%
@@ -20,12 +17,6 @@
 HOST_KEY_DSA=$etcdir/ssh_host_dsa_key
 HOST_KEY_RSA=$etcdir/ssh_host_rsa_key

-killproc() {
-   _procname=$1
-   _signal=$2
-   ${PS} -u root | ${AWK} '/'"$_procname"'$/ {print $1}' | ${XARGS} ${KILL}
-}
-

 checkkeys() {
     if [ ! -f $HOST_KEY_RSA1 ]; then
@@ -46,8 +37,7 @@
     if [  ${PID:=0} -gt 1 -a  ! "X$PID" = "X "  ]; then
         ${KILL} ${PID}
     else
-        echo "Unable to read PID file, killing using alternate method"
-        killproc sshd TERM
+        echo "Unable to read PID file"
     fi
 }


-- 
Tim Rice				Multitalents	(707) 887-1469
tim at multitalents.net





More information about the openssh-unix-dev mailing list