Merge branch 'L1'
This commit is contained in:
commit
03ade97966
|
@ -8,3 +8,6 @@ See the [wiki](https://github.com/PowerShell/Win32-OpenSSH/wiki) for installatio
|
|||
[First release announcement](http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx
|
||||
)
|
||||
|
||||
### Chocolatey
|
||||
|
||||
[](https://chocolatey.org/packages/win32-openssh) [](https://chocolatey.org/packages/win32-openssh)
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
set OPENSSL_VERSION=1.0.2d
|
||||
set PerlPath=c:\perl\bin
|
||||
set NASMPath=c:\nasm
|
||||
|
||||
set VS2013="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\vcvars32.bat"
|
||||
set VS2013_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\vcvars64.bat"
|
||||
set VS2015="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
set VS2015_AMD64="C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
|
||||
|
||||
set path=%NASMPath%;%PerlPath%;%path%
|
||||
|
||||
|
||||
CALL %VS2015%
|
||||
|
||||
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x86
|
||||
perl Configure VC-WIN32 --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\Win32\Release
|
||||
call ms\do_ms.bat
|
||||
call ms\do_nasm.bat
|
||||
nmake -f ms\nt.mak clean
|
||||
nmake -f ms\nt.mak
|
||||
nmake -f ms\nt.mak install
|
||||
|
||||
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x86
|
||||
perl Configure debug-VC-WIN32 --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\Win32\Debug
|
||||
call ms\do_ms.bat
|
||||
call ms\do_nasm.bat
|
||||
nmake -f ms\nt.mak clean
|
||||
nmake -f ms\nt.mak
|
||||
nmake -f ms\nt.mak install
|
||||
|
||||
CALL %VS2015_AMD64%
|
||||
|
||||
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x64
|
||||
perl Configure VC-WIN64A --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\x64\Release
|
||||
call ms\do_win64a.bat
|
||||
nmake -f ms\nt.mak clean
|
||||
nmake -f ms\nt.mak
|
||||
nmake -f ms\nt.mak install
|
||||
|
||||
cd \Dev\OpenSSL\openssl-%OPENSSL_VERSION%-src-x64
|
||||
perl Configure debug-VC-WIN64A --prefix=C:\dev\OpenSSL\%OPENSSL_VERSION%\VS2015\x64\Debug
|
||||
call ms\do_win64a.bat
|
||||
nmake -f ms\nt.mak clean
|
||||
nmake -f ms\nt.mak
|
||||
nmake -f ms\nt.mak install
|
17
session.c
17
session.c
|
@ -117,6 +117,9 @@ FIXME: GFPZR: Function stat() may be undeclared.
|
|||
#include <Userenv.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#ifdef WIN32_PRAGMA_REMCON
|
||||
#include <shlwapi.h>
|
||||
#endif
|
||||
extern char HomeDirLsaW[MAX_PATH];
|
||||
|
||||
#endif
|
||||
|
@ -599,9 +602,17 @@ do_exec_no_pty(Session *s, const char *command)
|
|||
#ifndef WIN32_PRAGMA_REMCON
|
||||
exec_command = s->pw->pw_shell;
|
||||
#else
|
||||
snprintf(exec_command_str, sizeof(exec_command_str),
|
||||
"\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d",
|
||||
s->row, s->col );
|
||||
if ( PathFileExists("\\program files\\pragma\\shared files\\cmdserver.exe") )
|
||||
snprintf(exec_command_str, sizeof(exec_command_str),
|
||||
"\\program files\\pragma\\shared files\\cmdserver.exe SSHD %d %d", s->row, s->col );
|
||||
else {
|
||||
// find base path of our executable
|
||||
char basepath[MAX_PATH];
|
||||
strcpy_s(basepath, MAX_PATH, __progname);
|
||||
PathRemoveFileSpec(basepath); // get the full dir part of the name
|
||||
snprintf(exec_command_str, sizeof(exec_command_str),
|
||||
"%s\\cmdserver.exe SSHD %d %d", basepath,s->row, s->col);
|
||||
}
|
||||
exec_command = exec_command_str;
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue