summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2003-08-13 20:31:05 +1000
committerDarren Tucker <dtucker@zip.com.au>2003-08-13 20:31:05 +1000
commit3bdbd848ea86c27a65ee766fd2c9d9158dadb381 (patch)
tree8de83070ca7ee651b8840ed9a4c44c68009638e6
parentd85efee43778647ea6505e44f1f9520a841015c4 (diff)
- markus@cvs.openbsd.org 2003/08/13 08:33:02
[session.c] use more portable tcsendbreak(3) and ignore break_length; ok deraadt, millert
-rw-r--r--ChangeLog7
-rw-r--r--session.c14
2 files changed, 10 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 2e2c5a3b5..f80dea665 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
120030813 120030813
2 - (dtucker) [session.c] Remove #ifdef TIOCSBRK kludge. 2 - (dtucker) [session.c] Remove #ifdef TIOCSBRK kludge.
3 - (dtucker) OpenBSD CVS Sync
4 - markus@cvs.openbsd.org 2003/08/13 08:33:02
5 [session.c]
6 use more portable tcsendbreak(3) and ignore break_length;
7 ok deraadt, millert
3 8
420030811 920030811
5 - (dtucker) OpenBSD CVS Sync 10 - (dtucker) OpenBSD CVS Sync
@@ -818,4 +823,4 @@
818 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo. 823 - Fix sshd BindAddress and -b options for systems using fake-getaddrinfo.
819 Report from murple@murple.net, diagnosis from dtucker@zip.com.au 824 Report from murple@murple.net, diagnosis from dtucker@zip.com.au
820 825
821$Id: ChangeLog,v 1.2889 2003/08/13 10:28:14 dtucker Exp $ 826$Id: ChangeLog,v 1.2890 2003/08/13 10:31:05 dtucker Exp $
diff --git a/session.c b/session.c
index 69d925eff..d3ef89a0c 100644
--- a/session.c
+++ b/session.c
@@ -33,7 +33,7 @@
33 */ 33 */
34 34
35#include "includes.h" 35#include "includes.h"
36RCSID("$OpenBSD: session.c,v 1.159 2003/07/22 13:35:22 markus Exp $"); 36RCSID("$OpenBSD: session.c,v 1.160 2003/08/13 08:33:02 markus Exp $");
37 37
38#include "ssh.h" 38#include "ssh.h"
39#include "ssh1.h" 39#include "ssh1.h"
@@ -1693,18 +1693,12 @@ session_break_req(Session *s)
1693{ 1693{
1694 u_int break_length; 1694 u_int break_length;
1695 1695
1696 break_length = packet_get_int(); 1696 break_length = packet_get_int(); /* ignored */
1697 packet_check_eom(); 1697 packet_check_eom();
1698 1698
1699 if (s->ttyfd == -1) 1699 if (s->ttyfd == -1 ||
1700 tcsendbreak(s->ttyfd, 0) < 0)
1700 return 0; 1701 return 0;
1701 /* we will sleep from 500ms to 3000ms */
1702 break_length = MIN(break_length, 3000);
1703 break_length = MAX(break_length, 500);
1704 ioctl(s->ttyfd, TIOCSBRK, NULL);
1705 /* should we care about EINTR? */
1706 usleep(break_length * 1000);
1707 ioctl(s->ttyfd, TIOCCBRK, NULL);
1708 return 1; 1702 return 1;
1709} 1703}
1710 1704