Skip to content

Commit e404237

Browse files
committed
Source snapshot from Powershell/openssh-portable:latestw_all
1 parent e85070d commit e404237

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

+1414
-1010
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -283,4 +283,5 @@ __pycache__/
283283
*.pyc
284284

285285
# Cake - Uncomment if you are using it
286-
# tools/
286+
# tools/
287+
contrib/win32/win32compat/inc/crtheaders.h

appveyor.yml

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.0.6.0.{build}
1+
version: 0.0.8.0.{build}
22
image: Visual Studio 2015
33

44
branches:
@@ -11,33 +11,34 @@ init:
1111

1212
build_script:
1313
- ps: |
14-
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -WarningAction SilentlyContinue
14+
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -DisableNameChecking
1515
Invoke-AppVeyorBuild
1616
1717
after_build:
1818
- ps: |
19-
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -WarningAction SilentlyContinue
2019
Install-OpenSSH
2120
- ps: Write-Verbose "Restart computer ..."
22-
- ps: Restart-Computer -ComputerName localhost -Force
21+
- ps: Restart-Computer -Force
2322
- ps: Start-Sleep -s 5 # Needs to be proceeded with -ps: as it's interpreted by AppVeyor
24-
- ps: Write-Verbose "Restart computer completed"
23+
- ps: Write-Verbose "Restart computer completed!"
2524

2625
before_test:
2726
- ps: |
28-
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -WarningAction SilentlyContinue
29-
Install-TestDependencies
27+
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -DisableNameChecking
28+
Install-TestDependencies
29+
Deploy-OpenSSHTests
3030
3131
test_script:
3232
- cmd: |
33-
"%ProgramFiles%\PowerShell\6.0.0.14\powershell.exe" -Command "Import-Module \"%APPVEYOR_BUILD_FOLDER%\contrib\win32\openssh\AppVeyor.psm1\" -WarningAction SilentlyContinue;Run-OpenSSHTests"
33+
"%ProgramFiles%\PowerShell\6.0.0.14\powershell.exe" -Command "Import-Module \"%APPVEYOR_BUILD_FOLDER%\contrib\win32\openssh\AppVeyor.psm1\" -DisableNameChecking;Run-OpenSSHPesterTest"
34+
- ps: |
35+
Check-PesterTestResult
36+
Run-OpenSSHUnitTest
3437
3538
after_test:
3639
- ps: |
37-
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -WarningAction SilentlyContinue
3840
Upload-OpenSSHTestResults
3941
4042
on_finish:
4143
- ps: |
42-
Import-Module $env:APPVEYOR_BUILD_FOLDER\contrib\win32\openssh\AppVeyor.psm1 -WarningAction SilentlyContinue
4344
Publish-Artifact

authfd.c

+11-3
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,18 @@ ssh_get_authentication_socket(int *fdp)
108108
RegCloseKey(agent_root);
109109
}
110110

