Skip to content

Commit a4b577b

Browse files
committed
Source snapshot from Powershell/openssh-portable:latestw_cwb
1 parent 15c6a77 commit a4b577b

Some content is hidden

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

51 files changed

+837
-1425
lines changed

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
See https://www.openssh.com/releasenotes.html#7.3p1 for the release notes.
1+
See https://www.openssh.com/releasenotes.html#7.4p1 for the release notes.
22

33
Please read https://www.openssh.com/report.html for bug reporting
44
instructions and note that we do not use Github for bug reporting or

appveyor.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
version: 0.0.4.0.{build}
1+
version: 0.0.6.0.{build}
22
image: Visual Studio 2015
33

44
branches:
55
only:
6-
- V_7_3w
7-
- latestw_cwb
6+
- latestw_all
7+
- latestw_all_openssl
88

99
init:
1010
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

auth.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $OpenBSD: auth.c,v 1.118 2016/11/08 22:04:34 djm Exp $ */
1+
/* $OpenBSD: auth.c,v 1.119 2016/12/15 21:29:05 dtucker Exp $ */
22
/*
33
* Copyright (c) 2000 Markus Friedl. All rights reserved.
44
*
@@ -192,7 +192,7 @@ allowed_user(struct passwd * pw)
192192

193193
/* Return false if user is listed in DenyUsers */
194194
if (options.num_deny_users > 0) {
195-
for (i = 0; i < options.num_deny_users; i++)
195+
for (i = 0; i < options.num_deny_users; i++) {
196196
r = match_user(pw->pw_name, hostname, ipaddr,
197197
options.deny_users[i]);
198198
if (r < 0) {
@@ -204,6 +204,7 @@ allowed_user(struct passwd * pw)
204204
pw->pw_name, hostname);
205205
return 0;
206206
}
207+
}
207208
}
208209
/* Return false if AllowUsers isn't empty and user isn't listed there */
209210
if (options.num_allow_users > 0) {
@@ -576,7 +577,7 @@ auth_openfile(const char *file, struct passwd *pw, int strict_modes,
576577
struct stat st;
577578
int fd;
578579
FILE *f;
579-
580+
580581
#ifdef WINDOWS
581582
/* Windows POSIX adpater does not support fdopen() on open(file)*/
582583
if ((f = fopen(file, "r")) == NULL) {
@@ -616,6 +617,7 @@ auth_openfile(const char *file, struct passwd *pw, int strict_modes,
616617
return NULL;
617618
}
618619
#endif /* !WINDOWS */
620+
619621
return f;
620622
}
621623

auth2-pubkey.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,11 @@ userauth_pubkey(Authctxt *authctxt)
245245
* if a user is not allowed to login. is this an
246246
* issue? -markus
247247
*/
248-
#ifndef WINDOWS
249-
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 0)))
250-
#endif /* !WINDOWS */
248+
#ifdef WINDOWS /* key validation in done in agent for Windows */
251249
{
250+
#else /* !WINDOWS */
251+
if (PRIVSEP(user_key_allowed(authctxt->pw, key, 0))) {
252+
#endif /* !WINDOWS */
252253
packet_start(SSH2_MSG_USERAUTH_PK_OK);
253254
packet_put_string(pkalg, alen);
254255
packet_put_string(pkblob, blen);

channels.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2049,6 +2049,7 @@ channel_post_mux_listener(Channel *c, fd_set *readset, fd_set *writeset)
20492049
c->notbefore = monotime() + 1;
20502050
return;
20512051
}
2052+
20522053
#ifndef WINDOWS /*TODO - implement user check for Windows*/
20532054
if (getpeereid(newsock, &euid, &egid) < 0) {
20542055
error("%s getpeereid failed: %s", __func__,

clientloop.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1273,6 +1273,7 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
12731273
}
12741274
continue;
12751275
#endif /* !WINDOWS */
1276+
12761277
case '?':
12771278
print_escape_help(berr, escape_char, compat20,
12781279
(c && c->ctl_chan != -1),

contrib/redhat/openssh.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
%define ver 7.3p1
1+
%define ver 7.4p1
22
%define rel 1
33

44
# OpenSSH privilege separation requires a user & group ID

contrib/suse/openssh.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
1515
Name: openssh
16-
Version: 7.3p1
16+
Version: 7.4p1
1717
URL: https://www.openssh.com/
1818
Release: 1
1919
Source0: openssh-%{version}.tar.gz

contrib/win32/openssh/build.psm1

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Set-StrictMode -Version Latest
33
[string] $script:platform = $env:PROCESSOR_ARCHITECTURE
44
[string] $script:vcPath = $null
55
[System.IO.DirectoryInfo] $script:OpenSSHRoot = $null
6+
[System.IO.DirectoryInfo] $script:gitRoot = $null
67
[bool] $script:Verbose = $false
78
[string] $script:BuildLogFile = $null
89

@@ -268,6 +269,34 @@ function Start-SSHBootstrap
268269
}
269270
}
270271

272+
function Clone-Win32OpenSSH
273+
{
274+
$win32OpenSSHPath = join-path $script:gitRoot "Win32-OpenSSH"
275+
if (-not (Test-Path -Path $win32OpenSSHPath -PathType Container))
276+
{
277+
Write-BuildMsg -AsInfo -Message "clone repo Win32-OpenSSH"
278+
Push-Location $gitRoot
279+
git clone -q --recursive https://github.com/PowerShell/Win32-OpenSSH.git $win32OpenSSHPath
280+
Pop-Location
281+
}
282+
Write-BuildMsg -AsInfo -Message "pull latest from repo Win32-OpenSSH"
283+
Push-Location $win32OpenSSHPath
284+
git fetch -q origin
285+
git checkout -qf L1-Prod
286+
Pop-Location
287+
}
288+
289+
function Copy-OpenSSLSDK
290+
{
291+
$sourcePath = Join-Path $script:gitRoot "Win32-OpenSSH\contrib\win32\openssh\OpenSSLSDK"
292+
Write-BuildMsg -AsInfo -Message "copying $sourcePath"
293+
Copy-Item -Container -Path $sourcePath -Destination $PSScriptRoot -Recurse -Force -ErrorAction SilentlyContinue -ErrorVariable e
294+
if($e -ne $null)
295+
{
296+
Write-BuildMsg -AsError -ErrorAction Stop -Message "Copy OpenSSL from $sourcePath failed "
297+
}
298+
}
299+
271300
function Start-SSHBuild
272301
{
273302
[CmdletBinding(SupportsShouldProcess=$false)]
@@ -286,6 +315,8 @@ function Start-SSHBuild
286315

287316
# Get openssh-portable root
288317
$script:OpenSSHRoot = Get-Item -Path $repositoryRoot.FullName
318+
$script:gitRoot = split-path $script:OpenSSHRoot
319+
289320

290321
if($PSBoundParameters.ContainsKey("Verbose"))
291322
{
@@ -302,6 +333,9 @@ function Start-SSHBuild
302333
Write-BuildMsg -AsInfo -Message "Build Log: $($script:BuildLogFile)"
303334

304335
Start-SSHBootstrap
336+
337+
Clone-Win32OpenSSH
338+
Copy-OpenSSLSDK
305339
$msbuildCmd = "msbuild.exe"
306340
$solutionFile = Get-SolutionFile -root $repositoryRoot.FullName
307341
$cmdMsg = @("${solutionFile}", "/p:Platform=${NativeHostArch}", "/p:Configuration=${Configuration}", "/fl", "/flp:LogFile=${script:BuildLogFile}`;Append`;Verbosity=diagnostic")
@@ -380,4 +414,4 @@ function Get-RepositoryRoot
380414
throw new-object System.IO.DirectoryNotFoundException("Could not find the root of the GIT repository")
381415
}
382416

383-
Export-ModuleMember -Function Start-SSHBuild, Get-RepositoryRoot, Get-BuildLogFile
417+
Export-ModuleMember -Function Start-SSHBuild, Get-RepositoryRoot, Get-BuildLogFile, Clone-Win32OpenSSH, Copy-OpenSSLSDK

contrib/win32/openssh/config.h.vs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@
876876
/* #undef HAVE_SET_ID */
877877

878878
/* Define to 1 if you have the `SHA256_Update' function. */
879-
#define HAVE_SHA256_UPDATE 1
879+
/* #undef HAVE_SHA256_UPDATE */
880880

881881
/* Define to 1 if you have the <sha2.h> header file. */
882882
/* #undef HAVE_SHA2_H */

0 commit comments

Comments
 (0)