diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | defines.h | 6 | ||||
-rw-r--r-- | sshpty.c | 13 |
4 files changed, 8 insertions, 21 deletions
@@ -1,3 +1,8 @@ | |||
1 | 20140521 | ||
2 | - (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use | ||
3 | vhangup on Linux. It doens't work for non-root users, and for them | ||
4 | it just messes up the tty settings. | ||
5 | |||
1 | 20140519 | 6 | 20140519 |
2 | - (djm) [rijndael.c rijndael.h] Sync with newly-ressurected versions ine | 7 | - (djm) [rijndael.c rijndael.h] Sync with newly-ressurected versions ine |
3 | OpenBSD | 8 | OpenBSD |
diff --git a/configure.ac b/configure.ac index 058cfd090..7a89b57e6 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -1,4 +1,4 @@ | |||
1 | # $Id: configure.ac,v 1.573 2014/05/15 04:58:08 djm Exp $ | 1 | # $Id: configure.ac,v 1.574 2014/05/21 07:06:47 djm Exp $ |
2 | # | 2 | # |
3 | # Copyright (c) 1999-2004 Damien Miller | 3 | # Copyright (c) 1999-2004 Damien Miller |
4 | # | 4 | # |
@@ -15,7 +15,7 @@ | |||
15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 15 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
16 | 16 | ||
17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) | 17 | AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org]) |
18 | AC_REVISION($Revision: 1.573 $) | 18 | AC_REVISION($Revision: 1.574 $) |
19 | AC_CONFIG_SRCDIR([ssh.c]) | 19 | AC_CONFIG_SRCDIR([ssh.c]) |
20 | AC_LANG([C]) | 20 | AC_LANG([C]) |
21 | 21 | ||
@@ -1736,7 +1736,6 @@ AC_CHECK_FUNCS([ \ | |||
1736 | user_from_uid \ | 1736 | user_from_uid \ |
1737 | usleep \ | 1737 | usleep \ |
1738 | vasprintf \ | 1738 | vasprintf \ |
1739 | vhangup \ | ||
1740 | vsnprintf \ | 1739 | vsnprintf \ |
1741 | waitpid \ | 1740 | waitpid \ |
1742 | ]) | 1741 | ]) |
@@ -25,7 +25,7 @@ | |||
25 | #ifndef _DEFINES_H | 25 | #ifndef _DEFINES_H |
26 | #define _DEFINES_H | 26 | #define _DEFINES_H |
27 | 27 | ||
28 | /* $Id: defines.h,v 1.179 2014/05/15 04:37:04 djm Exp $ */ | 28 | /* $Id: defines.h,v 1.180 2014/05/21 07:06:47 djm Exp $ */ |
29 | 29 | ||
30 | 30 | ||
31 | /* Constants */ | 31 | /* Constants */ |
@@ -603,10 +603,6 @@ struct winsize { | |||
603 | # define memmove(s1, s2, n) bcopy((s2), (s1), (n)) | 603 | # define memmove(s1, s2, n) bcopy((s2), (s1), (n)) |
604 | #endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */ | 604 | #endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */ |
605 | 605 | ||
606 | #if defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) | ||
607 | # define USE_VHANGUP | ||
608 | #endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */ | ||
609 | |||
610 | #ifndef GETPGRP_VOID | 606 | #ifndef GETPGRP_VOID |
611 | # include <unistd.h> | 607 | # include <unistd.h> |
612 | # define getpgrp() getpgrp(0) | 608 | # define getpgrp() getpgrp(0) |
@@ -99,9 +99,6 @@ void | |||
99 | pty_make_controlling_tty(int *ttyfd, const char *tty) | 99 | pty_make_controlling_tty(int *ttyfd, const char *tty) |
100 | { | 100 | { |
101 | int fd; | 101 | int fd; |
102 | #ifdef USE_VHANGUP | ||
103 | void *old; | ||
104 | #endif /* USE_VHANGUP */ | ||
105 | 102 | ||
106 | #ifdef _UNICOS | 103 | #ifdef _UNICOS |
107 | if (setsid() < 0) | 104 | if (setsid() < 0) |
@@ -157,21 +154,11 @@ pty_make_controlling_tty(int *ttyfd, const char *tty) | |||
157 | if (setpgrp(0,0) < 0) | 154 | if (setpgrp(0,0) < 0) |
158 | error("SETPGRP %s",strerror(errno)); | 155 | error("SETPGRP %s",strerror(errno)); |
159 | #endif /* NEED_SETPGRP */ | 156 | #endif /* NEED_SETPGRP */ |
160 | #ifdef USE_VHANGUP | ||
161 | old = signal(SIGHUP, SIG_IGN); | ||
162 | vhangup(); | ||
163 | signal(SIGHUP, old); | ||
164 | #endif /* USE_VHANGUP */ | ||
165 | fd = open(tty, O_RDWR); | 157 | fd = open(tty, O_RDWR); |
166 | if (fd < 0) { | 158 | if (fd < 0) { |
167 | error("%.100s: %.100s", tty, strerror(errno)); | 159 | error("%.100s: %.100s", tty, strerror(errno)); |
168 | } else { | 160 | } else { |
169 | #ifdef USE_VHANGUP | ||
170 | close(*ttyfd); | ||
171 | *ttyfd = fd; | ||
172 | #else /* USE_VHANGUP */ | ||
173 | close(fd); | 161 | close(fd); |
174 | #endif /* USE_VHANGUP */ | ||
175 | } | 162 | } |
176 | /* Verify that we now have a controlling tty. */ | 163 | /* Verify that we now have a controlling tty. */ |
177 | fd = open(_PATH_TTY, O_WRONLY); | 164 | fd = open(_PATH_TTY, O_WRONLY); |