Re: Call for testing: OpenSSH 7.3

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On Jul 22 14:40, Damien Miller wrote:
> Hi,
> 
> OpenSSH 7.3 is almost ready for release, so we would appreciate testing

This version doesn't build on Cygwin anymore.  The reason is that
various configure tests fail.

The culprit is the new definition of IPPORT_RESERVED to 0 in configure.ac.

After setting this value in configure, confdefs.h contains

  #define IPPORT_RESERVED 0

netinet/in.h defines IPPORT_RESERVED as enum, just as on other systems:

  enum
  {
    [...]
    IPPORT_RESERVED = 1024,
    [...]
  };

Since confdefs.h is evaluated *before* including any headers during
configure, we have the following situation:

  #define IPPORT_RESERVED 0
  #include <netinet/in.h>
  --> enum { IPPORT_RESERVED = 1024 };

which evaluates to

  enum { 0 = 1024 };

which then leads to a compiler error:

  conftest.c:66:25: error: expected identifier before numeric constant

and thus to a broken configuration.

The same problem occurs when trying to build the source since config.h
is included via includes.h prior to the system headers.

So the simplification from NO_IPPORT_RESERVED_CONCEPT to just
defining IPPORT_RESERVED as 0 doesn't work as desired.

Can we revert this to the former NO_IPPORT_RESERVED_CONCEPT, please?

I created the below patch which is less intrusive than the original
patch.  I tested that it works as desired and OpenSSH 7.3 builds
on Cygwin.

I have not *tested* OpenSSH7.3 on Cygwin yet.  I'll report back in a
followup mail.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat
From 6fd39268386c130dd0444df761e9e565da47cae5 Mon Sep 17 00:00:00 2001
From: Corinna Vinschen <vinschen@xxxxxxxxxx>
Date: Fri, 22 Jul 2016 11:56:52 +0200
Subject: [PATCH] Don't define IPPORT_RESERVED to 0 in configure.ac.

This leads to a broken configuration due to compile time errors
during a configure run, as well as to build errors afterwards.

To wit:

  #define IPPORT_RESERVED 0

  /* #include <netinet/in.h> */
    enum {
      [...]
      IPPORT_RESERVED = 1024,
      [...]
    };

Signed-off-by: Corinna Vinschen <vinschen@xxxxxxxxxx>
---
 configure.ac | 5 +++--
 readconf.c   | 4 ++++
 serverloop.c | 4 ++++
 3 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 21ef389..2cd6a6f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -589,8 +589,9 @@ case "$host" in
 		[Define if you want to disable shadow passwords])
 	AC_DEFINE([NO_X11_UNIX_SOCKETS], [1],
 		[Define if X11 doesn't support AF_UNIX sockets on that system])
-	AC_DEFINE([IPPORT_RESERVED], [0],
-		[Cygwin has no notion of ports only accessible to superusers])
+	AC_DEFINE([NO_IPPORT_RESERVED_CONCEPT], [1],
+		[Define if the concept of ports only accessible to
+		superusers isn't known])
 	AC_DEFINE([DISABLE_FD_PASSING], [1],
 		[Define if your platform needs to skip post auth
 		file descriptor passing])
diff --git a/readconf.c b/readconf.c
index c177202..f823a63 100644
--- a/readconf.c
+++ b/readconf.c
@@ -67,6 +67,10 @@
 #include "myproposal.h"
 #include "digest.h"
 
+#ifdef NO_IPPORT_RESERVED_CONCEPT
+#define IPPORT_RESERVED 0
+#endif
+
 /* Format of the configuration file:
 
    # Configuration data is parsed as follows:
diff --git a/serverloop.c b/serverloop.c
index 3563e5d..f2c274e 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -80,6 +80,10 @@
 #include "serverloop.h"
 #include "ssherr.h"
 
+#ifdef NO_IPPORT_RESERVED_CONCEPT
+#define IPPORT_RESERVED 0
+#endif
+
 extern ServerOptions options;
 
 /* XXX */
-- 
2.5.5

Attachment: signature.asc
Description: PGP signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux