]> andersk Git - openssh.git/commitdiff
- Warning was valid - possible race condition on PTYs. Avoided using
authordamien <damien>
Thu, 2 Mar 2000 12:56:12 +0000 (12:56 +0000)
committerdamien <damien>
Thu, 2 Mar 2000 12:56:12 +0000 (12:56 +0000)
   platform-specific code.
 - Document some common problems

ChangeLog
UPGRADING
acconfig.h
configure.in
pty.c

index 4d3e87fbc7b5334e801d81d17f38669b771b7b73..b6c604e83dd72df3efee86ebffd2f0d9629e07b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
      RSA support built in (this is a problem with OpenSSL 0.9.5).
  - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de
  - Avoid warning message with Unix98 ptys
+ - Warning was valid - possible race condition on PTYs. Avoided using 
+   platform-specific code.
+ - Document some common problems
 
 20000207
  - Removed SOCKS code. Will support through a ProxyCommand.
index 8f661cdbb188b4d740a84b4ff4292adb59937e7d..c970525cc6f6224a57eabb3521619f37db593122 100644 (file)
--- a/UPGRADING
+++ b/UPGRADING
@@ -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 
 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.
+
index 9af1117c7181cf2e7b7ac7633ba13f9ed7e3562f..530c528156502ebbe380f486b670aa4cc12aa547 100644 (file)
 /* getaddrinfo is broken (if present) */
 #undef BROKEN_GETADDRINFO
 
+/* Whether Unix98 ptys are automatically removed when they are closed */
+#undef PTY_REMOVED_ON_CLOSE
+
 @BOTTOM@
 
 /* ******************* Shouldn't need to edit below this line ************** */
index 1cb46525cad7c8e3cd6e98fb30d4f51bf82320f0..e5bdc445c605adca6b5482975653421e695768d1 100644 (file)
@@ -55,6 +55,7 @@ case "$host" in
        ;;
 *-*-linux*)
        no_dev_ptmx=1
+       need_pty_removed_on_close=1
        ;;
 *-*-netbsd*)
        need_dash_r=1
@@ -518,9 +519,27 @@ if test ! -z "$nolastlog" ; then
 fi
 
 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
-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
 
diff --git a/pty.c b/pty.c
index 800d0e5ff470d0765d5cb9632ed22fd02cae0b24..3f51cf3b706271bb5f4d9fc88747df5aec4e9c75 100644 (file)
--- a/pty.c
+++ b/pty.c
@@ -187,10 +187,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen)
 void 
 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));
-       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));
+#endif /* PTY_REMOVED_ON_CLOSE */
 }
 
 /* Makes the tty the processes controlling tty and sets it to sane modes. */
This page took 0.048101 seconds and 5 git commands to generate.