- (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
vhangup on Linux. It doens't work for non-root users, and for them it just messes up the tty settings.
This commit is contained in:
parent
7f1c264d30
commit
18912775cb
|
@ -1,3 +1,8 @@
|
|||
20140521
|
||||
- (djm) [commit configure.ac defines.h sshpty.c] don't attempt to use
|
||||
vhangup on Linux. It doens't work for non-root users, and for them
|
||||
it just messes up the tty settings.
|
||||
|
||||
20140519
|
||||
- (djm) [rijndael.c rijndael.h] Sync with newly-ressurected versions ine
|
||||
OpenBSD
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $Id: configure.ac,v 1.573 2014/05/15 04:58:08 djm Exp $
|
||||
# $Id: configure.ac,v 1.574 2014/05/21 07:06:47 djm Exp $
|
||||
#
|
||||
# Copyright (c) 1999-2004 Damien Miller
|
||||
#
|
||||
|
@ -15,7 +15,7 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
|
||||
AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
|
||||
AC_REVISION($Revision: 1.573 $)
|
||||
AC_REVISION($Revision: 1.574 $)
|
||||
AC_CONFIG_SRCDIR([ssh.c])
|
||||
AC_LANG([C])
|
||||
|
||||
|
@ -1736,7 +1736,6 @@ AC_CHECK_FUNCS([ \
|
|||
user_from_uid \
|
||||
usleep \
|
||||
vasprintf \
|
||||
vhangup \
|
||||
vsnprintf \
|
||||
waitpid \
|
||||
])
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#ifndef _DEFINES_H
|
||||
#define _DEFINES_H
|
||||
|
||||
/* $Id: defines.h,v 1.179 2014/05/15 04:37:04 djm Exp $ */
|
||||
/* $Id: defines.h,v 1.180 2014/05/21 07:06:47 djm Exp $ */
|
||||
|
||||
|
||||
/* Constants */
|
||||
|
@ -603,10 +603,6 @@ struct winsize {
|
|||
# define memmove(s1, s2, n) bcopy((s2), (s1), (n))
|
||||
#endif /* !defined(HAVE_MEMMOVE) && defined(HAVE_BCOPY) */
|
||||
|
||||
#if defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX)
|
||||
# define USE_VHANGUP
|
||||
#endif /* defined(HAVE_VHANGUP) && !defined(HAVE_DEV_PTMX) */
|
||||
|
||||
#ifndef GETPGRP_VOID
|
||||
# include <unistd.h>
|
||||
# define getpgrp() getpgrp(0)
|
||||
|
|
13
sshpty.c
13
sshpty.c
|
@ -99,9 +99,6 @@ void
|
|||
pty_make_controlling_tty(int *ttyfd, const char *tty)
|
||||
{
|
||||
int fd;
|
||||
#ifdef USE_VHANGUP
|
||||
void *old;
|
||||
#endif /* USE_VHANGUP */
|
||||
|
||||
#ifdef _UNICOS
|
||||
if (setsid() < 0)
|
||||
|
@ -157,21 +154,11 @@ pty_make_controlling_tty(int *ttyfd, const char *tty)
|
|||
if (setpgrp(0,0) < 0)
|
||||
error("SETPGRP %s",strerror(errno));
|
||||
#endif /* NEED_SETPGRP */
|
||||
#ifdef USE_VHANGUP
|
||||
old = signal(SIGHUP, SIG_IGN);
|
||||
vhangup();
|
||||
signal(SIGHUP, old);
|
||||
#endif /* USE_VHANGUP */
|
||||
fd = open(tty, O_RDWR);
|
||||
if (fd < 0) {
|
||||
error("%.100s: %.100s", tty, strerror(errno));
|
||||
} else {
|
||||
#ifdef USE_VHANGUP
|
||||
close(*ttyfd);
|
||||
*ttyfd = fd;
|
||||
#else /* USE_VHANGUP */
|
||||
close(fd);
|
||||
#endif /* USE_VHANGUP */
|
||||
}
|
||||
/* Verify that we now have a controlling tty. */
|
||||
fd = open(_PATH_TTY, O_WRONLY);
|
||||
|
|
Loading…
Reference in New Issue