Gordon Matzigkeit <[EMAIL PROTECTED]> writes:

> I've looked deeper into the lsh code, and I must say, it's very
> clever.  Your object system is similar to one I did on a different
> project where I tried using C instead of C++.  Your GC mechanism
> definitely adds something, though.

;) Thanks. 

> Anyway, it's taken me a little while to realize that obtaining the
> connection's file descriptor in read_handler is impossible in the
> current framework.  That information gets lost sometime after
> io_read_write is called, because the io_fd is kept separate from the
> abstract_write.
> 
> Niels, what is the best way to remedy this problem?  I can see two
> basic approaches:
> 
> 1) Change the flow of control so that a `start SSH version 1' return
>    code gets passed all the way up to a routine that knows the file
>    descriptor.  This is ugly.
> 
> 2) Change one of the objects so that it keeps track of the file
>    descriptor in a way that can be retrieved from within read_handler.
>    This is ugly, too, because everything in ssh_connection is
>    transport-independent.
> 
> 3) Screw the object system, and just stuff the current FD in a global
>    variable someplace.  Ugly, too, but a lot less work.
> 
> I'll use #3 until you figure out the best way to solve this problem,
> at which point I should be able to start cooking up a patch.

jdassen has done some more work on ssh1 support, and I have also done
some hacking. I solved the particular problem above by keeping the fd
around from the server_initiate() callback (which gets the fd as an
argument) to the server line handler where it can be passed on to a
fallback object.

As the www-server is still not fully operational, I just made a new
snapshot available, which is even less tested than usual. Available by
ftp now <URL: ftp://ftp.lysator.liu.se/pub/security/lsh>. But if you
want to hack on sshd1 support, you want to start from that version.

I haven't had the time to add your other patches yet. BTW, I'll be
busy with work and some other things for the next week, so don't
expect much news on lsh in the immediate future. If anybody could
provide funding for, say, 10-20 hours a week, that would help me give
lsh development a higher priority.

Regards,
/Niels

Reply via email to