Skip to content

Commit 3a18080

Browse files
committed
Merge branch 'L1'
2 parents a138680 + 9f47848 commit 3a18080

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5430
-1335
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,4 +275,5 @@ Makefile.in
275275

276276
#temp key files
277277
d2utmpa*
278-
configure
278+
configure
279+
contrib/win32/openssh/Win32-OpenSSH.VC.opendb

Makefile.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ LIBSSH_OBJS=${LIBOPENSSH_OBJS} \
9191
sc25519.o ge25519.o fe25519.o ed25519.o verify.o hash.o blocks.o \
9292
kex.o kexdh.o kexgex.o kexecdh.o kexc25519.o \
9393
kexdhc.o kexgexc.o kexecdhc.o kexc25519c.o \
94-
kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o
94+
kexdhs.o kexgexs.o kexecdhs.o kexc25519s.o openssl-dh.o openssl-bn.o
9595

9696
SSHOBJS= ssh.o readconf.o clientloop.o sshtty.o \
9797
sshconnect.o sshconnect1.o sshconnect2.o mux.o \

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# OpenSSH
2+
23
Win32 port of OpenSSH
34

4-
Look at the [wiki](https://github.com/PowerShell/Win32-OpenSSH/wiki) for help
5-
First release announcement is here:
6-
OpenSSH for Windows Update - Windows PowerShell Blog - Site Home - MSDN Blogs
7-
http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx
5+
See the [wiki](https://github.com/PowerShell/Win32-OpenSSH/wiki) for installation instructions and help
6+
7+
8+
[First release announcement](http://blogs.msdn.com/b/powershell/archive/2015/10/19/openssh-for-windows-update.aspx
9+
)
10+

authfd.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ ssh_get_authentication_socket(int *fdp)
114114
errno = oerrno;
115115
return SSH_ERR_SYSTEM_ERROR;
116116
}
117+
#else
118+
if (
119+
connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) {
120+
oerrno = errno;
121+
close(sock);
122+
errno = oerrno;
123+
return SSH_ERR_SYSTEM_ERROR;
124+
}
117125
#endif /* #ifndef WIN32_FIXME */
118126

119127
if (fdp != NULL)

channels.c

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,20 @@
4242
#include "includes.h"
4343

4444
#ifdef WIN32_FIXME
45-
#define ECONNABORTED WSAECONNABORTED
46-
#define ECONNREFUSED WSAECONNREFUSED
45+
//#define WIN32_PRAGMA_REMCON
46+
#ifdef ECONNABORTED
47+
#undef ECONNABORTED
48+
#endif
49+
#define ECONNABORTED WSAECONNABORTED
50+
#ifdef ECONNREFUSED
51+
#undef ECONNREFUSED
52+
#endif
53+
#define ECONNREFUSED WSAECONNREFUSED
54+
#ifdef EINPROGRESS
55+
#undef EINPROGRESS
56+
#endif
57+
#define EINPROGRESS WSAEINPROGRESS
58+
#define _CRT_NO_POSIX_ERROR_CODES
4759
#endif
4860

4961

@@ -2471,6 +2483,9 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
24712483
if ( c->client_tty )
24722484
telProcessNetwork ( data, data_len ); // run it by ANSI engine if it is the ssh client
24732485
else {
2486+
#ifdef WIN32_PRAGMA_REMCON
2487+
buffer_append(&c->output, data, data_len); // it is the sshd server, so pass it on
2488+
#else
24742489
if ( ( c->isatty) && (data_len ==1) && (data[0] == '\003') ) {
24752490
/* send control-c to the shell process */
24762491
if ( GenerateConsoleCtrlEvent ( CTRL_C_EVENT, 0 ) ) {
@@ -2481,7 +2496,7 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
24812496
}
24822497
else {
24832498
// avoid sending the 4 arrow keys out to remote for now "ESC[A" ..
2484-
if ( (c->isatty) && (data_len ==3) && (data[0] == '\033') && (data[1] == '[')) {
2499+
if ( (c->isatty) && (data_len ==3) && (data[0] == '\033') && (data[1] == '[')) {
24852500
if ( ( data[2] == 'A') || (data[2] == 'B') || (data[2] == 'C') || (data[2] == 'D'))
24862501
packet_check_eom();
24872502
return 0;
@@ -2504,6 +2519,7 @@ channel_input_data(int type, u_int32_t seq, void *ctxt)
25042519
charinline = 0; // a line has ended, begin char in line count again
25052520
}
25062521
}
2522+
#endif // WIN32_PRAGMA_REMCON
25072523
}
25082524

25092525
#endif

contrib/win32/openssh/Win32-OpenSSH.sln

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sshd", "sshd.vcxproj", "{F5
100100
EndProject
101101
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config", "config.vcxproj", "{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}"
102102
EndProject
103+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-lsa", "ssh-lsa.vcxproj", "{02FB3D98-6516-42C6-9762-98811A99960F}"
104+
EndProject
105+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scp", "scp.vcxproj", "{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}"
106+
ProjectSection(ProjectDependencies) = postProject
107+
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
108+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
109+
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
110+
{8660C2FE-9874-432D-B047-E042BB41DBE0} = {8660C2FE-9874-432D-B047-E042BB41DBE0}
111+
EndProjectSection
112+
EndProject
103113
Global
104114
GlobalSection(SolutionConfigurationPlatforms) = preSolution
105115
Debug|x64 = Debug|x64
@@ -220,6 +230,22 @@ Global
220230
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}.Release|x64.Build.0 = Release|x64
221231
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}.Release|x86.ActiveCfg = Release|Win32
222232
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}.Release|x86.Build.0 = Release|Win32
233+
{02FB3D98-6516-42C6-9762-98811A99960F}.Debug|x64.ActiveCfg = Debug|x64
234+
{02FB3D98-6516-42C6-9762-98811A99960F}.Debug|x64.Build.0 = Debug|x64
235+
{02FB3D98-6516-42C6-9762-98811A99960F}.Debug|x86.ActiveCfg = Debug|Win32
236+
{02FB3D98-6516-42C6-9762-98811A99960F}.Debug|x86.Build.0 = Debug|Win32
237+
{02FB3D98-6516-42C6-9762-98811A99960F}.Release|x64.ActiveCfg = Release|x64
238+
{02FB3D98-6516-42C6-9762-98811A99960F}.Release|x64.Build.0 = Release|x64
239+
{02FB3D98-6516-42C6-9762-98811A99960F}.Release|x86.ActiveCfg = Release|Win32
240+
{02FB3D98-6516-42C6-9762-98811A99960F}.Release|x86.Build.0 = Release|Win32
241+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Debug|x64.ActiveCfg = Debug|x64
242+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Debug|x64.Build.0 = Debug|x64
243+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Debug|x86.ActiveCfg = Debug|Win32
244+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Debug|x86.Build.0 = Debug|Win32
245+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Release|x64.ActiveCfg = Release|x64
246+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Release|x64.Build.0 = Release|x64
247+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Release|x86.ActiveCfg = Release|Win32
248+
{29B98ADF-1285-49CE-BF6C-AA92C5D2FB24}.Release|x86.Build.0 = Release|Win32
223249
EndGlobalSection
224250
GlobalSection(SolutionProperties) = preSolution
225251
HideSolutionNode = FALSE

contrib/win32/openssh/config.h.vs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1707,5 +1707,7 @@ struct iovec
17071707

17081708
// define building with MS Visual Studio Compiler and runtime and not with MingW/gcc compiler
17091709
#define WIN32_VS 1
1710-
1710+
// Use Pragma Systems Remote Console modules for shell sessions so that cmd/powershell fully
1711+
// works remotely over SSH like they operate in a local machine
1712+
//#define WIN32_PRAGMA_REMCON
17111713

contrib/win32/openssh/keygen.vcxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@
101101
<SDLCheck>false</SDLCheck>
102102
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-Win32-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
103103
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
104+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
104105
</ClCompile>
105106
<Link>
106107
<SubSystem>Console</SubSystem>
@@ -119,6 +120,7 @@
119120
<SDLCheck>false</SDLCheck>
120121
<AdditionalIncludeDirectories>$(SolutionDir);$(OpenSSL-x64-Debug-Path)include;$(OpenSSH-Src-Path)includes;$(OpenSSH-Src-Path);$(OpenSSH-Src-Path)contrib\win32\win32compat\includes;$(OpenSSH-Src-Path)contrib\win32\win32compat;$(OpenSSH-Src-Path)libkrb;$(OpenSSH-Src-Path)libkrb\libKrb5;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
121122
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
123+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
122124
</ClCompile>
123125
<Link>
124126
<SubSystem>Console</SubSystem>

contrib/win32/openssh/libssh.vcxproj

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
<ExceptionHandling>false</ExceptionHandling>
9898
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
9999
<CompileAs>CompileAsC</CompileAs>
100+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
100101
</ClCompile>
101102
<Link>
102103
<SubSystem>Windows</SubSystem>
@@ -114,6 +115,7 @@
114115
<ExceptionHandling>false</ExceptionHandling>
115116
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
116117
<CompileAs>CompileAsC</CompileAs>
118+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
117119
</ClCompile>
118120
<Link>
119121
<SubSystem>Windows</SubSystem>
@@ -256,6 +258,14 @@
256258
<ClCompile Include="$(OpenSSH-Src-Path)uuencode.c" />
257259
<ClCompile Include="$(OpenSSH-Src-Path)verify.c" />
258260
<ClCompile Include="$(OpenSSH-Src-Path)xmalloc.c" />
261+
<ClCompile Include="$(OpenSSH-Src-Path)openssl-bn.c" />
262+
<ClCompile Include="$(OpenSSH-Src-Path)openssl-dh.c">
263+
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
264+
</ClCompile>
265+
<ClCompile Include="..\..\..\openssl-epoint.c" />
266+
</ItemGroup>
267+
<ItemGroup>
268+
<ClInclude Include="$(OpenSSH-Src-Path)crypto-wrap.h" />
259269
</ItemGroup>
260270
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
261271
<ImportGroup Label="ExtensionTargets">

contrib/win32/openssh/libssh.vcxproj.filters

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,5 +288,19 @@
288288
<ClCompile Include="$(OpenSSH-Src-Path)xmalloc.c">
289289
<Filter>Source Files</Filter>
290290
</ClCompile>
291+
<ClCompile Include="$(OpenSSH-Src-Path)openssl-bn.c">
292+
<Filter>Source Files</Filter>
293+
</ClCompile>
294+
<ClCompile Include="$(OpenSSH-Src-Path)openssl-dh.c">
295+
<Filter>Source Files</Filter>
296+
</ClCompile>
297+
<ClCompile Include="..\..\..\openssl-epoint.c">
298+
<Filter>Source Files</Filter>
299+
</ClCompile>
300+
</ItemGroup>
301+
<ItemGroup>
302+
<ClInclude Include="$(OpenSSH-Src-Path)crypto-wrap.h">
303+
<Filter>Header Files</Filter>
304+
</ClInclude>
291305
</ItemGroup>
292306
</Project>

0 commit comments

Comments
 (0)