mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-20 20:34:47 +02:00
[contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c,
openbsd-compat/bsd-cygwin_util.h, openbsd-compat/daemon.c] Allow SSHD to install as service under WIndows 9x/Me [configure.ac] Fix to allow linking against PCRE on Cygwin Patches by Corinna Vinschen <vinschen@redhat.com>
This commit is contained in:
parent
f7c6f95682
commit
fe1d100ffd
@ -1,3 +1,10 @@
|
|||||||
|
20011126
|
||||||
|
- (tim) [contrib/cygwin/README, openbsd-compat/bsd-cygwin_util.c,
|
||||||
|
openbsd-compat/bsd-cygwin_util.h, openbsd-compat/daemon.c]
|
||||||
|
Allow SSHD to install as service under WIndows 9x/Me
|
||||||
|
[configure.ac] Fix to allow linking against PCRE on Cygwin
|
||||||
|
Patches by Corinna Vinschen <vinschen@redhat.com>
|
||||||
|
|
||||||
20011115
|
20011115
|
||||||
- (djm) Fix IPv4 default in ssh-keyscan. Spotted by Dan Astoorian
|
- (djm) Fix IPv4 default in ssh-keyscan. Spotted by Dan Astoorian
|
||||||
<djast@cs.toronto.edu> Fix from markus@
|
<djast@cs.toronto.edu> Fix from markus@
|
||||||
@ -6912,4 +6919,4 @@
|
|||||||
- Wrote replacements for strlcpy and mkdtemp
|
- Wrote replacements for strlcpy and mkdtemp
|
||||||
- Released 1.0pre1
|
- Released 1.0pre1
|
||||||
|
|
||||||
$Id: ChangeLog,v 1.1665 2001/11/15 12:16:50 djm Exp $
|
$Id: ChangeLog,v 1.1666 2001/11/27 01:19:43 tim Exp $
|
||||||
|
31
configure.ac
31
configure.ac
@ -1,4 +1,4 @@
|
|||||||
# $Id: configure.ac,v 1.4 2001/11/03 19:09:33 tim Exp $
|
# $Id: configure.ac,v 1.5 2001/11/27 01:19:43 tim Exp $
|
||||||
|
|
||||||
AC_INIT
|
AC_INIT
|
||||||
AC_CONFIG_SRCDIR([ssh.c])
|
AC_CONFIG_SRCDIR([ssh.c])
|
||||||
@ -65,7 +65,7 @@ case "$host" in
|
|||||||
AC_DEFINE(DISABLE_LASTLOG)
|
AC_DEFINE(DISABLE_LASTLOG)
|
||||||
;;
|
;;
|
||||||
*-*-cygwin*)
|
*-*-cygwin*)
|
||||||
LIBS="$LIBS -lregex /usr/lib/textmode.o"
|
LIBS="$LIBS /usr/lib/textmode.o"
|
||||||
AC_DEFINE(HAVE_CYGWIN)
|
AC_DEFINE(HAVE_CYGWIN)
|
||||||
AC_DEFINE(USE_PIPES)
|
AC_DEFINE(USE_PIPES)
|
||||||
AC_DEFINE(DISABLE_SHADOW)
|
AC_DEFINE(DISABLE_SHADOW)
|
||||||
@ -401,7 +401,31 @@ AC_CHECK_LIB(z, deflate, ,AC_MSG_ERROR([*** zlib missing - please install first
|
|||||||
# We don't want to check if we did an pcre override.
|
# We don't want to check if we did an pcre override.
|
||||||
if test -z "$no_comp_check" ; then
|
if test -z "$no_comp_check" ; then
|
||||||
AC_CHECK_FUNC(regcomp,
|
AC_CHECK_FUNC(regcomp,
|
||||||
[ AC_DEFINE(HAVE_REGCOMP)],
|
[
|
||||||
|
AC_CHECK_FUNC(regsub,
|
||||||
|
[
|
||||||
|
has_regcomp=no
|
||||||
|
],
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_REGCOMP)
|
||||||
|
has_regcomp=yes
|
||||||
|
]
|
||||||
|
)
|
||||||
|
],
|
||||||
|
[
|
||||||
|
has_regcomp=no
|
||||||
|
]
|
||||||
|
)
|
||||||
|
# Either regcomp wasn't defined or regsub is defined (which means
|
||||||
|
# that the libc regex is probably an old non-POSIX implementation.
|
||||||
|
# Now check for -lregex and -lpcreposix to find some usable regex
|
||||||
|
# implementation.
|
||||||
|
if test "$has_regcomp" = "no" ; then
|
||||||
|
AC_CHECK_LIB(regex, regcomp,
|
||||||
|
[
|
||||||
|
AC_DEFINE(HAVE_REGCOMP)
|
||||||
|
LIBS="$LIBS -lregex"
|
||||||
|
],
|
||||||
[
|
[
|
||||||
AC_CHECK_LIB(pcre, pcre_info,
|
AC_CHECK_LIB(pcre, pcre_info,
|
||||||
[
|
[
|
||||||
@ -414,6 +438,7 @@ if test -z "$no_comp_check" ; then
|
|||||||
]
|
]
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
dnl UnixWare 2.x
|
dnl UnixWare 2.x
|
||||||
AC_CHECK_FUNC(strcasecmp,
|
AC_CHECK_FUNC(strcasecmp,
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
This package is the actual port of OpenSSH to Cygwin 1.3.
|
This package is the actual port of OpenSSH to Cygwin 1.3.
|
||||||
|
|
||||||
|
===========================================================================
|
||||||
|
Important change since 3.0.1p1-2:
|
||||||
|
|
||||||
|
This version introduces the ability to register sshd as service on
|
||||||
|
Windows 9x/Me systems. This is done only when the options -D and/or
|
||||||
|
-d are not given.
|
||||||
|
===========================================================================
|
||||||
|
|
||||||
===========================================================================
|
===========================================================================
|
||||||
Important change since 2.9p2:
|
Important change since 2.9p2:
|
||||||
|
|
||||||
@ -162,12 +170,10 @@ configure are used for the Cygwin binary distribution:
|
|||||||
|
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--sysconfdir=/etc \
|
--sysconfdir=/etc \
|
||||||
--libexecdir='${exec_prefix}/sbin \
|
--libexecdir='${exec_prefix}/sbin'
|
||||||
--with-pcre
|
|
||||||
|
|
||||||
You must have installed the zlib, openssl and regex packages to
|
You must have installed the zlib, openssl and regex packages to
|
||||||
be able to build OpenSSH! The `--with-pcre' option requires
|
be able to build OpenSSH!
|
||||||
the installation of the pcre package.
|
|
||||||
|
|
||||||
Please send requests, error reports etc. to cygwin@cygwin.com.
|
Please send requests, error reports etc. to cygwin@cygwin.com.
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "includes.h"
|
#include "includes.h"
|
||||||
|
|
||||||
RCSID("$Id: bsd-cygwin_util.c,v 1.5 2001/07/18 16:19:49 mouring Exp $");
|
RCSID("$Id: bsd-cygwin_util.c,v 1.6 2001/11/27 01:19:44 tim Exp $");
|
||||||
|
|
||||||
#ifdef HAVE_CYGWIN
|
#ifdef HAVE_CYGWIN
|
||||||
|
|
||||||
@ -139,4 +139,26 @@ int check_ntsec(const char *filename)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void register_9x_service(void)
|
||||||
|
{
|
||||||
|
HINSTANCE kerneldll;
|
||||||
|
DWORD (*RegisterServiceProcess)(DWORD, DWORD);
|
||||||
|
|
||||||
|
/* The service register mechanism in 9x/Me is pretty different from
|
||||||
|
* NT/2K/XP. In NT/2K/XP we're using a special service starter
|
||||||
|
* application to register and control sshd as service. This method
|
||||||
|
* doesn't play nicely with 9x/Me. For that reason we register here
|
||||||
|
* as service when running under 9x/Me. This function is only called
|
||||||
|
* by the child sshd when it's going to daemonize.
|
||||||
|
*/
|
||||||
|
if (is_winnt)
|
||||||
|
return;
|
||||||
|
if (! (kerneldll = LoadLibrary("KERNEL32.DLL")))
|
||||||
|
return;
|
||||||
|
if (! (RegisterServiceProcess = (DWORD (*)(DWORD, DWORD))
|
||||||
|
GetProcAddress(kerneldll, "RegisterServiceProcess")))
|
||||||
|
return;
|
||||||
|
RegisterServiceProcess(0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* HAVE_CYGWIN */
|
#endif /* HAVE_CYGWIN */
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
* binary mode on Windows systems.
|
* binary mode on Windows systems.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* $Id: bsd-cygwin_util.h,v 1.4 2001/04/13 14:28:43 djm Exp $ */
|
/* $Id: bsd-cygwin_util.h,v 1.5 2001/11/27 01:19:44 tim Exp $ */
|
||||||
|
|
||||||
#ifndef _BSD_CYGWIN_UTIL_H
|
#ifndef _BSD_CYGWIN_UTIL_H
|
||||||
#define _BSD_CYGWIN_UTIL_H
|
#define _BSD_CYGWIN_UTIL_H
|
||||||
@ -26,6 +26,7 @@ int binary_open(const char *filename, int flags, ...);
|
|||||||
int binary_pipe(int fd[2]);
|
int binary_pipe(int fd[2]);
|
||||||
int check_nt_auth(int pwd_authenticated, uid_t uid);
|
int check_nt_auth(int pwd_authenticated, uid_t uid);
|
||||||
int check_ntsec(const char *filename);
|
int check_ntsec(const char *filename);
|
||||||
|
void register_9x_service(void);
|
||||||
|
|
||||||
#define open binary_open
|
#define open binary_open
|
||||||
#define pipe binary_pipe
|
#define pipe binary_pipe
|
||||||
|
@ -49,6 +49,9 @@ daemon(nochdir, noclose)
|
|||||||
case -1:
|
case -1:
|
||||||
return (-1);
|
return (-1);
|
||||||
case 0:
|
case 0:
|
||||||
|
#ifdef HAVE_CYGWIN
|
||||||
|
register_9x_service();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#ifdef HAVE_CYGWIN
|
#ifdef HAVE_CYGWIN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user