Skip to content

Commit

Permalink
win_acl/Certificates: Fix namespace after renaming file
Browse files Browse the repository at this point in the history
  • Loading branch information
jpitlor committed Sep 6, 2023
1 parent 0778ddd commit d5a9b43
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions plugins/module_utils/_CertACLHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
using Microsoft.Win32.SafeHandles;
using System.Security.Principal;

//TypeAccelerator -Name Ansible.Windows.CertAclHelper.CertAccessRights -TypeName CertAccessRights
//TypeAccelerator -Name Ansible.Windows.CertAclHelper.CertAclHelper -TypeName CertAclHelper
//TypeAccelerator -Name Ansible.Windows._CertAclHelper.CertAccessRights -TypeName CertAccessRights
//TypeAccelerator -Name Ansible.Windows._CertAclHelper.CertAclHelper -TypeName CertAclHelper

namespace ansible_collections.ansible.windows.plugins.module_utils.CertACLHelper
namespace ansible_collections.ansible.windows.plugins.module_utils._CertACLHelper
{
internal class CryptHandle : SafeHandleZeroOrMinusOneIsInvalid
{
Expand Down
6 changes: 3 additions & 3 deletions plugins/modules/win_acl.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#Requires -Module Ansible.ModuleUtils.PrivilegeUtil
#Requires -Module Ansible.ModuleUtils.SID
#Requires -Module Ansible.ModuleUtils.LinkUtil
#AnsibleRequires -CSharpUtil ansible_collections.ansible.windows.plugins.module_utils.CertACLHelper
#AnsibleRequires -CSharpUtil ansible_collections.ansible.windows.plugins.module_utils._CertACLHelper

$ErrorActionPreference = "Stop"

Expand Down Expand Up @@ -156,7 +156,7 @@ Try {
$colRights = [System.Security.AccessControl.RegistryRights]$rights
}
ElseIf ($path_item.PSProvider.Name -eq "Certificate") {
$colRights = [Ansible.Windows.CertAclHelper.CertAccessRights]$rights
$colRights = [Ansible.Windows._CertAclHelper.CertAccessRights]$rights
}
Else {
$colRights = [System.Security.AccessControl.FileSystemRights]$rights
Expand All @@ -175,7 +175,7 @@ Try {
$objUser = New-Object System.Security.Principal.SecurityIdentifier($sid)
If ($path_item.PSProvider.Name -eq "Certificate") {
$cert = Get-Item -LiteralPath $path
$certSecurityHandle = [Ansible.Windows.CertAclHelper.CertAclHelper]::new($cert)
$certSecurityHandle = [Ansible.Windows._CertAclHelper.CertAclHelper]::new($cert)
$objACL = $certSecurityHandle.Acl
$objACE = $objACL.AccessRuleFactory($objUser, [int]$colRights, $False, $InheritanceFlag, $PropagationFlag, $objType)
}
Expand Down

0 comments on commit d5a9b43

Please sign in to comment.