mirror of
https://github.com/PowerShell/openssh-portable.git
synced 2025-07-30 01:05:14 +02:00
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}
|
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
|
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
|
sc.exe privs $SSHDTestSvcName SeAssignPrimaryTokenPrivilege/SeTcbPrivilege/SeBackupPrivilege/SeRestorePrivilege/SeImpersonatePrivilege
|
||||||
|
|
||||||
@ -317,14 +317,12 @@ function Set-BasicTestInfo
|
|||||||
}
|
}
|
||||||
else
|
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"
|
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)
|
$Global:OpenSSHTestInfo.Add("OpenSSHBinPath", $script:OpenSSHBinPath)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user