Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-04 Thread Christopher Faylor
On Mon, Nov 03, 2003 at 09:19:59PM -0500, Pierre A. Humblet wrote:
>At 08:06 PM 11/3/2003 +0100, Corinna Vinschen wrote:
>>On Mon, Nov 03, 2003 at 01:39:56PM -0500, Pierre A. Humblet wrote:
>>> On Mon, Nov 03, 2003 at 05:31:15PM +0100, Corinna Vinschen wrote:
>>> >
>>> > I see.  I'll create a patch.
>>>  
>>> I started one already, must still compile and test.
>>> Let me know if you proceed on your side.
>>
>>I have a patch ready and it seems to work fine(tm).  Would you mind
>>to give it a try on 95?  Patch below.
>
>Turns out your patch is identical to mine (there is no need to 
>initialize protolen), and it worked on Win95, but a few things 
>trouble me in the reused code:
>
>1) The test "IsBadReadPtr (src->s_proto ..." will unduly fail on Win95
>   if the 16 lsb of the first alias address are the 16 msb of a readable
>   memory address. I don't see why that's impossible. If would safer 
>   to have a wincap entry, or (horror !), testing wincap.osname ().

In my testing, I never saw that, and we've never gotten a bug report to
that effect, IIRC.  I thought that the double check of this pointer made
it pretty safe.

>2) The test "&& !IsBadReadPtr (((pservent *) src) " should never fail
>   when it is reached, but should it fail, s_proto would be assigned an
>   invalid address and the program would crash. So if that test is kept
>   it should be part of a if .. else if ..  (leaving s_proto NULL).
>3) Strictly speaking, we should use IsBadStringPtr..

Yes, and strictly speaking, we should be checking all of the fields in
this structure.

I'll check in an "IsStringPtr" patch.

cgf

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-03 Thread Pierre A. Humblet
At 08:06 PM 11/3/2003 +0100, Corinna Vinschen wrote:
>On Mon, Nov 03, 2003 at 01:39:56PM -0500, Pierre A. Humblet wrote:
>> On Mon, Nov 03, 2003 at 05:31:15PM +0100, Corinna Vinschen wrote:
>> >
>> > I see.  I'll create a patch.
>>  
>> I started one already, must still compile and test.
>> Let me know if you proceed on your side.
>
>I have a patch ready and it seems to work fine(tm).  Would you mind
>to give it a try on 95?  Patch below.

Turns out your patch is identical to mine (there is no need to 
initialize protolen), and it worked on Win95, but a few things 
trouble me in the reused code:

1) The test "IsBadReadPtr (src->s_proto ..." will unduly fail on Win95
   if the 16 lsb of the first alias address are the 16 msb of a readable
   memory address. I don't see why that's impossible. If would safer 
   to have a wincap entry, or (horror !), testing wincap.osname ().
2) The test "&& !IsBadReadPtr (((pservent *) src) " should never fail
   when it is reached, but should it fail, s_proto would be assigned an
   invalid address and the program would crash. So if that test is kept
   it should be part of a if .. else if ..  (leaving s_proto NULL).
3) Strictly speaking, we should use IsBadStringPtr..

Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-03 Thread Corinna Vinschen
On Mon, Nov 03, 2003 at 01:39:56PM -0500, Pierre A. Humblet wrote:
> On Mon, Nov 03, 2003 at 05:31:15PM +0100, Corinna Vinschen wrote:
> > On Sun, Nov 02, 2003 at 09:43:14AM -0500, Pierre A. Humblet wrote:
> > > Pierre A. Humblet wrote:
> > > 
> > > > The real problem is that the s_proto pointer of the struct servent
> > > > returned by the Windows getservbyname on Win95 is invalid. 
> > > 
> > > Looking at net.cc, this problem seems to be well known.
> > > However the workaround is only applied when copying the string,
> > > not when computing its length.
> > 
> > I see.  I'll create a patch.
>  
> I started one already, must still compile and test.
> Let me know if you proceed on your side.

I have a patch ready and it seems to work fine(tm).  Would you mind
to give it a try on 95?  Patch below.

Corinna