111-
h = CreateFileW(SSH_AGENT_PIPE_NAME, GENERIC_READ | GENERIC_WRITE, 0,
112-
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
113-
if (h == INVALID_HANDLE_VALUE)
111+
do {
112+
h = CreateFileW(SSH_AGENT_PIPE_NAME, GENERIC_READ | GENERIC_WRITE, 0,
113+
NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL);
114+
if (h != INVALID_HANDLE_VALUE || GetLastError() != ERROR_PIPE_BUSY)
115+
break;
116+
Sleep(100);
117+
} while(1);
118+
119+
if (h == INVALID_HANDLE_VALUE) {
120+
debug("ssh_get_authentication_socket - CreateFileW failed error %d", GetLastError());
114121
return SSH_ERR_AGENT_NOT_PRESENT;
122+
}
115123

116124
/*
117125
* ensure that connected server pid matches published pid. this provides service side

contrib/win32/openssh/Win32-OpenSSH.sln

+33
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,24 @@ EndProject
5656
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "config", "config.vcxproj", "{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}"
5757
EndProject
5858
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-lsa", "ssh-lsa.vcxproj", "{02FB3D98-6516-42C6-9762-98811A99960F}"
59+
ProjectSection(ProjectDependencies) = postProject
60+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
61+
EndProjectSection
5962
EndProject
6063
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "posix_compat", "win32iocompat.vcxproj", "{0D02F0F0-013B-4EE3-906D-86517F3822C0}"
64+
ProjectSection(ProjectDependencies) = postProject
65+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
66+
EndProjectSection
6167
EndProject
6268
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-shellhost", "ssh-shellhost.vcxproj", "{C0AE8A30-E4FA-49CE-A2B5-0C072C77EC64}"
69+
ProjectSection(ProjectDependencies) = postProject
70+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
71+
EndProjectSection
6372
EndProject
6473
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ssh-agent", "ssh-agent.vcxproj", "{F6644EC5-D6B6-42A1-828C-75E2977470E0}"
6574
ProjectSection(ProjectDependencies) = postProject
6675
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
76+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
6777
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
6878
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
6979
EndProjectSection
@@ -87,13 +97,15 @@ EndProject
8797
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-bitmap", "unittest-bitmap.vcxproj", "{D901596E-76C7-4608-9CFA-2B42A9FD7250}"
8898
ProjectSection(ProjectDependencies) = postProject
8999
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
100+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
90101
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
91102
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
92103
EndProjectSection
93104
EndProject
94105
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-kex", "unittest-kex.vcxproj", "{8EC56B06-5A9A-4D6D-804D-037FE26FD43E}"
95106
ProjectSection(ProjectDependencies) = postProject
96107
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
108+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
97109
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
98110
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
99111
EndProjectSection
@@ -108,27 +120,31 @@ EndProject
108120
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-win32compat", "unittest-win32compat.vcxproj", "{BF295BA9-4BF8-43F8-8CBF-FAE84815466C}"
109121
ProjectSection(ProjectDependencies) = postProject
110122
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
123+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
111124
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
112125
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
113126
EndProjectSection
114127
EndProject
115128
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-utf8", "unittest-utf8.vcxproj", "{114CAA59-46C0-4B87-BA86-C1946A68101D}"
116129
ProjectSection(ProjectDependencies) = postProject
117130
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
131+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
118132
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
119133
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
120134
EndProjectSection
121135
EndProject
122136
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-hostkeys", "unittest-hostkeys.vcxproj", "{890C6129-286F-4CD8-8252-FB8D3B4E6E1B}"
123137
ProjectSection(ProjectDependencies) = postProject
124138
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
139+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
125140
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
126141
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
127142
EndProjectSection
128143
EndProject
129144
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-sshkey", "unittest-sshkey.vcxproj", "{FC568FF0-60F2-4B2E-AF62-FD392EDBA1B9}"
130145
ProjectSection(ProjectDependencies) = postProject
131146
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
147+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
132148
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
133149
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
134150
EndProjectSection
@@ -137,6 +153,14 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "core", "core", "{17322AAF-8
137153
EndProject
138154
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{A8096E32-E084-4FA0-AE01-A8D909EB2BB4}"
139155
EndProject
156+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "unittest-match", "unittest-match.vcxproj", "{484A8CDE-B949-4BDA-B447-74685C8E032F}"
157+
ProjectSection(ProjectDependencies) = postProject
158+
{05E1115F-8529-46D0-AAAF-52A404CE79A7} = {05E1115F-8529-46D0-AAAF-52A404CE79A7}
159+
{8F9D3B74-8D33-448E-9762-26E8DCC6B2F4} = {8F9D3B74-8D33-448E-9762-26E8DCC6B2F4}
160+
{DD483F7D-C553-4740-BC1A-903805AD0174} = {DD483F7D-C553-4740-BC1A-903805AD0174}
161+
{0D02F0F0-013B-4EE3-906D-86517F3822C0} = {0D02F0F0-013B-4EE3-906D-86517F3822C0}
162+
EndProjectSection
163+
EndProject
140164
Global
141165
GlobalSection(SolutionConfigurationPlatforms) = preSolution
142166
Debug|x64 = Debug|x64
@@ -313,6 +337,14 @@ Global
313337
{FC568FF0-60F2-4B2E-AF62-FD392EDBA1B9}.Release|x64.Build.0 = Release|x64
314338
{FC568FF0-60F2-4B2E-AF62-FD392EDBA1B9}.Release|x86.ActiveCfg = Release|Win32
315339
{FC568FF0-60F2-4B2E-AF62-FD392EDBA1B9}.Release|x86.Build.0 = Release|Win32
340+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Debug|x64.ActiveCfg = Debug|x64
341+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Debug|x64.Build.0 = Debug|x64
342+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Debug|x86.ActiveCfg = Debug|Win32
343+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Debug|x86.Build.0 = Debug|Win32
344+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Release|x64.ActiveCfg = Release|x64
345+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Release|x64.Build.0 = Release|x64
346+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Release|x86.ActiveCfg = Release|Win32
347+
{484A8CDE-B949-4BDA-B447-74685C8E032F}.Release|x86.Build.0 = Release|Win32
316348
EndGlobalSection
317349
GlobalSection(SolutionProperties) = preSolution
318350
HideSolutionNode = FALSE
@@ -339,5 +371,6 @@ Global
339371
{114CAA59-46C0-4B87-BA86-C1946A68101D} = {A8096E32-E084-4FA0-AE01-A8D909EB2BB4}
340372
{890C6129-286F-4CD8-8252-FB8D3B4E6E1B} = {A8096E32-E084-4FA0-AE01-A8D909EB2BB4}
341373
{FC568FF0-60F2-4B2E-AF62-FD392EDBA1B9} = {A8096E32-E084-4FA0-AE01-A8D909EB2BB4}
374+
{484A8CDE-B949-4BDA-B447-74685C8E032F} = {A8096E32-E084-4FA0-AE01-A8D909EB2BB4}
342375
EndGlobalSection
343376
EndGlobal

0 commit comments

Comments
 (0)