[PATCH] Add service dependency to network

Corinna Vinschen vinschen at redhat.com
Mon Jan 9 23:49:41 EST 2006


Hi,

Cygwin only:

Under some circumstances, the sshd service gets accidentally started
*before* the network service has been started up.  The reason that this
can happen is, that the sshd service gets installed without a dependency
to the network service in contrib/cygwin/ssh-host-config so far.

The below patch fixes that by adding a dependency to the "tcpip" Windows
service.  This should solve the problem sufficiently.  Please apply.


Thanks,
Corinna


Index: contrib/cygwin/ssh-host-config
===================================================================
RCS file: /cvs/openssh_cvs/contrib/cygwin/ssh-host-config,v
retrieving revision 1.17
diff -p -u -r1.17 ssh-host-config
--- contrib/cygwin/ssh-host-config	9 May 2005 13:48:17 -0000	1.17
+++ contrib/cygwin/ssh-host-config	9 Jan 2006 12:45:45 -0000
@@ -551,14 +551,14 @@ then
       [ -z "${_cygwin}" ] && _cygwin="ntsec"
       if [ $_nt2003 -gt 0 -a "${sshd_server_in_sam}" = "yes" ]
       then
-	if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -u sshd_server -w "${_password}" -e "CYGWIN=${_cygwin}"
+	if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -u sshd_server -w "${_password}" -e "CYGWIN=${_cygwin}" -y tcpip
 	then
 	  echo
 	  echo "The service has been installed under sshd_server account."
 	  echo "To start the service, call \`net start sshd' or \`cygrunsrv -S sshd'."
 	fi
       else
-	if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}"
+	if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}" -y tcpip
 	then
 	  echo
 	  echo "The service has been installed under LocalSystem account."


-- 
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat




More information about the openssh-unix-dev mailing list