Index: net.cc
===
RCS file: /cvs/src/src/winsup/cygwin/net.cc,v
retrieving revision 1.154
diff -u -p -r1.154 net.cc
--- net.cc  25 Sep 2003 00:37:17 -  1.154
+++ net.cc  3 Nov 2003 19:06:12 -
@@ -499,8 +499,21 @@ dup_ent (void *old, void *src0, struct_t
   /* Do servent/hostent specific processing */
   int protolen = 0;
   int addr_list_len = 0;
+  char *s_proto = NULL;
   if (type == is_servent)
-sz += (protolen = strlen_round (src->s_proto));
+{
+  if (src->s_proto)
+   {
+ /* Windows 95 idiocy.  Structure is misaligned on Windows 95.
+Kludge around this by trying a different pointer alignment.  */
+ if (IsBadReadPtr (src->s_proto, sizeof (src->s_proto))
+ && !IsBadReadPtr (((pservent *) src)->s_proto, sizeof (src->s_proto)))
+   s_proto = ((pservent *) src)->s_proto;
+ else
+   s_proto = src->s_proto;
+   }
+  sz += (protolen = strlen_round (s_proto));
+}
   else if (type == is_hostent)
 {
   /* Calculate the length and storage used for h_addr_list */
@@ -549,16 +562,8 @@ dup_ent (void *old, void *src0, struct_t
   /* Do servent/hostent specific processing. */
   if (type == is_servent)
{
- if (src->s_proto)
+ if (s_proto)
{
- char *s_proto;
- /* Windows 95 idiocy.  Structure is misaligned on Windows 95.
-Kludge around this by trying a different pointer alignment.  */
- if (IsBadReadPtr (src->s_proto, sizeof (src->s_proto))
- && !IsBadReadPtr (((pservent *) src)->s_proto, sizeof 
(src->s_proto)))
-   s_proto = ((pservent *) src)->s_proto;
- else
-   s_proto = src->s_proto;
  strcpy (dst->s_proto = dp, s_proto);
  dp += protolen;
}


-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-03 Thread Pierre A. Humblet
On Mon, Nov 03, 2003 at 05:31:15PM +0100, Corinna Vinschen wrote:
> On Sun, Nov 02, 2003 at 09:43:14AM -0500, Pierre A. Humblet wrote:
> > Pierre A. Humblet wrote:
> > 
> > > The real problem is that the s_proto pointer of the struct servent
> > > returned by the Windows getservbyname on Win95 is invalid. 
> > 
> > Looking at net.cc, this problem seems to be well known.
> > However the workaround is only applied when copying the string,
> > not when computing its length.
> 
> I see.  I'll create a patch.
 
I started one already, must still compile and test.
Let me know if you proceed on your side.

Pierre

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-03 Thread Corinna Vinschen
On Sun, Nov 02, 2003 at 09:43:14AM -0500, Pierre A. Humblet wrote:
> Pierre A. Humblet wrote:
> 
> > The real problem is that the s_proto pointer of the struct servent
> > returned by the Windows getservbyname on Win95 is invalid. 
> 
> Looking at net.cc, this problem seems to be well known.
> However the workaround is only applied when copying the string,
> not when computing its length.

I see.  I'll create a patch.

Thanks for the hint,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-02 Thread Pierre A. Humblet
Pierre A. Humblet wrote:

> The real problem is that the s_proto pointer of the struct servent
> returned by the Windows getservbyname on Win95 is invalid. 

Looking at net.cc, this problem seems to be well known.
However the workaround is only applied when copying the string,
not when computing its length.

Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-01 Thread Pierre A. Humblet
At 01:27 PM 11/1/2003 +0100, you wrote:
>On Fri, Oct 31, 2003 at 07:05:41PM -0500, Pierre A. Humblet wrote:
>> At 11:52 AM 10/31/2003 +0100, Corinna Vinschen wrote:
>> >I've just again tested it on 98 and it works fine.  Could you please
>> >figure out what happens on your machine?
>> 
>> 2 things:
>> - I had accidentally deleted the next (23) line in services, so awk 
>>   didn't find the pattern.
>
>Ok, so how do you suggest to react in the script if that happens?
>Should the script just emit a warning or should it append the ssh lines
>at the end of the services file?  The new script will just emit a
>warning for now.

Both solutions are fine with me. 
 
>> - ssh crashes even with the CR. I also had to shorten the line. It works
>>   with 18 spaces between {tcp,udp} and the #
>
>Ouch.  How many spaces do I emit currently... hmm, 27.  This matches
>the file layout on NT.  A quick look on a 98 machine... yes, only
>18 spaces.  Oh boy...
>
>> Please send the next version, just to be sure.
>
>I've created a new script and attached it to this mail.

I have just spent a few hours on this :(

What I wrote initially is correct: ssh doesn't crash when the ssh
lines are removed from the services file.

But neither having a CR nor shortening the line have much 
to do with the problem. 
The only reason they made a difference is that I had the services
file opened in Word. In that case the getservbyname call fails
cleanly and ssh uses the default.

The real problem is that the s_proto pointer of the struct servent
returned by the Windows getservbyname on Win95 is invalid. 
That didn't matter before dup_ent was introduced.
The problem concerns all services, not only ssh, and also
affects getservbyport.

[EMAIL PROTECTED] ~
$ gcc getserv.c -mno-cygwin -lwsock32

[EMAIL PROTECTED] ~
$ ./a 25
ptr = 410732
name 4107cc smtp
aliases:
0, 4107e9 mail
port 25
Checking validy of ptr->s_proto 7e90041

(IsBadStringPtr returns true)

On Win98 one gets
~: ./a 25
ptr = 861400
name 86141d smtp
aliases:
0, 861418 mail
port 25
Checking validy of ptr->s_proto 861422
proto tcp

I attach the getserv.c program, in case others want to experiment.
A solution would be to use IsBadStringPtr (or wincap) in dup_ent.
A workaround is to delete lines in the services file.

Pierre

/*  gcc getserv.c -lwsock32 -mno-cygwin */
#define __USE_W32_SOCKETS

#include 
#include 
#if defined(__CYGWIN__) && !defined(__USE_W32_SOCKETS)
#include 
#endif

main(int argc, char * argv[] )
{
  struct servent * ptr;
  int i;

#ifdef __USE_W32_SOCKETS
  WORD wVersionRequested;
  WSADATA wsaData;
  int err;

  wVersionRequested = MAKEWORD( 2, 2 );

  err = WSAStartup( wVersionRequested, &wsaData );
  if ( err != 0 ) {
printf("Cannot initialize\n");
return;
  }
#endif

  if (argc < 2) {
printf("Need argument\n");
exit(1);
  }
  if (!isdigit(*argv[1]))
ptr = getservbyname (argv[1], "tcp");
  else
ptr = getservbyport (ntohs (atoi (argv[1])), "tcp");
  printf("ptr = %x\n", ptr);

  if (ptr)
  {
printf("name %x %s\n", ptr->s_name, ptr->s_name? ptr->s_name : "NULL");
printf("aliases:\n");
for (i = 0; ptr->s_aliases[i]; i++)
  printf("%d, %x %s\n", i, ptr->s_aliases[i], ptr->s_aliases[i]);
printf("port %d\n", (int) ntohs(ptr->s_port));
printf("Checking validy of ptr->s_proto %x\n", ptr->s_proto);
if (!IsBadStringPtr (ptr->s_proto, 10))
  printf("proto %s\n", ptr->s_proto);

   }
  exit (0);
}


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/

Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-11-01 Thread Corinna Vinschen
On Fri, Oct 31, 2003 at 07:05:41PM -0500, Pierre A. Humblet wrote:
> At 11:52 AM 10/31/2003 +0100, Corinna Vinschen wrote:
> >I've just again tested it on 98 and it works fine.  Could you please
> >figure out what happens on your machine?
> 
> 2 things:
> - I had accidentally deleted the next (23) line in services, so awk 
>   didn't find the pattern.

Ok, so how do you suggest to react in the script if that happens?
Should the script just emit a warning or should it append the ssh lines
at the end of the services file?  The new script will just emit a
warning for now.

> - ssh crashes even with the CR. I also had to shorten the line. It works
>   with 18 spaces between {tcp,udp} and the #

Ouch.  How many spaces do I emit currently... hmm, 27.  This matches
the file layout on NT.  A quick look on a 98 machine... yes, only
18 spaces.  Oh boy...

> Please send the next version, just to be sure.

I've created a new script and attached it to this mail.

Changes:

- Emit a warning if ssh couldn't be added to services file.
- Accomodate different service file layout on 9x and NT.
- On NT: Only ask for installing sshd as service if it's not
  already installed.

Please give it a try,
Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.
#!/bin/sh
#
# ssh-host-config, Copyright 2000, 2001, 2002, 2003 Red Hat Inc.
#
# This file is part of the Cygwin port of OpenSSH.

# Subdirectory where the new package is being installed
PREFIX=/usr

# Directory where the config files are stored
SYSCONFDIR=/etc
LOCALSTATEDIR=/var

progname=$0
auto_answer=""
port_number=22

privsep_configured=no
privsep_used=yes
sshd_in_passwd=no
sshd_in_sam=no

request()
{
  if [ "${auto_answer}" = "yes" ]
  then
return 0
  elif [ "${auto_answer}" = "no" ]
  then
return 1
  fi

  answer=""
  while [ "X${answer}" != "Xyes" -a "X${answer}" != "Xno" ]
  do
echo -n "$1 (yes/no) "
read answer
  done
  if [ "X${answer}" = "Xyes" ]
  then
return 0
  else
return 1
  fi
}

# Check options

while :
do
  case $# in
  0)
break
;;
  esac

  option=$1
  shift

  case "$option" in
  -d | --debug )
set -x
;;

  -y | --yes )
auto_answer=yes
;;

  -n | --no )
auto_answer=no
;;

  -p | --port )
