On Mon, Jan 11, 1999 at 04:24:09PM +0100, Niels Möller wrote:
> Rafal Maszkowski <[EMAIL PROTECTED]> writes:
>
> > > I would be grateful if you people could test this a little. When the
> > > obvious bugs and portability problems are sorted out, I think I want
> > > to release an lsh-0.01.
> >
> > On Solaris 2.5.1:
> >
> > Undefined first referenced
> > symbol in file
> > inet_aton liblsh.a(io.o)
> > getopt_long lsh.o
> > ld: fatal: Symbol referencing errors. No output written to lsh
> > make: *** [lsh] Error 1
> >
> > 1st problem is already described in io.c, changing 1 to 0 in line 506
> > workarounds this. What would be the proper solution - using something more than
> > just 1 or 0 in #if or writing inet_aton function for Solaris?
>
> I didn't know if inet_aton was portable or not. I have now added a
> test for it to configure.in.
>
> > Missing getopt_long can be found in getopt1.c in glibc, I used version 2.1.108.
>
> The getopt files (getopt.h, getopt.c and getopt1.c) are supposed to be
> included in the distribution, but it seems they were left out. I have
> hacked the makefile and the configure script a little to make it work
> better.
>
> > Then it works but doesn't like -z z :
> >
> > rzm@galera:~/lsh/lsh-snapshot-1999-01-10,1> ./lsh -z z -p 24 galera
> > make_device_random: Failed to open '%s' (errno = %d): %s
> > Warning: Falling back to an insecure pseudorandom generator.
> > No such host or service
>
> Hmm, this is strange. I would think the options processing is broken.
> I have added a missing break; statement in lsh.c's main(), but I don't
> think that was related to this problem.
>
> The ugly error messages (with unexpanded %-sequences) are because
> there's no vsnprint() on your system. It would be better to include
> one in the distribution. Or use some custom format function instead.
>
> I just uploaded a new snapshot. Could you try it and see if it solves
> any of the problems?
After a break I am trying to run version 1999-01-28 now. All problems except
the one with -z option are fixed. I was able to connect lsh to lshd on Solaris.
One of he strange problems I've met is ignoring '\n' by tr so I have changed it
like
-AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | uniq |
tr -d '\n'`")
-AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 | sort
| uniq | tr -d '\n'`")
+AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_FIRST_CHARS, "`ls /dev/pty* | cut -c 9-9 | uniq |
+/usr/xpg4/bin/tr -d '\n'`")
+AC_DEFINE_UNQUOTED(PTY_BSD_SCHEME_SECOND_CHARS, "`ls /dev/pty* | cut -c 10-10 | sort
+| uniq | /usr/xpg4/bin/tr -d '\n'`")
in configure.in .
ioctl(newtty, TIOCSCTTY, NULL) in tty.c fails - looks like there is no
TIOCSCTTY on Solaris, at least 2.5.1 . I don't know what to use here instead.
I commented out this ioctl so the code compiles but lshd says
pty_setctty: Error disconnecting from controlling tty.
The commands I am typing after logging in seem to get to the shell after
entering another two characters. I don't know if it is related to missing
ioctl.
Another missing function is cfmakeraw() - I defined it as desribed in Linux man
page:
#define cfmakeraw(termios_p) { (termios_p)->c_iflag &=
~(IGNBRK|BRKINT|PARMRK|ISTRIP|INLCR|IGNCR|ICRNL|IXON); (termios_p)->c_oflag &= ~OPOST;
(termios_p)->c_lflag &= ~(ECHO|ECHONL|ICANON|ISIG|IEXTEN); (termios_p)->c_cflag &=
~(CSIZE|PARENB); (termios_p)->c_cflag |= CS8; }
In this version I discovered snprintf missing (not only vsnprintf) and hacked
some ugly workaround just to compile.
What could I do for the mankind:
- add some tests to do something with tr problem
- steal [v]snprintf from glibc-2.1 and put tests into configure.in
- add another compatibility function and test - cfmakeraw()
- move all compatibility functions into compatibility (or src/compatibility ?)
subdirectory
if all these belong to the Right Direction of works. The other things (-z,
TIOCSCTTY and delayed keystrokes) are too complicated for me now.
R.