On Sep 1 13:31, Darren Tucker wrote:
> On Wed, Aug 30, 2006 at 06:35:21PM +0200, Corinna Vinschen wrote:
> > Cygwin 1.5.21, OpenSSL 0.9.8b

>
> Thanks for testing.
>
> [...]
> > Actually, OpenSSH didn't use Cygwin's glob() implementation before
> > (which is a relatively old NetBSD derived implementation), because the
> > configure test for gl_matchc failed up to 4.3p2. The AC_EGREP_CPP
> > autoconf test failed, while the new AC_TRY_COMPILE test in 4.4p1 now
> > works, so starting with 4.4p1, OpenSSH uses Cygwin's glob function.
> >
> > But why does it core dump? The reason is that the old glob implementation
> > in Cygwin doesn't know about the GLOB_NOMATCH return code. In case there's
> > no match, it returns 0, with gl_matchc set to 0 and gl_pathv set to NULL.

>
> I'm wondering if we should test for GLOB_NOMATCH in configure and use
> the glob in openbsd-compat if it's not found. This would avoid having
> to carry additional diffs in -portable.


Good idea! I tested your patch and it works, if another glob related
expression is changed in includes.h:

Index: includes.h
================================================== =================
RCS file: /cvs/openssh/includes.h,v
retrieving revision 1.125
diff -p -u -r1.125 includes.h
--- includes.h 1 Sep 2006 05:48:19 -0000 1.125
+++ includes.h 1 Sep 2006 08:42:22 -0000
@@ -30,7 +30,8 @@
# include
#endif
#if defined(HAVE_GLOB_H) && defined(GLOB_HAS_ALTDIRFUNC) && \
- defined(GLOB_HAS_GL_MATCHC)
+ defined(GLOB_HAS_GL_MATCHC) && \
+ defined(HAVE_DECL_GLOB_NOMATCH) && HAVE_DECL_GLOB_NOMATCH != 0
# include
#endif
#ifdef HAVE_ENDIAN_H


Thanks,
Corinna

--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@mindrot.org
http://lists.mindrot.org/mailman/lis...enssh-unix-dev