port_number=$1
shift
;;

  *)
echo "usage: ${progname} [OPTION]..."
echo
echo "This script creates an OpenSSH host configuration."
echo
echo "Options:"
echo "--debug  -d Enable shell's debug output."
echo "--yes-y Answer all questions with \"yes\" automatically."
echo "--no -n Answer all questions with \"no\" automatically."
echo "--port   -p  sshd listens on port n."
echo
exit 1
;;

  esac
done

# Check if running on NT
_sys="`uname -a`"
_nt=`expr "$_sys" : "CYGWIN_NT"`

# Check for running ssh/sshd processes first. Refuse to do anything while
# some ssh processes are still running

if ps -ef | grep -v grep | grep -q ssh
then
  echo
  echo "There are still ssh processes running. Please shut them down first."
  echo
  exit 1
fi

# Check for ${SYSCONFDIR} directory

if [ -e "${SYSCONFDIR}" -a ! -d "${SYSCONFDIR}" ]
then
  echo
  echo "${SYSCONFDIR} is existant but not a directory."
  echo "Cannot create global configuration files."
  echo
  exit 1
fi

# Create it if necessary

if [ ! -e "${SYSCONFDIR}" ]
then
  mkdir "${SYSCONFDIR}"
  if [ ! -e "${SYSCONFDIR}" ]
  then
