Skip to content

Commit 03ade97

Browse files
committed
Merge branch 'L1'
2 parents 3a18080 + 1f825c7 commit 03ade97

File tree

4 files changed

+66
-3
lines changed

4 files changed

+66
-3
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ See the [wiki](https://github.com/PowerShell/Win32-OpenSSH/wiki) for installatio
88
[First release announcement](http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx
99
)
1010

11+
### Chocolatey
12+
13+
[![](http://img.shields.io/chocolatey/dt/win32-openssh.svg)](https://chocolatey.org/packages/win32-openssh) [![](http://img.shields.io/chocolatey/v/win32-openssh.svg)](https://chocolatey.org/packages/win32-openssh)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
set OPENSSL_VERSION=1.0.2d
2+
set PerlPath=c:\perl\bin
3+
set NASMPath=c:\nasm
4+
5+
set VS2013="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
6+
set VS2013_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat"
7+
set VS2015="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
8+
set VS2015_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
9+
10+
set path=%NASMPath%;%PerlPath%;%path%
11+
12+
13+
CALL %VS2015%
14+
15+
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x86
16+
perl Configure VC-WIN32 --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\Win32\Release
17+
call ms\do_ms.bat
18+
call ms\do_nasm.bat
19+
nmake -f ms\nt.mak clean
20+
nmake -f ms\nt.mak
21+
nmake -f ms\nt.mak install
22+
23+
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x86
24+
perl Configure debug-VC-WIN32 --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\Win32\Debug
25+
call ms\do_ms.bat
26+
call ms\do_nasm.bat
27+
nmake -f ms\nt.mak clean
28+
nmake -f ms\nt.mak
29+
nmake -f ms\nt.mak install
30+
31+
CALL %VS2015_AMD64%
32+
33+
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x64
34+
perl Configure VC-WIN64A --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\x64\Release
35+
call ms\do_win64a.bat
36+
nmake -f ms\nt.mak clean
37+
nmake -f ms\nt.mak
38+
nmake -f ms\nt.mak install
39+
40+
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x64
41+
perl Configure debug-VC-WIN64A --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\x64\Debug
42+
call ms\do_win64a.bat
43+
nmake -f ms\nt.mak clean
44+
nmake -f ms\nt.mak
45+
nmake -f ms\nt.mak install

session.c

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ FIXME: GFPZR: Function stat() may be undeclared.
117117
#include <Userenv.h>
118118
#include <shlobj.h>
119119

120+
#ifdef WIN32_PRAGMA_REMCON
121+
#include <shlwapi.h>
122+
#endif
120123
extern char HomeDirLsaW[MAX_PATH];
121124

122125
#endif
@@ -599,9 +602,17 @@ do_exec_no_pty(Session *s, const char *command)
599602
#ifndef WIN32_PRAGMA_REMCON
600603
exec_command = s->pw->pw_shell;
601604
#else
602-
snprintf(exec_command_str, sizeof(exec_command_str),
603-
"\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d",
604-
s->row, s->col );
605+
if ( PathFileExists("\\program files\\pragma\\shared files\\cmdserver.exe") )
606+
snprintf(exec_command_str, sizeof(exec_command_str),
607+
"\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d", s->row, s->col );
608+
else {
609+
// find base path of our executable
610+
char basepath[MAX_PATH];
611+
strcpy_s(basepath, MAX_PATH, __progname);
612+
PathRemoveFileSpec(basepath); // get the full dir part of the name
613+
snprintf(exec_command_str, sizeof(exec_command_str),
614+
"%s\\cmdserver.exe SSHD %d %d", basepath,s->row, s->col);
615+
}
605616
exec_command = exec_command_str;
606617
#endif
607618
}

sftp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,10 @@ local_do_shell(const char *args)
346346
static void
347347
local_do_ls(const char *args)
348348
{
349+
#ifdef WIN32_FIXME
350+
#undef _PATH_LS
351+
#define _PATH_LS "dir"
352+
#endif
349353
if (!args || !*args)
350354
local_do_shell(_PATH_LS);
351355
else {

0 commit comments

Comments
 (0)