Merge pull request #615 from PaulHigin/fix-testhelper
Fix sshd executable name and resolve source path.
This commit is contained in:
commit
52f8ba1c14
|
@ -146,7 +146,7 @@ WARNING: Following changes will be made to OpenSSH configuration
|
|||
Get-ChildItem $testSvcConfigDir | foreach {$acl | set-acl $_.FullName}
|
||||
|
||||
|
||||
$SSHDTestSvcNameCmdLine = (Join-Path $script:OpenSSHBinPath sshd) + " -f " + $testSshdConfig
|
||||
$SSHDTestSvcNameCmdLine = (Join-Path $script:OpenSSHBinPath 'sshd.exe') + " -f " + $testSshdConfig
|
||||
New-Service -Name $SSHDTestSvcName -DisplayName "OpenSSH SSH Test Server for E2E tests" -BinaryPathName $SSHDTestSvcNameCmdLine -StartupType Manual | Out-Null
|
||||
sc.exe privs $SSHDTestSvcName SeAssignPrimaryTokenPrivilege/SeTcbPrivilege/SeBackupPrivilege/SeRestorePrivilege/SeImpersonatePrivilege
|
||||
|
||||
|
@ -317,14 +317,12 @@ function Set-BasicTestInfo
|
|||
}
|
||||
else
|
||||
{
|
||||
if (-not (Test-Path (Join-Path $OpenSSHBinPath ssh.exe) -PathType Leaf))
|
||||
$script:OpenSSHBinPath = (Resolve-Path -Path $OpenSSHBinPath -ErrorAction Stop).Path
|
||||
|
||||
if (-not (Test-Path (Join-Path $script:OpenSSHBinPath ssh.exe) -PathType Leaf))
|
||||
{
|
||||
Throw "Cannot find OpenSSH binaries under $OpenSSHBinPath. Please specify -OpenSSHBinPath to the OpenSSH installed location"
|
||||
}
|
||||
else
|
||||
{
|
||||
$script:OpenSSHBinPath = $OpenSSHBinPath
|
||||
}
|
||||
}
|
||||
|
||||
$Global:OpenSSHTestInfo.Add("OpenSSHBinPath", $script:OpenSSHBinPath)
|
||||
|
|
Loading…
Reference in New Issue