"Eric J. Schwertfeger" <[EMAIL PROTECTED]> writes:
> After monkeying around with the makefiles, I managed to get lsh to
> compile. So much for the easy part, I'm now getting nowhere fast, and
> don't even know which way I'm supposed to be going :-) Again, this is
> trying to get lsh to work under FreeBSD (3.3 in this case).
>
> ~/lsh-0.1.20/src> ./lshd -p 4711 -h NEW_KEY --debug --trace -v
> tcpforward_commands.c: make_direct_tcpip_hook()
> tcpforward_commands.c: tcpip_forward_hook()
> Entering lshd_listen
> spki_read_hostkeys_command
> Entering spki_read_hostkeys
> spki_add_hostkey_command
> Entering for_sexp
> Leaving for_sexp, value of type catch_apply.
> do_read_sexp
> make_read_sexp_exception_handler
> make_parse_loop
> make_parse_advanced_sexp
> io.c: Preparing fd 4 for reading
> Garbage collecting while idle...
> Objects alive: 93, garbage collected: 36
>
> Here it sits, not listening to port 4711 according to netstat. In fact,
> according to netstat, there aren't any new ports in listen mode since
> before I started the program.
>
> Would someone mind sending me the output of what this is supposed to look
> like?
For me, the "Preparing fd 4 for reading" message is followed by
: io.c: Preparing fd 4 for reading
: Garbage collecting while busy...
: Objects alive: 93, garbage collected: 36
: io.c: poll for fd 4: events = 0x1, revents = 0x1.
: do_parse_loop
: do_parse_advanced_sexp
: make_parse_list
: make_handle_element
: make_parse_advanced_sexp
:
: [ ... lots of boring parsing debug cut ... ]
:
: do_parse_list: Encountered end of list.
: build_parsed_vector: count = 2.
: do_spki_add_hostkey
: do_spki_add_hostkey
: io.c: poll for fd 4: events = 0x1, revents = 0x1.
: do_parse_loop
: sexp_streamed_parser.c:918: do_parse_advanced_sexp: Raising exception
: No more sexps. (type 262146), using handler installed by sexp_commands.c:301:
:do_read_sexp
: sexp_commands.c:247: do_read_sexp_exception_handler: Raising exception
: No more sexps. (type 262146), using handler installed by command.c:550:
:do_catch_apply
: spki_return_hostkeys
: Leaving spki_read_hostkeys, value of type alist_linear.
: io.c: listening on fd 5
: Closing fd 4.
It seems lshd doesn't realize that there is data available from the
file NEW_KEY, and poll() is hanging. What does truss (or strace,
whatever the syscall tracing program is called) say about the lshd
process? Do you have poll(), or is lshd using the poll-by-select
wrapper?
> Also, if I try to specify --no-tcp-forward, I get this instead.
>
> ~/lsh-0.1.20/src> ./lshd -p 4711 -h NEW_KEY --debug --no-tcp-forward --trace -v
> assertion "LIST_LENGTH(body)" failed: file "command.c", line 354
Ooops. That's a bug. Happens for me too.
/Niels