echo
echo "Creating ${SYSCONFDIR} directory failed"
echo
exit 1
  fi
fi

# Create /var/log and /var/log/lastlog if not already existing

if [ -f ${LOCALSTATEDIR}/log ]
then
  echo "Creating ${LOCALSTATEDIR}/log failed!"
else
  if [ ! -d ${LOCALSTATEDIR}/log ]
  then
mkdir -p ${LOCALSTATEDIR}/log
  fi
  if [ -d ${LOCALSTATEDIR}/log/lastlog ]
  then
chmod 777 ${LOCALSTATEDIR}/log/lastlog
  elif [ ! -f ${LOCALSTATEDIR}/log/lastlog ]
  then
cat /dev/null > ${LOCALSTATEDIR}/log/lastlog
chmod 666 ${LOCALSTATEDIR}/log/lastlog
  fi
fi

# Create /var/empty file used as chroot jail for privilege separation
if [ -f ${LOCALSTATEDIR}/empty ]
then
  echo "Creating ${LOCALSTATEDIR}/empty failed!"
else
  mkdir -p ${LOCALSTATEDIR}/empty
  if [ $_nt -gt 0 ]
  then
chmod 755 ${LOCALSTATEDIR}/empty
  fi
fi

# First generate host keys if not already existing

if [ ! -f "${SYSCONFDIR}/ssh_host_key" ]
then
  echo "Generating ${SYSCONFDIR}/ssh_host_key"
  ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '' > /dev/null
fi

if [ ! -f "${SYSCONFDIR}/ssh_host_rsa_key" ]
then
  echo "Generating ${SYSCONFDIR}/ssh_host_rsa_key"
  ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' > /dev/null
fi

if [ ! -f "${SYSCONFDIR}/ssh_host_dsa_key" ]
then
  echo "Generating ${SYSCONFDIR}/ssh_host_dsa_key"
  ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' > /dev/null
fi

# Check if ssh_config exists. If yes, ask for overwriting

if 

Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-31 Thread Pierre A. Humblet
At 11:52 AM 10/31/2003 +0100, Corinna Vinschen wrote:
>I've just again tested it on 98 and it works fine.  Could you please
>figure out what happens on your machine?

2 things:
- I had accidentally deleted the next (23) line in services, so awk 
  didn't find the pattern.
- ssh crashes even with the CR. I also had to shorten the line. It works
  with 18 spaces between {tcp,udp} and the #
Please send the next version, just to be sure.

Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95.

2003-10-31 Thread Christian Weinberger
Rodrigo Medina <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

> I have been using cygwin 1.3.22 in a W95 machine with no problems.
> I am now installing cygwin 1.5.5 in another W95 machine. I get the
> following crash:
> 
> bash-2.05b$ ssh -l rmedina pion
> Segmentation fault (core dumped)
> bash-2.05b$ 
> 
> Rodrigo Medina
> 

My further tests showed up that my ssh crash had a different cause:

I´ve two users, root and ssh. ssh is the owner for the sshd that I run.

When I call "ssh localhost" from each of the two users, it works fine.
But when I do a su to switch to the other user, the ssh call crashes.
When I use login to change to the other user, everythings works fine.

So this seems to be a "su" issue. I read somewhere that su is no longer 
supported. Is this still true?

