diff options
author | Damien Miller <djm@mindrot.org> | 2000-03-02 23:56:12 +1100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-03-02 23:56:12 +1100 |
commit | 204ad074e51c0e9c25666eb044e4c255bcfe64b6 (patch) | |
tree | 4c436060e703711ea7fb31ae55329ae414cf86f8 | |
parent | c4cea3e5c71c8f2d48ee22ea05d26a47fb47ad29 (diff) |
- Warning was valid - possible race condition on PTYs. Avoided using
platform-specific code.
- Document some common problems
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | UPGRADING | 17 | ||||
-rw-r--r-- | acconfig.h | 3 | ||||
-rw-r--r-- | configure.in | 23 | ||||
-rw-r--r-- | pty.c | 8 |
5 files changed, 49 insertions, 5 deletions
@@ -7,6 +7,9 @@ | |||
7 | RSA support built in (this is a problem with OpenSSL 0.9.5). | 7 | RSA support built in (this is a problem with OpenSSL 0.9.5). |
8 | - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de | 8 | - Applied pty cleanup patch from markus.friedl@informatik.uni-erlangen.de |
9 | - Avoid warning message with Unix98 ptys | 9 | - Avoid warning message with Unix98 ptys |
10 | - Warning was valid - possible race condition on PTYs. Avoided using | ||
11 | platform-specific code. | ||
12 | - Document some common problems | ||
10 | 13 | ||
11 | 20000207 | 14 | 20000207 |
12 | - Removed SOCKS code. Will support through a ProxyCommand. | 15 | - Removed SOCKS code. Will support through a ProxyCommand. |
@@ -103,3 +103,20 @@ use the 'idea' cipher attempts to connect to an OpenSSH server. To rectify | |||
103 | this, select a different cipher in ssh_config or ~/.ssh/config (3des for | 103 | this, select a different cipher in ssh_config or ~/.ssh/config (3des for |
104 | security or blowfish for speed). | 104 | security or blowfish for speed). |
105 | 105 | ||
106 | 10. "can't locate module net-pf-10" messages in log under Linux | ||
107 | |||
108 | The Linux kernel is looking (via modprobe) for protocol family 10 (IPv6). | ||
109 | Either 1. load the appropriate kernel module, 2. enter the correct alias | ||
110 | in /etc/modules.conf or 3. disable IPv6 in /etc/modules.conf. | ||
111 | |||
112 | For some silly reason /etc/modules.conf may also be named /etc/conf.modules | ||
113 | |||
114 | 11. Password authentication doesn't work on Slackware 7.0 | ||
115 | |||
116 | Configure OpenSSH with --with-md5-passwords | ||
117 | |||
118 | 12. ./configure or sshd complain about lack of RSA support | ||
119 | |||
120 | Ensure that your OpenSSL libraries have been built to include RSA support | ||
121 | either internally or through RSAref. | ||
122 | |||
diff --git a/acconfig.h b/acconfig.h index 9af1117c7..530c52815 100644 --- a/acconfig.h +++ b/acconfig.h | |||
@@ -150,6 +150,9 @@ | |||
150 | /* getaddrinfo is broken (if present) */ | 150 | /* getaddrinfo is broken (if present) */ |
151 | #undef BROKEN_GETADDRINFO | 151 | #undef BROKEN_GETADDRINFO |
152 | 152 | ||
153 | /* Whether Unix98 ptys are automatically removed when they are closed */ | ||
154 | #undef PTY_REMOVED_ON_CLOSE | ||
155 | |||
153 | @BOTTOM@ | 156 | @BOTTOM@ |
154 | 157 | ||
155 | /* ******************* Shouldn't need to edit below this line ************** */ | 158 | /* ******************* Shouldn't need to edit below this line ************** */ |
diff --git a/configure.in b/configure.in index 1cb46525c..e5bdc445c 100644 --- a/configure.in +++ b/configure.in | |||
@@ -55,6 +55,7 @@ case "$host" in | |||
55 | ;; | 55 | ;; |
56 | *-*-linux*) | 56 | *-*-linux*) |
57 | no_dev_ptmx=1 | 57 | no_dev_ptmx=1 |
58 | need_pty_removed_on_close=1 | ||
58 | ;; | 59 | ;; |
59 | *-*-netbsd*) | 60 | *-*-netbsd*) |
60 | need_dash_r=1 | 61 | need_dash_r=1 |
@@ -518,9 +519,27 @@ if test ! -z "$nolastlog" ; then | |||
518 | fi | 519 | fi |
519 | 520 | ||
520 | if test -z "$no_dev_ptmx" ; then | 521 | if test -z "$no_dev_ptmx" ; then |
521 | AC_CHECK_FILE("/dev/ptmx", AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX)) | 522 | AC_CHECK_FILE("/dev/ptmx", |
523 | [ | ||
524 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX) | ||
525 | have_dev_ptmx=1 | ||
526 | ] | ||
527 | ) | ||
528 | fi | ||
529 | AC_CHECK_FILE("/dev/ptc", | ||
530 | [ | ||
531 | AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC) | ||
532 | have_dev_ptc=1 | ||
533 | ] | ||
534 | ) | ||
535 | |||
536 | # Some systems (defined in platform-specific code above) automagically remove | ||
537 | # Unix98 ptys when they are closed | ||
538 | if test "x$ac_cv_func_openpty" = "xyes" -o "x$have_dev_ptmx" = "x1" -o "x$have_dev_ptc" = "x1" ; then | ||
539 | if test "x$need_pty_removed_on_close" = "x1" ; then | ||
540 | AC_DEFINE(PTY_REMOVED_ON_CLOSE) | ||
541 | fi | ||
522 | fi | 542 | fi |
523 | AC_CHECK_FILE("/dev/ptc", AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC)) | ||
524 | 543 | ||
525 | # Options from here on. Some of these are preset by platform above | 544 | # Options from here on. Some of these are preset by platform above |
526 | 545 | ||
@@ -14,7 +14,7 @@ | |||
14 | */ | 14 | */ |
15 | 15 | ||
16 | #include "includes.h" | 16 | #include "includes.h" |
17 | RCSID("$Id: pty.c,v 1.13 2000/03/02 12:31:50 damien Exp $"); | 17 | RCSID("$Id: pty.c,v 1.14 2000/03/02 12:56:13 damien Exp $"); |
18 | 18 | ||
19 | #ifdef HAVE_UTIL_H | 19 | #ifdef HAVE_UTIL_H |
20 | # include <util.h> | 20 | # include <util.h> |
@@ -187,10 +187,12 @@ pty_allocate(int *ptyfd, int *ttyfd, char *namebuf, int namebuflen) | |||
187 | void | 187 | void |
188 | pty_release(const char *ttyname) | 188 | pty_release(const char *ttyname) |
189 | { | 189 | { |
190 | if ((chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) && (errno != ENOENT)) | 190 | #ifndef PTY_REMOVED_ON_CLOSE |
191 | if (chown(ttyname, (uid_t) 0, (gid_t) 0) < 0) | ||
191 | error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); | 192 | error("chown %.100s 0 0 failed: %.100s", ttyname, strerror(errno)); |
192 | if ((chmod(ttyname, (mode_t) 0666) < 0) && (errno != ENOENT)) | 193 | if (chmod(ttyname, (mode_t) 0666) < 0) |
193 | error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); | 194 | error("chmod %.100s 0666 failed: %.100s", ttyname, strerror(errno)); |
195 | #endif /* PTY_REMOVED_ON_CLOSE */ | ||
194 | } | 196 | } |
195 | 197 | ||
196 | /* Makes the tty the processes controlling tty and sets it to sane modes. */ | 198 | /* Makes the tty the processes controlling tty and sets it to sane modes. */ |