* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
@ 2003-10-30 0:29 Rodrigo Medina
2003-10-30 4:34 ` Pierre A. Humblet
0 siblings, 1 reply; 18+ messages in thread
From: Rodrigo Medina @ 2003-10-30 0:29 UTC (permalink / raw)
To: cygwin
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 1111
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/A N/A
c: hd FAT32 3084Mb 54% CP UN
d: cd N/A N/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:\cygwin\bin\cygintl-2.dll - os=4.0 img=1.0 sys=4.0
"cygintl-2.dll" v0.0 ts=2003/8/10 17:50
45k 2001/04/25 C:\cygwin\bin\cygform5.dll - os=4.0 img=1.0 sys=4.0
"cygform5.dll" v0.0 ts=2001/4/25 1:28
26k 2001/04/25 C:\cygwin\bin\cygmenu5.dll - os=4.0 img=1.0 sys=4.0
"cygmenu5.dll" v0.0 ts=2001/4/25 1:27
156k 2001/04/25 C:\cygwin\bin\cygncurses++5.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++5.dll" v0.0 ts=2001/4/25 1:29
226k 2001/04/25 C:\cygwin\bin\cygncurses5.dll - os=4.0 img=1.0 sys=4.0
"cygncurses5.dll" v0.0 ts=2001/4/25 1:17
15k 2001/04/25 C:\cygwin\bin\cygpanel5.dll - os=4.0 img=1.0 sys=4.0
"cygpanel5.dll" v0.0 ts=2001/4/25 1:27
35k 2002/01/09 C:\cygwin\bin\cygform6.dll - os=4.0 img=1.0 sys=4.0
"cygform6.dll" v0.0 ts=2002/1/9 2:03
20k 2002/01/09 C:\cygwin\bin\cygmenu6.dll - os=4.0 img=1.0 sys=4.0
"cygmenu6.dll" v0.0 ts=2002/1/9 2:03
175k 2002/01/09 C:\cygwin\bin\cygncurses++6.dll - os=4.0 img=1.0 sys=4.0
"cygncurses++6.dll" v0.0 ts=2002/1/9 2:03
202k 2002/01/09 C:\cygwin\bin\cygncurses6.dll - os=4.0 img=1.0 sys=4.0
"cygncurses6.dll" v0.0 ts=2002/1/9 2:03
12k 2002/01/09 C:\cygwin\bin\cygpanel6.dll - os=4.0 img=1.0 sys=4.0
"cygpanel6.dll" v0.0 ts=2002/1/9 2:03
48k 2003/08/09 C:\cygwin\bin\cygform7.dll - os=4.0 img=1.0 sys=4.0
"cygform7.dll" v0.0 ts=2003/8/9 5:25
29k 2003/08/09 C:\cygwin\bin\cygmenu7.dll - os=4.0 img=1.0 sys=4.0
"cygmenu7.dll" v0.0 ts=2003/8/9 5:25
224k 2003/08/09 C:\cygwin\bin\cygncurses7.dll - os=4.0 img=1.0 sys=4.0
"cygncurses7.dll" v0.0 ts=2003/8/9 5:24
19k 2003/08/09 C:\cygwin\bin\cygpanel7.dll - os=4.0 img=1.0 sys=4.0
"cygpanel7.dll" v0.0 ts=2003/8/9 5:24
63k 2003/04/11 C:\cygwin\bin\cygpcre.dll - os=4.0 img=1.0 sys=4.0
"cygpcre.dll" v0.0 ts=2003/4/11 4:31
61k 2003/04/11 C:\cygwin\bin\cygpcreposix.dll - os=4.0 img=1.0 sys=4.0
"cygpcreposix.dll" v0.0 ts=2003/4/11 4:31
22k 2002/06/09 C:\cygwin\bin\cygpopt-0.dll - os=4.0 img=1.0 sys=4.0
"cygpopt-0.dll" v0.0 ts=2002/6/9 1:45
17k 2001/06/28 C:\cygwin\bin\cyghistory4.dll - os=4.0 img=1.0 sys=4.0
"cyghistory4.dll" v0.0 ts=2001/1/7 0:34
108k 2001/06/28 C:\cygwin\bin\cygreadline4.dll - os=4.0 img=1.0 sys=4.0
"cygreadline4.dll" v0.0 ts=2001/1/7 0:34
29k 2003/08/10 C:\cygwin\bin\cyghistory5.dll - os=4.0 img=1.0 sys=4.0
"cyghistory5.dll" v0.0 ts=2003/8/10 19:16
148k 2003/08/10 C:\cygwin\bin\cygreadline5.dll - os=4.0 img=1.0 sys=4.0
"cygreadline5.dll" v0.0 ts=2003/8/10 19:16
645k 2003/04/11 C:\cygwin\bin\cygcrypto.dll - os=4.0 img=1.0 sys=4.0
"cygcrypto.dll" v0.0 ts=2003/4/11 6:37
165k 2003/04/11 C:\cygwin\bin\cygssl.dll - os=4.0 img=1.0 sys=4.0
"cygssl.dll" v0.0 ts=2003/4/11 6:37
60k 2003/08/09 C:\cygwin\bin\cygz.dll - os=4.0 img=1.0 sys=4.0
"cygz.dll" v0.0 ts=2003/8/9 2:28
61k 2003/08/09 C:\cygwin\bin\cygbz2-1.dll - os=4.0 img=1.0 sys=4.0
"cygbz2-1.dll" v0.0 ts=2003/8/9 2:35
67k 2003/09/10 C:\cygwin\bin\cygpcre-0.dll - os=4.0 img=1.0 sys=4.0
"cygpcre-0.dll" v0.0 ts=2003/9/10 10:25
15k 2003/09/10 C:\cygwin\bin\cygpcreposix-0.dll - os=4.0 img=1.0 sys=4.0
"cygpcreposix-0.dll" v0.0 ts=2003/9/10 10:25
7k 2003/10/19 C:\cygwin\bin\cygcrypt-0.dll - os=4.0 img=1.0 sys=4.0
"cygcrypt-0.dll" v0.0 ts=2003/10/19 3:57
842k 2003/09/30 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
171k 2003/09/30 C:\cygwin\bin\cygssl-0.9.7.dll - os=4.0 img=1.0 sys=4.0
"cygssl-0.9.7.dll" v0.0 ts=2003/9/30 12:49
949k 2003/09/20 C:\cygwin\bin\cygwin1.dll - os=4.0 img=1.0 sys=4.0
"cygwin1.dll" v0.0 ts=2003/9/20 16:31
Cygwin DLL version info:
DLL version: 1.5.5
DLL epoch: 19
DLL bad signal mask: 19005
DLL old termios: 5
DLL malloc env: 28
API major: 0
API minor: 94
Shared data: 3
DLL identifier: cygwin1
Mount registry: 2
Cygnus registry name: Cygnus Solutions
Cygwin registry name: Cygwin
Program options name: Program Options
Cygwin mount registry name: mounts v2
Cygdrive flags: cygdrive flags
Cygdrive prefix: cygdrive prefix
Cygdrive default prefix:
Build date: Sat Sep 20 16:31:15 EDT 2003
CVS tag: cr-0x9b
Shared id: cygwin1S3
Cygwin Package Information
Last downloaded files to: C:\cygwintmp
Last downloaded files from: http://mirrors.rcn.net/pub/sourceware/cygwin
Package Version
_update-info-dir 00221-1
ash 20031007-1
aspell 0.50.3-1
aspell-en 0.51.0-1
base-files 2.6-1
base-passwd 1.1-1
bash 2.05b-16
binutils 20030901-1
bzip2 1.0.2-5
check 0.8.4-1
clear 1.0-1
crypt 1.1-1
cygutils 1.2.2-1
cygwin 1.5.5-1
cygwin-doc 1.3-6
diffutils 2.8.4-1
ed 0.2-1
editrights 1.01-1
file 4.03-2
fileutils 4.1-2
findutils 4.1.7-4
gawk 3.1.3-3
gcc 3.3.1-2
gcc-mingw 20030911-3
gdb 20030919-1
gdbm 1.8.3-7
grep 2.5-1
groff 1.18.1-2
gsl 1.4-1
gzip 1.3.5-1
inetutils 1.3.2-25
less 381-1
libaspell15 0.50.3-1
libbz2_1 1.0.2-5
libgdbm 1.8.0-5
libgdbm-devel 1.8.3-7
libgdbm3 1.8.3-3
libgdbm4 1.8.3-7
libgettextpo0 0.12.1-3
libiconv2 1.9.1-3
libintl1 0.10.40-1
libintl2 0.12.1-3
libncurses5 5.2-1
libncurses6 5.2-8
libncurses7 5.3-4
libpcre 4.1-1
libpcre0 4.4-2
libpopt0 1.6.4-4
libreadline4 4.1-2
libreadline5 4.3-5
login 1.9-7
man 1.5j-2
mingw-runtime 3.2-1
mktemp 1.5-3
ncurses 5.3-4
openssh 3.7.1p2-1
openssl 0.9.7c-1
openssl096 0.9.6j-1
readline 4.3-5
rxvt 2.7.10-3
sed 4.0.7-3
sh-utils 2.0.15-4
tar 1.13.25-3
tcltk 20030901-1
tcsh 6.12.00-7
termcap 20021106-2
terminfo 5.3_20030726-1
texinfo 4.2-4
textutils 2.0.21-1
time 1.7-1
units 1.77-1
unzip 5.50-5
vim 6.2.098-1
w32api 2.4-1
wget 1.8.2-2
which 1.5-2
zip 2.3-5
zlib 1.1.4-4
I hope that this can be useful.
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-10-30 0:29 Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95 Rodrigo Medina
@ 2003-10-30 4:34 ` Pierre A. Humblet
2003-10-30 12:10 ` Corinna Vinschen
0 siblings, 1 reply; 18+ messages in thread
From: Pierre A. Humblet @ 2003-10-30 4:34 UTC (permalink / raw)
To: Rodrigo Medina, cygwin
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=00000000 ebx=00530740 ecx=FFFFFFFF edx=00000053 esi=00000010 edi=00000053
ebp=0085F678 esp=0085F674 program=\\WORLDNET\C\SSH.EXE
cs=0137 ds=013F es=013F fs=4227 gs=0000 ss=013F
Stack trace:
Frame Function Args
0085F678 610DF651 (00000053, 7E2E3D84, 00000032, 00000000)
0085F6C8 61060914 (00000000, 00530732, 00000002, A2038AB0)
0085F718 6106215A (0040B221, 0040B225, F48CC23C, C59AB5C7)
0085FBB8 0040B5EE (616966CC, 00438FD0, 00000000, 00000002)
~: 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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-10-30 4:34 ` Pierre A. Humblet
@ 2003-10-30 12:10 ` Corinna Vinschen
2003-10-31 3:44 ` Pierre A. Humblet
2003-10-31 9:17 ` Christian Weinberger
0 siblings, 2 replies; 18+ messages in thread
From: Corinna Vinschen @ 2003-10-30 12:10 UTC (permalink / raw)
To: cygwin
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 Developer mailto:cygwin@cygwin.com
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-10-30 12:10 ` Corinna Vinschen
@ 2003-10-31 3:44 ` Pierre A. Humblet
2003-10-31 13:09 ` Corinna Vinschen
2003-10-31 9:17 ` Christian Weinberger
1 sibling, 1 reply; 18+ messages in thread
From: Pierre A. Humblet @ 2003-10-31 3:44 UTC (permalink / raw)
To: cygwin
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:
*******************
Olivier@erg ~
$ fgrep ssh /cygdrive/c/windows/services
Olivier@erg ~
$ 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!
Olivier@erg ~
$ fgrep ssh /cygdrive/c/windows/services
Olivier@erg ~
*******************
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-10-30 12:10 ` Corinna Vinschen
2003-10-31 3:44 ` Pierre A. Humblet
@ 2003-10-31 9:17 ` Christian Weinberger
1 sibling, 0 replies; 18+ messages in thread
From: Christian Weinberger @ 2003-10-31 9:17 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1114 bytes --]
Corinna Vinschen <corinna-cygwin@cygwin.com> wrote in
news:20031030095229.GM1653@cygbert.vinschen.de:
>>
>> 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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-10-31 3:44 ` Pierre A. Humblet
@ 2003-10-31 13:09 ` Corinna Vinschen
2003-11-01 0:13 ` Pierre A. Humblet
0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2003-10-31 13:09 UTC (permalink / raw)
To: cygwin
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:
>
> *******************
> Olivier@erg ~
> $ fgrep ssh /cygdrive/c/windows/services
>
> Olivier@erg ~
> $ 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!
>
> Olivier@erg ~
> $ 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?
> Olivier@erg ~
> *******************
>
> 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 Developer mailto:cygwin@cygwin.com
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-10-31 13:09 ` Corinna Vinschen
@ 2003-11-01 0:13 ` Pierre A. Humblet
2003-11-01 12:27 ` Corinna Vinschen
0 siblings, 1 reply; 18+ messages in thread
From: Pierre A. Humblet @ 2003-11-01 0:13 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-01 0:13 ` Pierre A. Humblet
@ 2003-11-01 12:27 ` Corinna Vinschen
2003-11-02 4:28 ` Pierre A. Humblet
2003-11-02 14:58 ` Pierre A. Humblet
0 siblings, 2 replies; 18+ messages in thread
From: Corinna Vinschen @ 2003-11-01 12:27 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 1370 bytes --]
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 Developer mailto:cygwin@cygwin.com
Red Hat, Inc.
[-- Attachment #2: ssh-host-config --]
[-- Type: text/plain, Size: 11653 bytes --]
#!/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 <n> 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 [ -f "${SYSCONFDIR}/ssh_config" ]
then
if request "Overwrite existing ${SYSCONFDIR}/ssh_config file?"
then
rm -f "${SYSCONFDIR}/ssh_config"
if [ -f "${SYSCONFDIR}/ssh_config" ]
then
echo "Can't overwrite. ${SYSCONFDIR}/ssh_config is write protected."
fi
fi
fi
# Create default ssh_config from skeleton file in /etc/defaults/etc
if [ ! -f "${SYSCONFDIR}/ssh_config" ]
then
echo "Generating ${SYSCONFDIR}/ssh_config file"
cp ${SYSCONFDIR}/defaults/etc/ssh_config ${SYSCONFDIR}/ssh_config
if [ "$port_number" != "22" ]
then
echo "Host localhost" >> ${SYSCONFDIR}/ssh_config
echo " Port $port_number" >> ${SYSCONFDIR}/ssh_config
fi
fi
# Check if sshd_config exists. If yes, ask for overwriting
if [ -f "${SYSCONFDIR}/sshd_config" ]
then
if request "Overwrite existing ${SYSCONFDIR}/sshd_config file?"
then
rm -f "${SYSCONFDIR}/sshd_config"
if [ -f "${SYSCONFDIR}/sshd_config" ]
then
echo "Can't overwrite. ${SYSCONFDIR}/sshd_config is write protected."
fi
else
grep -q UsePrivilegeSeparation ${SYSCONFDIR}/sshd_config && privsep_configured=yes
fi
fi
# Prior to creating or modifying sshd_config, care for privilege separation
if [ "$privsep_configured" != "yes" ]
then
if [ $_nt -gt 0 ]
then
echo "Privilege separation is set to yes by default since OpenSSH 3.3."
echo "However, this requires a non-privileged account called 'sshd'."
echo "For more info on privilege separation read /usr/doc/openssh/README.privsep."
echo
if request "Shall privilege separation be used?"
then
privsep_used=yes
grep -q '^sshd:' ${SYSCONFDIR}/passwd && sshd_in_passwd=yes
net user sshd >/dev/null 2>&1 && sshd_in_sam=yes
if [ "$sshd_in_passwd" != "yes" ]
then
if [ "$sshd_in_sam" != "yes" ]
then
echo "Warning: The following function requires administrator privileges!"
if request "Shall this script create a local user 'sshd' on this machine?"
then
dos_var_empty=`cygpath -w ${LOCALSTATEDIR}/empty`
net user sshd /add /fullname:"sshd privsep" "/homedir:$dos_var_empty" /active:no > /dev/null 2>&1 && sshd_in_sam=yes
if [ "$sshd_in_sam" != "yes" ]
then
echo "Warning: Creating the user 'sshd' failed!"
fi
fi
fi
if [ "$sshd_in_sam" != "yes" ]
then
echo "Warning: Can't create user 'sshd' in ${SYSCONFDIR}/passwd!"
echo " Privilege separation set to 'no' again!"
echo " Check your ${SYSCONFDIR}/sshd_config file!"
privsep_used=no
else
mkpasswd -l -u sshd | sed -e 's/bash$/false/' >> ${SYSCONFDIR}/passwd
fi
fi
else
privsep_used=no
fi
else
# On 9x don't use privilege separation. Since security isn't
# available it just adds useless additional processes.
privsep_used=no
fi
fi
# Create default sshd_config from skeleton files in /etc/defaults/etc or
# modify to add the missing privsep configuration option
if [ ! -f "${SYSCONFDIR}/sshd_config" ]
then
echo "Generating ${SYSCONFDIR}/sshd_config file"
sed -e "s/^#UsePrivilegeSeparation yes/UsePrivilegeSeparation $privsep_used/
s/^#Port 22/Port $port_number/
s/^#StrictModes yes/StrictModes no/" \
< ${SYSCONFDIR}/defaults/etc/sshd_config \
> ${SYSCONFDIR}/sshd_config
elif [ "$privsep_configured" != "yes" ]
then
echo >> ${SYSCONFDIR}/sshd_config
echo "UsePrivilegeSeparation $privsep_used" >> ${SYSCONFDIR}/sshd_config
fi
# Care for services file
_my_etcdir="/ssh-host-config.$$"
if [ $_nt -gt 0 ]
then
_win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc"
_services="${_my_etcdir}/services"
# On NT, 27 spaces, no space after the hash
_spaces=" #"
else
_win_etcdir="${WINDIR}"
_services="${_my_etcdir}/SERVICES"
# On 9x, 18 spaces (95 is very touchy), a space after the hash
_spaces=" # "
fi
_serv_tmp="${_my_etcdir}/srv.out.$$"
mount -t -f "${_win_etcdir}" "${_my_etcdir}"
# Depends on the above mount
_wservices=`cygpath -w "${_services}"`
# Remove sshd 22/port from services
if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ]
then
grep -v 'sshd[ \t][ \t]*22' "${_services}" > "${_serv_tmp}"
if [ -f "${_serv_tmp}" ]
then
if mv "${_serv_tmp}" "${_services}"
then
echo "Removing sshd from ${_wservices}"
else
echo "Removing sshd from ${_wservices} failed!"
fi
rm -f "${_serv_tmp}"
else
echo "Removing sshd from ${_wservices} failed!"
fi
fi
# Add ssh 22/tcp and ssh 22/udp to services
if [ `grep -q 'ssh[ \t][ \t]*22' "${_services}"; echo $?` -ne 0 ]
then
if awk '{ if ( $2 ~ /^23\/tcp/ ) print "ssh 22/tcp'"${_spaces}"'SSH Remote Login Protocol\nssh 22/udp'"${_spaces}"'SSH Remote Login Protocol"; print $0; }' < "${_services}" > "${_serv_tmp}"
then
if mv "${_serv_tmp}" "${_services}"
then
echo "Added ssh to ${_wservices}"
else
echo "Adding ssh to ${_wservices} failed!"
fi
rm -f "${_serv_tmp}"
else
echo "WARNING: Adding ssh to ${_wservices} failed!"
fi
fi
umount "${_my_etcdir}"
# Care for inetd.conf file
_inetcnf="${SYSCONFDIR}/inetd.conf"
_inetcnf_tmp="${SYSCONFDIR}/inetd.conf.$$"
if [ -f "${_inetcnf}" ]
then
# Check if ssh service is already in use as sshd
with_comment=1
grep -q '^[ \t]*sshd' "${_inetcnf}" && with_comment=0
# Remove sshd line from inetd.conf
if [ `grep -q '^[# \t]*sshd' "${_inetcnf}"; echo $?` -eq 0 ]
then
grep -v '^[# \t]*sshd' "${_inetcnf}" >> "${_inetcnf_tmp}"
if [ -f "${_inetcnf_tmp}" ]
then
if mv "${_inetcnf_tmp}" "${_inetcnf}"
then
echo "Removed sshd from ${_inetcnf}"
else
echo "Removing sshd from ${_inetcnf} failed!"
fi
rm -f "${_inetcnf_tmp}"
else
echo "Removing sshd from ${_inetcnf} failed!"
fi
fi
# Add ssh line to inetd.conf
if [ `grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -ne 0 ]
then
if [ "${with_comment}" -eq 0 ]
then
echo 'ssh stream tcp nowait root /usr/sbin/sshd sshd -i' >> "${_inetcnf}"
else
echo '# ssh stream tcp nowait root /usr/sbin/sshd sshd -i' >> "${_inetcnf}"
fi
echo "Added ssh to ${_inetcnf}"
fi
fi
# On NT ask if sshd should be installed as service
if [ $_nt -gt 0 ]
then
# But only if it is not already installed
if ! cygrunsrv -Q sshd > /dev/null 2>&1
then
echo
echo "Do you want to install sshd as service?"
if request "(Say \"no\" if it's already installed as service)"
then
echo
echo "Which value should the environment variable CYGWIN have when"
echo "sshd starts? It's recommended to set at least \"ntsec\" to be"
echo "able to change user context without password."
echo -n "Default is \"ntsec\". CYGWIN="
read _cygwin
[ -z "${_cygwin}" ] && _cygwin="ntsec"
if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd -a -D -e "CYGWIN=${_cygwin}"
then
echo
echo "The service has been installed under LocalSystem account."
fi
fi
# Now check if sshd has been successfully installed. This allows to
# set the ownership of the affected files correctly.
#
# NOTE: This doesn't work flawlessly so far on Windows 2003 Server.
# The SYSTEM account on 2003 has not the appropriate privileges to allow
# passwordless logon (pubkey authentication). This requires to run the
# service under a special account, which has administrator privileges
# plus (at least, AFAIK) the SeCreateTokenPrivilege.
# The next step will be, to extend this script to create an approriate
# account for that, using the new editrights tool.
if cygrunsrv -Q sshd > /dev/null 2>&1
then
chown system ${SYSCONFDIR}/ssh*
chown system.system ${LOCALSTATEDIR}/empty
if [ -f ${LOCALSTATEDIR}/log/sshd.log ]
then
chown system.system ${LOCALSTATEDIR}/log/sshd.log
fi
fi
fi
fi
echo
echo "Host configuration finished. Have fun!"
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-01 12:27 ` Corinna Vinschen
@ 2003-11-02 4:28 ` Pierre A. Humblet
2003-11-02 14:58 ` Pierre A. Humblet
1 sibling, 0 replies; 18+ messages in thread
From: Pierre A. Humblet @ 2003-11-02 4:28 UTC (permalink / raw)
To: cygwin
[-- Attachment #1: Type: text/plain, Size: 2268 bytes --]
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.
Olivier@erg ~
$ gcc getserv.c -mno-cygwin -lwsock32
Olivier@erg ~
$ ./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
[-- Attachment #2: getserv.c --]
[-- Type: text/plain, Size: 1246 bytes --]
/* gcc getserv.c -lwsock32 -mno-cygwin */
#define __USE_W32_SOCKETS
#include <windows.h>
#include <stdio.h>
#if defined(__CYGWIN__) && !defined(__USE_W32_SOCKETS)
#include <netdb.h>
#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);
}
[-- Attachment #3: Type: text/plain, Size: 218 bytes --]
--
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-01 12:27 ` Corinna Vinschen
2003-11-02 4:28 ` Pierre A. Humblet
@ 2003-11-02 14:58 ` Pierre A. Humblet
2003-11-03 16:31 ` Corinna Vinschen
1 sibling, 1 reply; 18+ messages in thread
From: Pierre A. Humblet @ 2003-11-02 14:58 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-02 14:58 ` Pierre A. Humblet
@ 2003-11-03 16:31 ` Corinna Vinschen
2003-11-03 18:17 ` Pierre A. Humblet
0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2003-11-03 16:31 UTC (permalink / raw)
To: cygwin
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 Developer mailto:cygwin@cygwin.com
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-03 16:31 ` Corinna Vinschen
@ 2003-11-03 18:17 ` Pierre A. Humblet
2003-11-03 19:06 ` Corinna Vinschen
0 siblings, 1 reply; 18+ messages in thread
From: Pierre A. Humblet @ 2003-11-03 18:17 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-03 18:17 ` Pierre A. Humblet
@ 2003-11-03 19:06 ` Corinna Vinschen
2003-11-04 3:09 ` Pierre A. Humblet
0 siblings, 1 reply; 18+ messages in thread
From: Corinna Vinschen @ 2003-11-03 19:06 UTC (permalink / raw)
To: cygwin
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 -0000 1.154
+++ net.cc 3 Nov 2003 19:06:12 -0000
@@ -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 Developer mailto:cygwin@cygwin.com
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-03 19:06 ` Corinna Vinschen
@ 2003-11-04 3:09 ` Pierre A. Humblet
2003-11-04 12:57 ` Christopher Faylor
0 siblings, 1 reply; 18+ messages in thread
From: Pierre A. Humblet @ 2003-11-04 3:09 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95
2003-11-04 3:09 ` Pierre A. Humblet
@ 2003-11-04 12:57 ` Christopher Faylor
0 siblings, 0 replies; 18+ messages in thread
From: Christopher Faylor @ 2003-11-04 12:57 UTC (permalink / raw)
To: cygwin
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95.
2003-10-28 20:57 Rodrigo Medina
2003-10-29 9:40 ` Corinna Vinschen
@ 2003-10-31 21:40 ` Christian Weinberger
1 sibling, 0 replies; 18+ messages in thread
From: Christian Weinberger @ 2003-10-31 21:40 UTC (permalink / raw)
To: cygwin
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1095 bytes --]
Rodrigo Medina <rmedina@ivic.ve> wrote in
news:200310281901.h9SJ1GAb015767@pion.ivic.ve:
> 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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95.
2003-10-28 20:57 Rodrigo Medina
@ 2003-10-29 9:40 ` Corinna Vinschen
2003-10-31 21:40 ` Christian Weinberger
1 sibling, 0 replies; 18+ messages in thread
From: Corinna Vinschen @ 2003-10-29 9:40 UTC (permalink / raw)
To: cygwin
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 Developer mailto:cygwin@cygwin.com
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/
^ permalink raw reply [flat|nested] 18+ messages in thread
* Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95.
@ 2003-10-28 20:57 Rodrigo Medina
2003-10-29 9:40 ` Corinna Vinschen
2003-10-31 21:40 ` Christian Weinberger
0 siblings, 2 replies; 18+ messages in thread
From: Rodrigo Medina @ 2003-10-28 20:57 UTC (permalink / raw)
To: cygwin
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=00000000 ebx=005606D4 ecx=FFFFFFFF edx=00000056 esi=00000010 edi=00000056
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 (00000056, 7C3E3E7E, 00000030, 00000000)
0078F6A8 610498F4 (00000000, 005606C6, 00000002, 00000000)
0078F6F8 61044D0F (0040B865, 0040B861, 000101BF, 00010000)
0078FB98 0040BC18 (6160260C, 00437380, 00000000, 00000000)
0078FD68 00402F9E (00000000, 6160110C, 100F0330, 0078FD9C)
0078FDB8 61005018 (610CFEE0, FFFFFFFE, 00000002, 610CFE04)
0078FE08 610052ED (00000000, 00000000, BFFBFA00, 0078FF68)
0078FE28 00434511 (004024D0, 037F0500, 0078FF78, BFF88E93)
0078FE38 0040103C (816454B8, 81641FD8, 00580000, 00687353)
0078FF78 BFF88E93 (BFF88A87, 00000019, 816454B8, 00000000)
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 dll_crt0@0 () 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/
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2003-11-04 12:57 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-30 0:29 Segmentation Fault of ssh3.7.1 with cygwin1.5.5-1 in W95 Rodrigo Medina
2003-10-30 4:34 ` Pierre A. Humblet
2003-10-30 12:10 ` Corinna Vinschen
2003-10-31 3:44 ` Pierre A. Humblet
2003-10-31 13:09 ` Corinna Vinschen
2003-11-01 0:13 ` Pierre A. Humblet
2003-11-01 12:27 ` Corinna Vinschen
2003-11-02 4:28 ` Pierre A. Humblet
2003-11-02 14:58 ` Pierre A. Humblet
2003-11-03 16:31 ` Corinna Vinschen
2003-11-03 18:17 ` Pierre A. Humblet
2003-11-03 19:06 ` Corinna Vinschen
2003-11-04 3:09 ` Pierre A. Humblet
2003-11-04 12:57 ` Christopher Faylor
2003-10-31 9:17 ` Christian Weinberger
-- strict thread matches above, loose matches on Subject: below --
2003-10-28 20:57 Rodrigo Medina
2003-10-29 9:40 ` Corinna Vinschen
2003-10-31 21:40 ` Christian Weinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).