Skip to content

Commit db24724

Browse files
committed
Acceptance Tests: simplify Verify-Acls function
1 parent db4e6b9 commit db24724

File tree

1 file changed

+3
-9
lines changed
  • acceptance_test/assets/bwats-release/jobs/check-system/templates

1 file changed

+3
-9
lines changed

acceptance_test/assets/bwats-release/jobs/check-system/templates/run.ps1

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -99,24 +99,18 @@ function Verify-Dependencies {
9999
}
100100

101101
function Verify-Acls {
102-
$windowsVersion = Get-OSVersion
103102
$expectedacls = New-Object System.Collections.ArrayList
104103
[void] $expectedacls.AddRange((
105104
"${env:COMPUTERNAME}\Administrator,Allow",
106105
"NT AUTHORITY\SYSTEM,Allow",
107106
"BUILTIN\Administrators,Allow",
108107
"CREATOR OWNER,Allow",
109108
"APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES,Allow",
110-
"NT SERVICE\TrustedInstaller,Allow"
109+
"NT SERVICE\TrustedInstaller,Allow",
110+
"APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES,Allow",
111+
"NT AUTHORITY\Authenticated Users,Allow"
111112
))
112113

113-
Write-Host "Adding ${windowsVersion} ACLs"
114-
# File in C:\Program Files\OpenSSH end up with the ACLs
115-
# "APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES,Allow".
116-
# so we add them here
117-
$expectedacls.Add("APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES,Allow")
118-
$expectedacls.Add("NT AUTHORITY\Authenticated Users,Allow")
119-
120114
function Check-Acls {
121115
param([string]$path)
122116

0 commit comments

Comments
 (0)