Hi!

[I'm writing this message from inside Mindterm 0.97
(http://www.mindbright.se/mindterm/), a GPLed Java applet that
implements SSH version 1.x... it's running inside my boss's copy of
Netscape 4.08.

I'm logged into my home machine, which is running lshd-1999-01-21 plus
some patches to fix up sshd1 fallback.  My home system is now a little
step closer to depending only on free software.  Thank you!]

After thinking about it a little bit, I believe that it is unnecessary
to make ssh1-fallback a compile time option.  Why should we have two
seaparate code paths to maintain, when you've already taken the
trouble to make an object system that handles conflicting requirements
quite nicely?

So, I gutted all the configure code, and replaced it with a runtime
option: --ssh1-fallback=SSHD.  There is no reason that I can see to
hardcode the location of a working sshd1 into lshd, even as a default.
If people were smart enough to run sshd, they should be able to add a
flag to lshd's startup script, and figure out from the log that they
need a version that supports -V.

--ssh1-fallback flag isn't the default, so it is possible to disable
ssh1 support (for whatever reason) without recompiling.

So, without further ado, here are my patches.  The first four
ChangeLog entries are patches to make things work properly (probably
alredy fixed by you, Niels).  The rest are patches to replace the
--with-sshd1 configure option with a runtime --ssh1-fallback option.

1999-01-21  Gordon Matzigkeit  <[EMAIL PROTECTED]>

        * src/server.h: Always include ssh1_fallback.h, and fix typo.

        * src/server.c (server_initiate): If we need to delay the key
        exchange, initialize a kexinit here and save it in
        CONNECTION->KEXINITS[CONNECTION_SERVER] until DO_LINE has a chance
        to use it.

        * src/connection.c (make_ssh_connection): Use macros rather than
        magic numbers to index KEXINITS and LITERAL_KEXINITS.

        * src/server.c (do_line): Fix transposed arguments and missing
        comma in SSH1_FALLBACK call.

        * acconfig.h: Remove references to SSHD1.

        * configure.in: Get rid of all the checks for SSHD1.  The user
        should supply it at runtime.

        * src/lshd.c (main): Implement the `--ssh1-fallback' flag to allow
        people to specify an sshd1 at runtime.

        * src/version.h (SSH1_SERVER_PROTOCOL_VERSION): Only use version
        1.99 if we were told to fallback to ssh1.

        * src/ssh1_fallback.h: SSHD1 does not need the port number because
        we invoke it as if we were inetd.
        src/ssh1_fallback.c: Likewise.

Next on my agenda: writing a pseudo-terminal object so that Bash
prints a command prompt and emacs works.  This object will use
different methods for obtaining a pty, depending on the platform.  If
pty support is not known for a given platform, it will use the
existing make_pipe implementation.

Have fun, (I sure am!) ;)

-- 
 Gordon Matzigkeit <[EMAIL PROTECTED]> //\ I'm a FIG (http://www.fig.org/)
    Lovers of freedom, unite!     \// I use GNU (http://www.gnu.org/)
[Unfortunately, www.fig.org is broken.  Please stay tuned for details.]

lsh-19990121-ssh1.diff

Reply via email to