Hope this may help for further development!

Christian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-31 Thread Corinna Vinschen
On Thu, Oct 30, 2003 at 08:25:58PM -0500, Pierre A. Humblet wrote:
> At 10:52 AM 10/30/2003 +0100, Corinna Vinschen wrote:
> >
> >Ouch.  I see why that happens.  I'll have to modify the ssh-host-config
> >script.
> >
> >This is no problem on 98/Me and NT, though.  Did you also test with
> >ssh/22 lines with CRLF?
> 
> Yes, it works. However there must be something new in 1.5 that causes 
> the lack of CR to cause a crash on Win95.

Whatever, I can't test it.

> I tried your new script, and ssh did not crash. I thought that was great
> until I realized that the script did not write the ssh lines in services:
> 
> ***
> [EMAIL PROTECTED] ~
> $ fgrep ssh /cygdrive/c/windows/services
> 
> [EMAIL PROTECTED] ~
> $ ssh-host-config
> Overwrite existing /etc/ssh_config file? (yes/no) no
> Overwrite existing /etc/sshd_config file? (yes/no) no
> Added ssh to /cygdrive/c/WINDOWS/SERVICES
> 
> Host configuration finished. Have fun!
> 
> [EMAIL PROTECTED] ~
> $ fgrep ssh /cygdrive/c/windows/services
> 

I've just again tested it on 98 and it works fine.  Could you please
figure out what happens on your machine?

> [EMAIL PROTECTED] ~
> ***
> 
> Also on my Win98 machine I had /var/log/lastlog as a directory.
> I think that's legal, at least for ssh, but 
> 
> ~: ssh-host-config
> Creating /var/log/lastlog failed\!

Fixed.  See the other thread "Testers for ..."

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-31 Thread Christian Weinberger
Corinna Vinschen <[EMAIL PROTECTED]> wrote in
news:[EMAIL PROTECTED]: 

>> 
>> I observed a ssh crash on Win95 too, but only after running
>> ssh-host-config It went away after deleting the two ssh 22/ lines in
>> c:\windows\services They don't seem to end with CRNL.
> 
> Ouch.  I see why that happens.  I'll have to modify the
> ssh-host-config script.
> 
> This is no problem on 98/Me and NT, though.  Did you also test with
> ssh/22 lines with CRLF?
> 
> Corinna
> 

It seems to me that the missing CRLF is not the only source of the problem.
I receive a similar stackdump on XP Home, but only when I use the user 
under which sshd has been installed.

When I use root, ssh works fine.
I´ll go deeper into the differences, but up till now it seem that the ssh 
configuration scripts do not make up the difference.

I´ll come back to you later.

Christian


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-30 Thread Pierre A. Humblet
At 10:52 AM 10/30/2003 +0100, Corinna Vinschen wrote:
>
>Ouch.  I see why that happens.  I'll have to modify the ssh-host-config
>script.
>
>This is no problem on 98/Me and NT, though.  Did you also test with
>ssh/22 lines with CRLF?

Yes, it works. However there must be something new in 1.5 that causes 
the lack of CR to cause a crash on Win95.

I tried your new script, and ssh did not crash. I thought that was great
until I realized that the script did not write the ssh lines in services:

***
[EMAIL PROTECTED] ~
$ fgrep ssh /cygdrive/c/windows/services

[EMAIL PROTECTED] ~
$ ssh-host-config
Overwrite existing /etc/ssh_config file? (yes/no) no
Overwrite existing /etc/sshd_config file? (yes/no) no
Added ssh to /cygdrive/c/WINDOWS/SERVICES

Host configuration finished. Have fun!

[EMAIL PROTECTED] ~
$ fgrep ssh /cygdrive/c/windows/services

[EMAIL PROTECTED] ~
***

Also on my Win98 machine I had /var/log/lastlog as a directory.
I think that's legal, at least for ssh, but 

~: ssh-host-config
Creating /var/log/lastlog failed\!

Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-30 Thread Corinna Vinschen
On Wed, Oct 29, 2003 at 09:46:04PM -0500, Pierre A. Humblet wrote:
> At 03:05 PM 10/29/2003 -0400, Rodrigo Medina wrote:
> >
> >Corinna wrote:
> >
> >>Works for me on 98.  I don't have a 95 system for testing.  Do you
> >>have more than one cygwin1.dll in the path?  Please send cygcheck
> >>output according to http://cygwin.com/problems.html
> >
> >Corinna:
> >
> >This is the first time that cygwin is installed in this machine. In any case
> >with FIND only C:\cygwin\bin\cygwin1.dll appears.
> 
> I observed a ssh crash on Win95 too, but only after running ssh-host-config
> It went away after deleting the two ssh 22/ lines in c:\windows\services
> They don't seem to end with CRNL.

