Keresztfalvi Gabor <[EMAIL PROTECTED]> writes:
> On Sun, 7 Mar 1999, Jason Titus wrote:
>
> > tty_setctty: unlockpt() failed,
> > (errno = 14): Bad address
> > lshd: Can't set controlling tty for child!
> > Child 2467 died with exit code 1.
> Unfortunately there is an other werror("tty_setctty: unlockpt()
> failed...") at line 213 in server_pty.c which confused all of us...
> Indeed it's quite different error from unlockpt, because it's a
> problem of open. Try checking the contents of struct pty_info *pty
> in tty_setctty/server_pty.c. I can't trace it, because I have no
> access to system with /dev/ptmx...
Ooops. The error code is EFAULT, which seems to indicate that the
filename argument pointed into void. Which would indicate that
pty->tty_name was NULL, for some reason.
> P.s.: BTW what grantpt and unlockpt do in reality? Can't we emulate the
> necessary parts to fall to the corrext UID/GID?
I'm not entirely sure. Perhaps we'll have to read glibc source code to
find out. Or get the APUE book. But I'm afraid it is impossible to
emulate the operations unless we run as root. It should be possible to
run lshd also without root privileges.
/Niels