@@ -4,22 +4,22 @@ function SetAdminOnlyACL($path) {
4
4
$acl = New-Object System.Security.AccessControl.DirectorySecurity
5
5
# Disable inheritance from parent
6
6
$acl.SetAccessRuleProtection ($true , $true )
7
-
8
- $fsRights = [System.Security.AccessControl.FileSystemRights ]::FullControl
7
+
8
+ $fsRights = [System.Security.AccessControl.FileSystemRights ]::FullControl
9
9
$inheritanceFlags = [System.Security.AccessControl.InheritanceFlags ]" ContainerInherit, ObjectInherit"
10
10
$propagationFlags = [System.Security.AccessControl.PropagationFlags ]::None
11
11
$aceType = [System.Security.AccessControl.AccessControlType ]::Allow
12
12
13
13
# BUILTIN\Administrators, NT AUTHORITY\SYSTEM
14
14
# Avoid using account names as they might change based on the locale
15
15
foreach ($sid in @ (" S-1-5-32-544" , " S-1-5-18" ))
16
- {
16
+ {
17
17
$sidObj = New-Object System.Security.Principal.SecurityIdentifier($sid )
18
18
$account = $sidObj.Translate ( [System.Security.Principal.NTAccount ])
19
- $ace = New-Object System.Security.AccessControl.FileSystemAccessRule ($account , $fsRights , $inheritanceFlags , $propagationFlags , $aceType )
19
+ $ace = New-Object System.Security.AccessControl.FileSystemAccessRule ($account , $fsRights , $inheritanceFlags , $propagationFlags , $aceType )
20
20
$acl.AddAccessRule ($ace )
21
21
}
22
-
22
+
23
23
Set-ACL $path $acl
24
24
}
25
25
@@ -45,9 +45,9 @@ $server_ext_conf_file="server_ext.cnf"
45
45
46
46
$conf_base_url = " https://raw.github.com/cloudbase/unattended-setup-scripts/master/"
47
47
48
- Invoke-WebRequest - Uri ($conf_base_url + $ca_conf_file ) - OutFile " $ca_dir \$ca_conf_file "
49
- Invoke-WebRequest - Uri ($conf_base_url + $server_ext_conf_file ) - OutFile " $ca_dir \$server_ext_conf_file "
50
- Invoke-WebRequest - Uri ($conf_base_url + $openssl_conf_file ) - OutFile " $ca_dir \$openssl_conf_file "
48
+ ( new-object System.Net.WebClient).DownloadFile ($conf_base_url + $ca_conf_file , " $ca_dir \$ca_conf_file " )
49
+ ( new-object System.Net.WebClient).DownloadFile ($conf_base_url + $server_ext_conf_file , " $ca_dir \$server_ext_conf_file " )
50
+ ( new-object System.Net.WebClient).DownloadFile ($conf_base_url + $openssl_conf_file , " $ca_dir \$openssl_conf_file " )
51
51
52
52
$ENV: PATH += " ;C:\OpenSSL-Win32\bin"
53
53
0 commit comments