- (dtucker) [contrib/cygwin/ssh-host-config] Ensure entries in /etc/services

are created correctly with CRLF line terminations.  Patch from vinschen at
   redhat.com.
This commit is contained in:
Darren Tucker 2003-11-03 18:59:29 +11:00
parent 2bdacad70c
commit 7c582db74b
2 changed files with 23 additions and 17 deletions

View File

@ -1,3 +1,8 @@
20031103
- (dtucker) [contrib/cygwin/ssh-host-config] Ensure entries in /etc/services
are created correctly with CRLF line terminations. Patch from vinschen at
redhat.com.
20031021 20031021
- (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords - (dtucker) [INSTALL] Some system crypt() functions support MD5 passwords
directly. Noted by Darren.Moffat at sun.com. directly. Noted by Darren.Moffat at sun.com.
@ -1371,4 +1376,4 @@
- Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
Report from murple@murple.net, diagnosis from dtucker@zip.com.au Report from murple@murple.net, diagnosis from dtucker@zip.com.au
$Id: ChangeLog,v 1.3085 2003/10/21 12:27:08 dtucker Exp $ $Id: ChangeLog,v 1.3086 2003/11/03 07:59:29 dtucker Exp $

View File

@ -468,19 +468,21 @@ then
fi fi
# Care for services file # Care for services file
_my_etcdir="/ssh-host-config.$$"
if [ $_nt -gt 0 ] if [ $_nt -gt 0 ]
then then
_wservices="${SYSTEMROOT}\\system32\\drivers\\etc\\services" _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc"
_wserv_tmp="${SYSTEMROOT}\\system32\\drivers\\etc\\srv.out.$$" _services="${_my_etcdir}/services"
else else
_wservices="${WINDIR}\\SERVICES" _win_etcdir="${WINDIR}"
_wserv_tmp="${WINDIR}\\SERV.$$" _services="${_my_etcdir}/SERVICES"
fi fi
_services=`cygpath -u "${_wservices}"` _serv_tmp="${_my_etcdir}/srv.out.$$"
_serv_tmp=`cygpath -u "${_wserv_tmp}"`
mount -t -f "${_wservices}" "${_services}" mount -t -f "${_win_etcdir}" "${_my_etcdir}"
mount -t -f "${_wserv_tmp}" "${_serv_tmp}"
# Depends on the above mount
_wservices=`cygpath -w "${_services}"`
# Remove sshd 22/port from services # Remove sshd 22/port from services
if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ] if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ]
@ -490,13 +492,13 @@ then
then then
if mv "${_serv_tmp}" "${_services}" if mv "${_serv_tmp}" "${_services}"
then then
echo "Removing sshd from ${_services}" echo "Removing sshd from ${_wservices}"
else else
echo "Removing sshd from ${_services} failed\!" echo "Removing sshd from ${_wservices} failed\!"
fi fi
rm -f "${_serv_tmp}" rm -f "${_serv_tmp}"
else else
echo "Removing sshd from ${_services} failed\!" echo "Removing sshd from ${_wservices} failed\!"
fi fi
fi fi
@ -508,18 +510,17 @@ then
then then
if mv "${_serv_tmp}" "${_services}" if mv "${_serv_tmp}" "${_services}"
then then
echo "Added ssh to ${_services}" echo "Added ssh to ${_wservices}"
else else
echo "Adding ssh to ${_services} failed\!" echo "Adding ssh to ${_wservices} failed\!"
fi fi
rm -f "${_serv_tmp}" rm -f "${_serv_tmp}"
else else
echo "Adding ssh to ${_services} failed\!" echo "Adding ssh to ${_wservices} failed\!"
fi fi
fi fi
umount "${_services}" umount "${_my_etcdir}"
umount "${_serv_tmp}"
# Care for inetd.conf file # Care for inetd.conf file
_inetcnf="${SYSCONFDIR}/inetd.conf" _inetcnf="${SYSCONFDIR}/inetd.conf"