Ouch.  I see why that happens.  I'll have to modify the ssh-host-config
script.

This is no problem on 98/Me and NT, though.  Did you also test with
ssh/22 lines with CRLF?

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-29 Thread Pierre A. Humblet
At 03:05 PM 10/29/2003 -0400, Rodrigo Medina wrote:
>
>Corinna wrote:
>
>>Works for me on 98.  I don't have a 95 system for testing.  Do you
>>have more than one cygwin1.dll in the path?  Please send cygcheck
>>output according to http://cygwin.com/problems.html
>
>Corinna:
>
>This is the first time that cygwin is installed in this machine. In any case
>with FIND only C:\cygwin\bin\cygwin1.dll appears.

I observed a ssh crash on Win95 too, but only after running ssh-host-config
It went away after deleting the two ssh 22/ lines in c:\windows\services
They don't seem to end with CRNL.

I am not equipped to do serious debugging on my Win95 machine, strace shows
nothing of interest, the stackdump points to cygwin_getservbyname
and dup_ent.

~: cat ssh.exe.stackdump 
Exception: STATUS_ACCESS_VIOLATION at eip=610DF651
eax= ebx=00530740 ecx= edx=0053 esi=0010 edi=0053
ebp=0085F678 esp=0085F674 program=\\WORLDNET\C\SSH.EXE
cs=0137 ds=013F es=013F fs=4227 gs= ss=013F
Stack trace:
Frame Function  Args
0085F678  610DF651  (0053, 7E2E3D84, 0032, )
0085F6C8  61060914  (, 00530732, 0002, A2038AB0)
0085F718  6106215A  (0040B221, 0040B225, F48CC23C, C59AB5C7)
0085FBB8  0040B5EE  (616966CC, 00438FD0, , 0002)

~: addr2line -e /bin/cygwin1.dll -f 0x610DF651
??
../../../../../../src/newlib/libc/machine/i386/strlen.S:27
~: addr2line -e /bin/cygwin1.dll -f 0x61060914
_Z7dup_entPvS_11struct_type
/eroot/obj/i586-pc-cygwin/winsup/cygwin/../../../../src/winsup/cygwin/net.cc
:387
~: addr2line -e /bin/cygwin1.dll -f 0x6106215A
cygwin_getservbyname
/eroot/obj/i586-pc-cygwin/winsup/cygwin/../../../../src/winsup/cygwin/net.cc
:954

Pierre


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95

2003-10-29 Thread Rodrigo Medina

Corinna wrote:

>Works for me on 98.  I don't have a 95 system for testing.  Do you
>have more than one cygwin1.dll in the path?  Please send cygcheck
>output according to http://cygwin.com/problems.html

Corinna:

This is the first time that cygwin is installed in this machine. In any case
with FIND only C:\cygwin\bin\cygwin1.dll appears.

The output of 'cygcheck -v ssh' is:

Found: C:\cygwin\bin\ssh.exe
C:/cygwin/bin/ssh.exe - os=4.0 img=1.0 sys=4.0
  C:\cygwin\bin\cygcrypto-0.9.7.dll - os=4.0 img=1.0 sys=4.0
"cygcrypto-0.9.7.dll" v0.0 ts=2003/9/30 12:49
C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
  "cygwin1.dll" v0.0 ts=2003/9/20 16:31
  C:\WINDOWS\SYSTEM\KERNEL32.dll - os=1.0 img=1.9 sys=4.0
"KERNEL32.dll" v0.0 ts=1996/8/10 1:21
C:\WINDOWS\SYSTEM\KERNEL32.dll (already done)
  C:\cygwin\bin\cygwin1.dll (already done)
  C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
"cygz.dll" v0.0 ts=2003/8/9 2:28
C:\cygwin\bin\cygwin1.dll (already done)
C:\WINDOWS\SYSTEM\KERNEL32.dll (already done)
  C:\WINDOWS\SYSTEM\KERNEL32.dll (already done)
  C:\cygwin\bin\cygwin1.dll (already done)
...
...
  C:\cygwin\bin\cygwin1.dll (already done)


The output of 'cygcheck -s -v' is:


Cygwin Win95/NT Configuration Diagnostics
Current System Time: Wed Oct 29 14:29:37 2003

Windows 95 Ver 4.0 Build  

Path:   C:\cygwin\bin
C:\cygwin\usr\local\bin
.
c:\MSDEV\BIN
c:\WINDOWS
c:\WINDOWS\COMMAND
c:\GT
c:\GT
c:\ARCHIV~1\BORLAND\CBUILD~1\BIN
c:\TEXMF\MIKTEX\BIN

