Jeff Bailey <[EMAIL PROTECTED]> writes:

> > > I'm using lsh-0.9.14 and trying to get it to compile on delysid.  lshd is 
> > > failing because it can't find logwtmp
> > 
> > Hmm. In my sources, all uses of logwtmp (in unix_user.c) are protected
> > by a #if WITH_UTMP && HAVE_LOGWTMP. Hmm, perhaps I need to add a few
> > defined() there; I don't remember if "unsupported" symbols are undefined
> > or defined with a zero value by configure.
> 
> I tend to use #ifdef for my configure wrappers.  I'll try taking a look 
> later and see if that fixes it.

I started using #if HAVE_FOO instead of #ifdef HAVE_FOO some years
ago. IIRC it was recommended by some credible source, but now I don't
remember. In anycase #ifdef and && don't work well together. I think 
the correct way to write it is

  #if defined(WITH_UTMP) && defined(HAVE_LOGWTMP)

I made a similar change to the ipv6 conditionals some time ago, but I
missed this one.

> I think it would be nice if the `configure' warning said something like 
> "Scheme not found, do not edit the source code!" or something like that 
> so that it's obvious that it's not a bad thing.

THat's still somewhat confusing. Any suggestions for a clear and
concise message? "No scheme interpreter found. You will not be able to
recreate the .x files if you edit the source files they depend on." is
a little long, but perhaps clear enough.

> > Hmm, I take this you use the poll-emulation code in jpoll.c?
> 
> I have no idea.. =)  ./configure; make; cd /src; ./lsh...  How could I tell?

Look if HAVE_POLL is defined in config.h. It would also be interesting
to know if configure was right when deciding that you didn't have
poll(). I guess config.log should contain some error messages.

> > > do_zlib: inflate() failed: unknown compression method
> > 
> > This seems bad. You might be able to workaround it by saying -z none.
> 
> bash-2.02$ ./lsh -z none --sloppy-host-authentication oasis.zugzug.com
> Set FD 0 = 4
> Returning 1

[...]

> lsh: address could not be resolved
> bash-2.02$ 
>
> However, when I don't put the -z none, it works like it did last night.  
> Is it trying to resolve the word 'none' for a hostname?

Strange. At least I can reproduce it here, lsh -z none localhost gives
the same result. Hmm, it seems one must use -znone with no space. I
think this is the only OPT_ARG_OPTIONAL flag in lsh. Is this vanilla
getopt behaviour or argp behaviour?

In any case, its strange that zlib doesn't work.

> This gives a 
> different result:
> 
> bash-2.02$ ./lsh --compression=none  --sloppy-host-authentication 
> oasis.zugzug.com
> Failed to open '/home/fsf/jbailey/.lsh/captured_keys' (errno = 2): No 
> such file or directory.
> Set FD 0 = 4
> Returning 1
> Failed to open '/home/fsf/jbailey/.lsh/known_hosts' (errno = 2): No such 
> file or directory.
> Set FD 0 = 4
> Returning 1
> Unexpected timeout
> IOT trap/Abort
> bash-2.02$ 

This seems to be the poll-emulation function returning zero.

> If I try to connect to subversions instead, it will prompt me for a 
> password but that's a DSA key only system.  Make install won't work 
> without lshd compiling so I can't do all of the yet (and I'm a little 
> late for work).

Perhaps one could to add install-client and install-server make
targets. I don't know how easy that is, as the install targets are
generated by automake.

> One last thing:

[...]

> Password for jbailey: 
> 
> Ctrl-C won't let me out!  This should probably have a max-try count and 
> be able to force my way out of.

lsh uses the C library function getpass(), which appearantly sets your
tty to raw mode (so that you can use control characters in your
password ;-). lsh also doesn't check if you supply an empty password,
as it can't know that the server won't let you in with the empty
string as password.

The server has a limit, but it's quite high. From server_userauth.c:

  /* Max number of attempts */
  #define AUTH_ATTEMPTS 20

A possible improvement might be for lsh to give up the second time you provide
an empty password, if the server denied log in the first time. Sooner
or later I'll write a proper tty object that will replace getpass()
and some other things.

> Sorry I don't have time to supply patches with this.

If you get any time for that, please first upgrade to 1.0. I don't
think it fixes your problems, but it will make it easier to merge any
patches. 

Thanks for the report, it seems that I have a bug or two to fix.

/Niels

Reply via email to