"Eric J. Schwertfeger" <[EMAIL PROTECTED]> writes:

> > > Unhandled exception of type 0x4001: Public key userauth failed.
> > > Abort trap (core dumped)

 [...]

> http://gz.geekazoid.com/lsh/client-typescript.txt (at just short of 24K,
> I'd rather not post it to the list).

The relevant part of the trace output is

client_userauth.c:582: client_publickey_next: Raising exception Public key userauth 
failed. (type 16385), using handler installed by client_userauth.c:407: 
do_client_userauth

This happens when public key authentication fails. The exception is
handled by do_client_exc_userauth, which should go on with the next
userauth method. Usually, that means it tries password based
authentication. But if it has ran out of userauth methods (which most
likely happened because the server was run with the --no-password, but
I'm guessing here), the exception is reraised:

client_userauth.c:363: do_client_exc_userauth: Raising exception Public key userauth 
failed. (type 16385), using handler installed by lsh.c:1278: main

This exception is passed to lsh's main exception handler. It should be
recognized here, so that lsh can fail gracefully. But appearantly that
doesn't happen, and the exception reaches the default exception
handler, which dumps core:

lsh.c:1250: do_lsh_default_handler: Raising exception Public key userauth failed. 
(type 16385), using handler installed by exception.c:47: Static
Unhandled exception of type 0x4001: Public key userauth failed.
Abort trap (core dumped)

There's at least one bug involved, in lsh.c:

diff -u -a -r1.111 lsh.c
--- lsh.c       2000/06/01 23:37:55     1.111
+++ lsh.c       2000/06/04 14:45:19
@@ -1332,7 +1332,7 @@
     switch(e->type)
       {
       case EXC_RESOLVE:
-      case EXC_AUTH:
+      case EXC_USERAUTH:
       case EXC_SERVICE:
       case EXC_SEXP_SYNTAX:
       case EXC_SPKI_TYPE:

I've also fixed the comparison in client_userauth.c:

diff -u -a -r1.33 client_userauth.c
--- client_userauth.c   2000/05/28 00:00:08     1.33
+++ client_userauth.c   2000/06/04 14:57:52
@@ -347,7 +347,7 @@
 {
   CAST(client_exc_userauth, self, s);

-  if ( (e->type & EXC_USERAUTH)
+  if ( (e->type == EXC_USERAUTH)
        && (self->state->current < LIST_LENGTH(&self->state->userauth->methods)))
     {
       CAST_SUBTYPE(client_userauth_method, method,

but I don't think that really matters.

/Niels

Reply via email to