From 15dacc80c0150b578d4844b3af7493d99e65d750 Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Fri, 6 Jul 2018 16:25:05 -0700 Subject: [PATCH] Update ACL check to use identifier to prevent localization errors --- .../providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 b/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 index 813f9c5e7..d04698b85 100644 --- a/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 +++ b/plugins/providers/hyperv/scripts/utils/VagrantVM/VagrantVM.psm1 @@ -709,7 +709,11 @@ function Check-VagrantHyperVAccess { [string] $Path ) $acl = Get-ACL -Path $Path - $systemACL = $acl.Access | where {$_.IdentityReference -eq "NT AUTHORITY\System" -and $_.FileSystemRights -eq "FullControl" -and $_.AccessControlType -eq "Allow" -and $_.IsInherited -eq $true} + $systemACL = $acl.Access | where { + $_.IdentityReference.Translate([System.Security.Principal.SecurityIdentifier]).Value -eq "S-1-5-18" -and + $_.FileSystemRights -eq "FullControl" -and + $_.AccessControlType -eq "Allow" -and + $_.IsInherited -eq $true} if($systemACL) { return $true }