diff options
author | Damien Miller <djm@mindrot.org> | 2014-05-21 17:06:46 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2014-05-21 17:06:46 +1000 |
commit | 18912775cb97c0b1e75e838d3c7d4b56648137b5 (patch) | |
tree | 4f9680415a0fa5588caf9d0fc6246e322f515979 /sshpty.c | |
parent | 7f1c264d3049cd95234e91970ccb5406e1d15b27 (diff) | |
download | openssh-git-18912775cb97c0b1e75e838d3c7d4b56648137b5.tar.gz |
- (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.
Diffstat (limited to 'sshpty.c')
-rw-r--r-- | sshpty.c | 13 |
1 files changed, 0 insertions, 13 deletions
@@ -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); |