- Warning was valid - possible race condition on PTYs. Avoided using

platform-specific code.
 - Document some common problems
This commit is contained in:
Damien Miller 2000-03-02 23:56:12 +11:00
parent c4cea3e5c7
commit 204ad074e5
5 changed files with 49 additions and 5 deletions

View File

@ -7,6 +7,9 @@
RSA support built in (this is a problem with OpenSSL 0.9.5). RSA support built in (this is a problem with OpenSSL 0.9.5).
- Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de
- Avoid warning message with Unix98 ptys - Avoid warning message with Unix98 ptys
- Warning was valid - possible race condition on PTYs. Avoided using
platform-specific code.
- Document some common problems
20000207 20000207
- Removed SOCKS code. Will support through a ProxyCommand. - Removed SOCKS code. Will support through a ProxyCommand.

View File

@ -103,3 +103,20 @@ use the 'idea' cipher attempts to connect to an OpenSSH server. To rectify
this, select a different cipher in ssh_config or ~/.ssh/config (3des for this, select a different cipher in ssh_config or ~/.ssh/config (3des for
security or blowfish for speed). security or blowfish for speed).
10. "can't locate module net-pf-10" messages in log under Linux
The Linux kernel is looking (via modprobe) for protocol family 10 (IPv6).
Either 1. load the appropriate kernel module, 2. enter the correct alias
in /etc/modules.conf or 3. disable IPv6 in /etc/modules.conf.
For some silly reason /etc/modules.conf may also be named /etc/conf.modules
11. Password authentication doesn't work on Slackware 7.0
Configure OpenSSH with --with-md5-passwords
12. ./configure or sshd complain about lack of RSA support
Ensure that your OpenSSL libraries have been built to include RSA support
either internally or through RSAref.

View File

@ -150,6 +150,9 @@
/* getaddrinfo is broken (if present) */ /* getaddrinfo is broken (if present) */
#undef BROKEN_GETADDRINFO #undef BROKEN_GETADDRINFO
/* Whether Unix98 ptys are automatically removed when they are closed */
#undef PTY_REMOVED_ON_CLOSE
@BOTTOM@ @BOTTOM@
/* ******************* Shouldn't need to edit below this line ************** */ /* ******************* Shouldn't need to edit below this line ************** */

View File

@ -55,6 +55,7 @@ case "$host" in
;; ;;
*-*-linux*) *-*-linux*)
no_dev_ptmx=1 no_dev_ptmx=1
need_pty_removed_on_close=1
;; ;;
*-*-netbsd*) *-*-netbsd*)
need_dash_r=1 need_dash_r=1
@ -518,9 +519,27 @@ if test ! -z "$nolastlog" ; then
fi fi
if test -z "$no_dev_ptmx" ; then if test -z "$no_dev_ptmx" ; then
AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) AC_CHECK_FILE("/dev/ptmx",
[
AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)
have_dev_ptmx=1
]
)
fi
AC_CHECK_FILE("/dev/ptc",
[
AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)
have_dev_ptc=1
]
)
# Some systems (defined in platform-specific code above) automagically remove
# Unix98 ptys when they are closed
if test "x$ac_cv_func_openpty" = "xyes" -o "x$have_dev_ptmx" = "x1" -o "x$have_dev_ptc" = "x1" ; then
if test "x$need_pty_removed_on_close" = "x1" ; then
AC_DEFINE(PTY_REMOVED_ON_CLOSE)
fi
fi fi
AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC))
# Options from here on. Some of these are preset by platform above # Options from here on. Some of these are preset by platform above

8
pty.c
View File

@ -14,7 +14,7 @@
*/ */
#include "includes.h" #include "includes.h"
RCSID("$Id: pty.c,v 1.13 2000/03/02 12:31:50 damien Exp $"); RCSID("$Id: pty.c,v 1.14 2000/03/02 12:56:13 damien Exp $");
#ifdef HAVE_UTIL_H #ifdef HAVE_UTIL_H
# include <util.h> # include <util.h>
@ -187,10 +187,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
void void
pty_release(const char *ttyname) pty_release(const char *ttyname)
{ {
if ((chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) && (errno != ENOENT)) #ifndef PTY_REMOVED_ON_CLOSE
if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0)
error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno));
if ((chmod(ttyname, (mode_t) 0666) < 0) && (errno != ENOENT)) if (chmod(ttyname, (mode_t) 0666) < 0)
error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno));
#endif /* PTY_REMOVED_ON_CLOSE */
} }
/* Makes the tty the processes controlling tty and sets it to sane modes. */ /* Makes the tty the processes controlling tty and sets it to sane modes. */