OpenSSH Port to Lynxos 4

Gilbert Tsang gtsang at lnxw.com
Thu Jul 15 09:17:18 EST 2004


Hi Ben,

To answer your questions, I have not modified the source code of ssh and
sftp during the port.

Actually you are quite right on the fact that setvbuf(infile, NULL, _IOLBF,
0) does something funny on LynxOS. So I took out HAVE_SETVBUF and recompile
and sftp works! The only drawback is that the -b option of sftp is broken
and so I work around that by using stdin redirection. I'll see if I can
figure out what's so different about setvbuf(). Many thanks Ben!

Regards, Gilbert.


-----Original Message-----
From: Ben Lindstrom [mailto:mouring at etoh.eviladmin.org]
Sent: Tuesday, July 13, 2004 8:33 PM
To: Gilbert Tsang
Cc: openssh-unix-dev at mindrot.org
Subject: Re: OpenSSH Port to Lynxos 4




On Tue, 13 Jul 2004, Gilbert Tsang wrote:

> I am working on a port of 3.8.1p1 to LynxOs 4.
>

I guess the first few questions should be:

1. What changes have you made to the ssh client?
2. What changes have you made to the sftp client?

> The problem I'm encountering now is on "sftp": the symptom is that after
> password authentication, the call to fgets() (sftp.c, line 1186) by sftp
> client returns NULL and thus the client exit before the user can enter any
> command. fgets() eventually call read() and the call fails because of an
> errno of 0x2 (ENOENT). At this point I'm quite puzzled at what's happening
> as it seem the forked ssh program has access to stdin (as it was able to
get
> the entered password) but not the parent sftp client program that
interacts
> with user (sftp.c line 1240)?
>

could see see a ktrace (or the equiv) around the place where the sftp>
prompt is displayed.  We should see something like:

28753 sftp     RET   write 41/0x29
 28753 sftp     CALL  write(0x1,0x13000,0x6)
 28753 sftp     GIO   fd 1 wrote 6 bytes
       "sftp> "
 28753 sftp     RET   write 6
 28753 sftp     CALL  read(0,0x23000,0x10000)
 28753 sftp     GIO   fd 0 read 5 bytes
       "quit
       "
 28753 sftp     RET   read 5
 28753 sftp     CALL  close(0x3)


I'm interested to see if it is different.  And how.

Also do you have HAVE_SETVBUF set in your config.h?  If it is set, try
unsetting it and recompiling sftp.

I'm suspecting lynxos doesn't like how we are setting up the input buffer.

That is about all I can think of right off hand.

- Ben




More information about the openssh-unix-dev mailing list