[PATCH] Fix minor breakage on Cygwin: auth-passwd.c and session.c
Darren Tucker
dtucker at zip.com.au
Tue Aug 5 20:23:00 EST 2003
Ben Lindstrom wrote:
> However, yes. The code should go to bsd-cygwin_util.h unless there is
> some overriding reason not to... Corinna is there a reason we shouldn't
> make this change?
Here's the current proposed patch, which works for me.
No one has commented on the session_break_req() change...
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
-------------- next part --------------
Index: session.c
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/session.c,v
retrieving revision 1.242
diff -u -r1.242 session.c
--- session.c 2 Aug 2003 12:24:50 -0000 1.242
+++ session.c 4 Aug 2003 00:48:47 -0000
@@ -58,12 +58,6 @@
#include "session.h"
#include "monitor_wrap.h"
-#ifdef HAVE_CYGWIN
-#include <windows.h>
-#include <sys/cygwin.h>
-#define is_winnt (GetVersion() < 0x80000000)
-#endif
-
/* func */
Session *session_new(void);
@@ -1702,6 +1696,7 @@
break_length = packet_get_int();
packet_check_eom();
+#if defined(TIOCSBRK) && defined(TIOCCBRK)
if (s->ttyfd == -1)
return 0;
/* we will sleep from 500ms to 3000ms */
@@ -1712,6 +1707,9 @@
usleep(break_length * 1000);
ioctl(s->ttyfd, TIOCCBRK, NULL);
return 1;
+#else
+ return 0;
+#endif
}
static int
Index: openbsd-compat/bsd-cygwin_util.h
===================================================================
RCS file: /usr/local/src/security/openssh/cvs/openssh_cvs/openbsd-compat/bsd-cygwin_util.h,v
retrieving revision 1.8
diff -u -r1.8 bsd-cygwin_util.h
--- openbsd-compat/bsd-cygwin_util.h 18 May 2003 14:13:39 -0000 1.8
+++ openbsd-compat/bsd-cygwin_util.h 4 Aug 2003 11:20:02 -0000
@@ -36,6 +36,11 @@
#ifdef HAVE_CYGWIN
+#undef ERROR
+#define is_winnt (GetVersion() < 0x80000000)
+
+#include <windows.h>
+#include <sys/cygwin.h>
#include <io.h>
int binary_open(const char *, int , ...);
More information about the openssh-unix-dev
mailing list