Snapshot

Corinna Vinschen vinschen at cygnus.com
Sun Oct 1 00:34:33 EST 2000


Damien Miller wrote:
> 
> There is now a new snapshot available at:
> 
> http://www.mindrot.org/misc/openssh/
> 
> Please give this snapshot a good run on your platform of choice. When
> sending success/failure reports, please include the 'host system type'
> as reported by ./configure. It is hoped that this snapshot will become
> 2.2.0p2 in due course.

Tried on Cygwin:

./configure --prefix=/usr --sysconfdir=/etc --libexecprefix=/usr/sbin

Reported host system type: i686-pc-cygwin

- Compile time error: Too few arguments to binary_open.

  Creating cygwin_util.h is a good idea, however, open is typically
  called with two or three arguments, so binary_open() should be
  declared as

    int binary_open(const char*, int, ...);

- Compile time error: ssh.c: unknown struct rlimit.

  I think the `#ifdef' isn't correct:

    #if !defined(HAVE_SETRLIMIT) || !defined(HAVE_CYGWIN)

  Since Cygwin hasn't setrlimit, the second rule may be dropped and
  the first rule should be inverted, isn't it?

    #ifdef HAVE_SETRLIMIT

- Runtime error when trying to connect to sshd:

    /usr/X11R6/bin/xauth: (stdin):2:  bad display name "CVAIO/unix:10.0"
    in "add" command

  The "/unix" method isn't supported by the Cygwin port of X11R6.
  Therefore I had #ifndef'ed the lines in session.c which try to
  add the "host/unix:display.screen" string to xauth.
  For some reason these #ifndef lines disappeared between SNAP-20000916
  and 20000930.

After patching the above three points, everything went fine.

The needed patch is attached.

Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Developer                        mailto:cygwin at sources.redhat.com
Red Hat, Inc.
mailto:vinschen at cygnus.com
-------------- next part --------------
Index: cygwin_util.h
===================================================================
RCS file: /src/cvsroot/openssh-20000930/cygwin_util.h,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 cygwin_util.h
--- cygwin_util.h	2000/09/30 11:15:36	1.1.1.1
+++ cygwin_util.h	2000/09/30 11:52:48
@@ -17,7 +17,7 @@
 
 #ifdef HAVE_CYGWIN
 
-int binary_open(const char *filename, int flags, mode_t mode);
+int binary_open(const char *filename, int flags, ...);
 int binary_pipe(int fd[2]);
 int check_nt_auth(int pwd_authenticated, uid_t uid);
 int check_ntsec(const char *filename);
Index: session.c
===================================================================
RCS file: /src/cvsroot/openssh-20000930/session.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 session.c
--- session.c	2000/09/30 11:15:37	1.1.1.1
+++ session.c	2000/09/30 12:16:42
@@ -1327,11 +1327,13 @@ do_child(const char *command, struct pas
 					    "Running %.100s add %.100s %.100s %.100s\n",
 					    options.xauth_location, display,
 					    auth_proto, auth_data);
+#ifndef HAVE_CYGWIN
 					if (screen != NULL)
 						fprintf(stderr,
 						    "Adding %.*s/unix%s %s %s\n",
 						    (int)(screen-display), display,
 						    screen, auth_proto, auth_data);
+#endif
 				}
 				snprintf(cmd, sizeof cmd, "%s -q -",
 				    options.xauth_location);
@@ -1339,10 +1341,12 @@ do_child(const char *command, struct pas
 				if (f) {
 					fprintf(f, "add %s %s %s\n", display,
 					    auth_proto, auth_data);
+#ifndef HAVE_CYGWIN
 					if (screen != NULL) 
 						fprintf(f, "add %.*s/unix%s %s %s\n",
 						    (int)(screen-display), display,
 						    screen, auth_proto, auth_data);
+#endif
 					pclose(f);
 				} else {
 					fprintf(stderr, "Could not run %s\n",
Index: ssh.c
===================================================================
RCS file: /src/cvsroot/openssh-20000930/ssh.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 ssh.c
--- ssh.c	2000/09/30 11:15:37	1.1.1.1
+++ ssh.c	2000/09/30 11:58:09
@@ -244,7 +244,7 @@ main(int ac, char **av)
 	original_real_uid = getuid();
 	original_effective_uid = geteuid();
 
-#if !defined(HAVE_SETRLIMIT) || !defined(HAVE_CYGWIN)
+#if defined(HAVE_SETRLIMIT)
 	/* If we are installed setuid root be careful to not drop core. */
 	if (original_real_uid != original_effective_uid) {
 		struct rlimit rlim;


More information about the openssh-unix-dev mailing list