Output from C:\cygwin\bin\id.exe (nontsec)
UID: 664(Rodrigo) GID: 544(all)
544(all)

Output from C:\cygwin\bin\id.exe (ntsec)
UID: 664(Rodrigo) GID: 544(all)
544(all)

SysDir: C:\WINDOWS\SYSTEM
WinDir: C:\WINDOWS

HOME = `C:\cygwin\home\Rodrigo'
PWD = `/home/Rodrigo'

BLASTER = `A220 I5 D1 H5 T5'
CMDLINE = `rxvt -cr green --colorUL blue --colorBD red -e bash -l -i'
COLORFGBG = `0;default;15'
COLORTERM = `rxvt-xpm'
COMSPEC = `C:\WINDOWS\COMMAND.COM'
DISPLAY = `:0'
HOMEDRIVE = `C:'
HOMEPATH = `\cygwin\home\Rodrigo'
INCLUDE = `C:\MSDEV\INCLUDE;""'
LESSCHARSET = `latin1'
LIB = `C:\MSDEV\LIB;""'
OLDPWD = `/usr/bin'
PROMPT = `$p$g'
SHLVL = `1'
TEMP = `c:\WINDOWS\TEMP'
TERM = `xterm'
TMP = `c:\WINDOWS\TEMP'
WINBOOTDIR = `C:\WINDOWS'
WINDIR = `C:\WINDOWS'
WINDOWID = `10036976'
_ = `/bin/cygcheck'

Use `-r' to scan registry

a:  fd   N/AN/A
c:  hd  FAT32   3084Mb  54% CPUN   
d:  cd   N/AN/A

C:\cygwin  /  system  binmode
C:\cygwin/bin  /usr/bin   system  binmode
C:\cygwin/lib  /usr/lib   system  binmode
.  /cygdrive  system  binmode,cygdrive

Found: C:\cygwin\bin\awk.exe
Found: C:\cygwin\bin\bash.exe
Found: C:\cygwin\bin\cat.exe
Found: C:\cygwin\bin\cp.exe
Found: C:\cygwin\bin\cpp.exe
Found: C:\cygwin\bin\find.exe
Found: c:\WINDOWS\COMMAND\find.exe
Warning: C:\cygwin\bin\find.exe hides c:\WINDOWS\COMMAND\find.exe
Found: C:\cygwin\bin\gcc.exe
Found: C:\cygwin\bin\gdb.exe
Found: C:\cygwin\bin\grep.exe
Found: c:\ARCHIV~1\BORLAND\CBUILD~1\BIN\grep.exe
Warning: C:\cygwin\bin\grep.exe hides c:\ARCHIV~1\BORLAND\CBUILD~1\BIN\grep.exe
Found: C:\cygwin\bin\ld.exe
Found: C:\cygwin\bin\ls.exe
Found: c:\ARCHIV~1\BORLAND\CBUILD~1\BIN\make.exe
Found: C:\cygwin\bin\mv.exe
Found: C:\cygwin\bin\rm.exe
Found: C:\cygwin\bin\sed.exe
Found: C:\cygwin\bin\sh.exe
Found: C:\cygwin\bin\tar.exe

  802k 2003/09/15 C:\cygwin\bin\cygaspell-15.dll - os=4.0 img=1.0 sys=4.0
  "cygaspell-15.dll" v0.0 ts=2003/9/15 8:32
   19k 2003/03/22 C:\cygwin\bin\cyggdbm.dll - os=4.0 img=1.0 sys=4.0
  "cyggdbm.dll" v0.0 ts=2002/2/19 23:05
   28k 2003/07/20 C:\cygwin\bin\cyggdbm-3.dll - os=4.0 img=1.0 sys=4.0
  "cyggdbm-3.dll" v0.0 ts=2003/7/20 3:58
   15k 2003/07/20 C:\cygwin\bin\cyggdbm_compat-3.dll - os=4.0 img=1.0 sys=4.0
  "cyggdbm_compat-3.dll" v0.0 ts=2003/7/20 4:00
   30k 2003/08/11 C:\cygwin\bin\cyggdbm-4.dll - os=4.0 img=1.0 sys=4.0
  "cyggdbm-4.dll" v0.0 ts=2003/8/10 22:12
   15k 2003/08/11 C:\cygwin\bin\cyggdbm_compat-4.dll - os=4.0 img=1.0 sys=4.0
  "cyggdbm_compat-4.dll" v0.0 ts=2003/8/10 22:13
   12k 2003/08/10 C:\cygwin\bin\cyggettextpo-0.dll - os=4.0 img=1.0 sys=4.0
  "cyggettextpo-0.dll" v0.0 ts=2003/8/10 18:11
   69k 2003/08/10 C:\cygwin\bin\cyggettextlib-0-12-1.dll - os=4.0 img=1.0 sys=4.0
  "cyggettextlib-0-12-1.dll" v0.0 ts=2003/8/10 18:10
  134k 2003/08/10 C:\cygwin\bin\cyggettextsrc-0-12-1.dll - os=4.0 img=1.0 sys=4.0
  "cyggettextsrc-0-12-1.dll" v0.0 ts=2003/8/10 18:10
  958k 2003/08/10 C:\cygwin\bin\cygiconv-2.dll - os=4.0 img=1.0 sys=4.0
  "cygiconv-2.dll" v0.0 ts=2003/8/10 16:57
   22k 2001/12/13 C:\cygwin\bin\cygintl-1.dll - os=4.0 img=1.0 sys=4.0
  "cygintl-1.dll" v0.0 ts=2001/12/13 5:28
   37k 2003/08/10 C:\cyg

Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95.

