diff --git a/contrib/win32/openssh/config.h.vs b/contrib/win32/openssh/config.h.vs index d32cbe0..ba6bf07 100644 --- a/contrib/win32/openssh/config.h.vs +++ b/contrib/win32/openssh/config.h.vs @@ -1564,7 +1564,7 @@ #define _PATH_PASSWD_PROG "/usr/bin/passwd" /* Specify location of ssh.pid */ -#define _PATH_SSH_PIDDIR "/var/run" +#define _PATH_SSH_PIDDIR "." /* Define if we don't have struct __res_state in resolv.h */ #define __res_state state @@ -1725,3 +1725,7 @@ typedef long ssize_t; #define HAVE_MBLEN 1 + +#define SSHDIR "." +#define _PATH_SFTP_SERVER "./sftp-server.exe" +#define _PATH_SSH_PROGRAM "./ssh.exe" diff --git a/pathnames.h b/pathnames.h index b5919ee..0ec283a 100644 --- a/pathnames.h +++ b/pathnames.h @@ -35,20 +35,6 @@ * should be world-readable. */ -#ifdef WIN32_FIXME -# define _PATH_SERVER_CONFIG_FILE "sshd_config" -# define _PATH_HOST_CONFIG_FILE "ssh_config" -# define _PATH_HOST_KEY_FILE "ssh_host_key" -# define _PATH_HOST_DSA_KEY_FILE "ssh_host_dsa_key" -# define _PATH_HOST_ECDSA_KEY_FILE "ssh_host_ecdsa_key" -# define _PATH_HOST_ED25519_KEY_FILE "ssh_host_ed25519_key" -# define _PATH_HOST_RSA_KEY_FILE "ssh_host_rsa_key" -# define _PATH_DH_MODULI "moduli" -# define _PATH_DH_PRIMES "primes" -# define _PATH_SSH_PROGRAM "ssh.exe" - -#else - #define _PATH_SERVER_CONFIG_FILE SSHDIR "/sshd_config" #define _PATH_HOST_CONFIG_FILE SSHDIR "/ssh_config" #define _PATH_HOST_KEY_FILE SSHDIR "/ssh_host_key" @@ -63,17 +49,12 @@ #ifndef _PATH_SSH_PROGRAM #define _PATH_SSH_PROGRAM "/usr/bin/ssh" #endif -#endif /* * The process id of the daemon listening for connections is saved here to * make it easier to kill the correct daemon when necessary. */ -#ifndef WIN32_FIXME #define _PATH_SSH_DAEMON_PID_FILE _PATH_SSH_PIDDIR "/sshd.pid" -#else -#define _PATH_SSH_DAEMON_PID_FILE "sshd.pid" -#endif /* * The directory in user's home directory in which the files reside. The @@ -156,12 +137,8 @@ /* xauth for X11 forwarding */ #ifndef _PATH_XAUTH -#ifdef WIN32_FIXME -#define _PATH_XAUTH "./auth.exe" -#else #define _PATH_XAUTH "/usr/X11R6/bin/xauth" #endif -#endif @@ -176,15 +153,9 @@ #endif /* for sftp */ -#ifdef WIN32_FIXME - #ifndef _PATH_SFTP_SERVER - #define _PATH_SFTP_SERVER "./sftp-server.exe" - #endif -#else #ifndef _PATH_SFTP_SERVER #define _PATH_SFTP_SERVER "/usr/libexec/sftp-server" #endif -#endif /* else WIN32_FIXME */ /* chroot directory for unprivileged user when UsePrivilegeSeparation=yes */ #ifndef _PATH_PRIVSEP_CHROOT_DIR diff --git a/readconf.c b/readconf.c index 75fc213..9cc83b6 100644 --- a/readconf.c +++ b/readconf.c @@ -1533,29 +1533,7 @@ parse_keytypes: case oPubkeyAcceptedKeyTypes: charptr = &options->pubkey_key_types; - goto parse_keytypes; - -#ifdef WIN32_FIXME - - case oPassInputHandle: - { - arg = strdelim(&s); - - options -> passInputHandle_ = atoi(arg); - - break; - } - - case oPassOutputHandle: - { - arg = strdelim(&s); - - options -> passOutputHandle_ = atoi(arg); - - break; - } - -#endif + goto parse_keytypes; case oDeprecated: debug("%s line %d: Deprecated option \"%s\"", @@ -1740,13 +1718,6 @@ initialize_options(Options * options) options->update_hostkeys = -1; options->hostbased_key_types = NULL; options->pubkey_key_types = NULL; - - #ifdef WIN32_FIXME - - options -> passInputHandle_ = NULL; - options -> passOutputHandle_ = NULL; - - #endif } /* diff --git a/readconf.h b/readconf.h index b2f17bf..5c2b7a2 100644 --- a/readconf.h +++ b/readconf.h @@ -157,12 +157,6 @@ typedef struct { char *pubkey_key_types; char *ignored_unknown; /* Pattern list of unknown tokens to ignore */ -#ifdef WIN32_FIXME - - HANDLE passInputHandle_; - HANDLE passOutputHandle_; - -#endif } Options; #define SSH_CANONICALISE_NO 0 diff --git a/ssh.c b/ssh.c index b6bb639..be61f7a 100644 --- a/ssh.c +++ b/ssh.c @@ -1072,27 +1072,6 @@ main(int ac, char **av) ac--, av++; } #ifdef WIN32_FIXME - - /* - * Redirect stdin/stdout for password read. This trick allow - * use of all auth procedures from ssh client in sftp without - * additional code in parent. - */ - - if (options.passInputHandle_) - { - debug3("Redirecting pass input to %d...\n", options.passInputHandle_); - abort(); - //PassInputFd = _open_osfhandle(options.passInputHandle_, O_RDONLY); - } - - if (options.passOutputHandle_) - { - debug3("Redirecting pass prompt output to %d...\n", options.passOutputHandle_); - abort(); - //PassOutputFd = _open_osfhandle(options.passOutputHandle_, O_WRONLY); - } - // create various Windows user home directory based file names sprintf(dotsshdir,"%s\\%s", pw->pw_dir, _PATH_SSH_USER_DIR ); _mkdir(dotsshdir); //this base directory for the user is needed