On Sun, 14 Feb 1999, Rafal Maszkowski wrote:
> Where? I changed server.c:
>
> if (using_pty) {
> /* tty_setctty(session->pty->slave); */
> tty_setctty(STDIN_FILENO);
> }
>
> but it doesn't help, only I need to type 3 characters more instead of two (I am
> not sure if I described it precisely enough - the characters are not getting
> eaten, it seems only that there is some additional 2-3 charactrs buffer between
> the keyboard and shell). I guess I have to wait for proper Solaris pty
> support.
Oh yes. /dev/ptmx support is on the way, but probably it will be untested,
because I have no Solaris root account...
I changed a lot of things in tty.c server.c server_pty.c and client.c.
It works on my Linux, but I ran into a very wierd problem, which I want to
trace down. After running n+1 times (n tends to 3) the client without
restarting the server, sometimes I got bad TERM strings on the server side. I
traced it down till a parse_string_copy in do_alloc_pty/server.c. In
parse_string_copy/parse.c I changed the ssh_format to an lsh_string_alloc, and
a for cycle to put the data to the lsh_string, but I got the same problem.
Then I started to write out the pointers and length, and got a strange result:
in the case of the bad copy lsh_string_alloc allocs memory for lsh_string just
33 bytes before the _start_ pointer in the function parse_string_copy.
The length of the string is 5 bytes, so the whole lsh_string structure is 32
bytes long. If this is the real case then the lsh_string alloc overwrites
the beginning of the buffer->data. Why does this happen? Whether is it machine
specific? I successfully reproduced this problem on two (kernels:
2.0.35-SuSE, 2.1.130) linux with the original 1999-01-28 snapshot.
Ideas?
Greets,
Keresztg
+ Keresztfalvi Gabor
+ Student of Technical University of Budapest
+ mailto: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED]
+ http://www.piar.hu/~keresztg/ Pubkey: finger [EMAIL PROTECTED]