2003-10-29 Thread Corinna Vinschen
On Tue, Oct 28, 2003 at 03:01:16PM -0400, Rodrigo Medina wrote:
> Hello!
> I have been using cygwin 1.3.22 in a W95 machine with no problems.
> I am now installing cygwin 1.5.5 in another W95 machine. I get the
> following crash:
> 
> bash-2.05b$ ssh -l rmedina pion
> Segmentation fault (core dumped)
> bash-2.05b$ 
> [...]

Works for me on 98.  I don't have a 95 system for testing.  Do you
have more than one cygwin1.dll in the path?  Please send cygcheck
output according to http://cygwin.com/problems.html

Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Developermailto:[EMAIL PROTECTED]
Red Hat, Inc.

--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95.

2003-10-28 Thread Rodrigo Medina
Hello!
I have been using cygwin 1.3.22 in a W95 machine with no problems.
I am now installing cygwin 1.5.5 in another W95 machine. I get the
following crash:

bash-2.05b$ ssh -l rmedina pion
Segmentation fault (core dumped)
bash-2.05b$ 

bash-2.05b$ cat SSH.EXE.stackdump 
Exception: STATUS_ACCESS_VIOLATION at eip=610BA4C1
eax= ebx=005606D4 ecx= edx=0056 esi=0010 edi=0056
ebp=0078F658 esp=0078F654 program=C:\CYGWIN\BIN\SSH.EXE
cs=014F ds=0157 es=0157 fs=3F6F gs=3DD6 ss=0157
Stack trace:
Frame Function  Args
0078F658  610BA4C1  (0056, 7C3E3E7E, 0030, )
0078F6A8  610498F4  (, 005606C6, 0002, )
0078F6F8  61044D0F  (0040B865, 0040B861, 000101BF, 0001)
0078FB98  0040BC18  (6160260C, 00437380, , )
0078FD68  00402F9E  (, 6160110C, 100F0330, 0078FD9C)
0078FDB8  61005018  (610CFEE0, FFFE, 0002, 610CFE04)
0078FE08  610052ED  (, , BFFBFA00, 0078FF68)
0078FE28  00434511  (004024D0, 037F0500, 0078FF78, BFF88E93)
0078FE38  0040103C  (816454B8, 81641FD8, 0058, 00687353)
0078FF78  BFF88E93  (BFF88A87, 0019, 816454B8, )
243 [main] ssh 3401889 handle_exceptions: Error while dumping state (probably 
corrupted stack)

My configuration is:
bash-2.05b$ uname -a
CYGWIN_95-4.0 rixio2.ivic.ve 1.5.5(0.94/3/2) 2003-09-20 16:31 i586 unknown unknown 
Cygwin

The ssh version is:
bash-2.05b$ ssh -V
OpenSSH_3.7.1p2, SSH protocols 1.5/2.0, OpenSSL 0.9.7c 30 Sep 2003

gdb gives:
bash-2.05b$ gdb ssh
GNU gdb 2003-09-20-cvs (cygwin-special)
Copyright 2003 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-cygwin"...(no debugging symbols found)...
(gdb) run -l rmedina pion
Starting program: /usr/bin/ssh.exe -l rmedina pion

Program received signal SIGILL, Illegal instruction.
0x004024d0 in ?? ()
(gdb) bt
#0  0x004024d0 in ?? ()
#1  0x61005018 in forkpty () from /usr/bin/cygwin1.dll
#2  0x610052ed in [EMAIL PROTECTED] () from /usr/bin/cygwin1.dll
#3  0x00434511 in ?? ()
(gdb) 

The ssh deamon sshd works fine.
I hope that somebody could help me. Thanks in advance,

Rodrigo Medina



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/