mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
Windows Privileges - moved util code to it's own C# util (#48897)
* Windows Privileges - moved util code to it's own C# util * Rename Enabler class to PrivilegeEnabler to remove ambiguity * rename Utils to PrivilegeUtil * fix missing util name changes
This commit is contained in:
@@ -61,7 +61,6 @@ Function SetPrivilegeTokens() {
|
||||
# This also sets us up for setting the owner as a feature.
|
||||
# See the following for details of each privilege
|
||||
# https://msdn.microsoft.com/en-us/library/windows/desktop/bb530716(v=vs.85).aspx
|
||||
Import-PrivilegeUtil
|
||||
$privileges = @(
|
||||
"SeRestorePrivilege", # Grants all write access control to any file, regardless of ACL.
|
||||
"SeBackupPrivilege", # Grants all read access control to any file, regardless of ACL.
|
||||
|
||||
@@ -295,7 +295,6 @@ if ($hive) {
|
||||
Add-Type -TypeDefinition $registry_util
|
||||
$env:TMP = $original_tmp
|
||||
|
||||
Import-PrivilegeUtil
|
||||
try {
|
||||
Set-AnsiblePrivilege -Name SeBackupPrivilege -Value $true
|
||||
Set-AnsiblePrivilege -Name SeRestorePrivilege -Value $true
|
||||
|
||||
Reference in New Issue
Block a user