File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/__pycache__/win_dacl.cpython-310.pyc
Back
o ;j� � @ s8 d Z dZdd� Zdd� Zdd� Zdd d �Zddd �ZdS )a� Windows Object Access Control Lists Ensure an ACL is present parameters: name - the path of the object objectType - Registry/File/Directory user - user account or SID for the ace permission - permission for the ace (see module win_acl for available permissions for each objectType) acetype - Allow/Deny propagation - how the ACL should apply to child objects (see module win_acl for available propagation types) .. code-block:: yaml addAcl: win_dacl.present: - name: HKEY_LOCAL_MACHINE\SOFTWARE\mykey - objectType: Registry - user: FakeUser - permission: FullControl - acetype: ALLOW - propagation: KEY&SUBKEYS Ensure an ACL does not exist parameters: name - the path of the object objectType - Registry/File/Directory user - user account or SID for the ace permission - permission for the ace (see module win_acl for available permissions for each objectType) acetype - Allow/Deny propagation - how the ACL should apply to child objects (see module win_acl for available propagation types) .. code-block:: yaml removeAcl: win_dacl.absent: - name: HKEY_LOCAL_MACHINE\SOFTWARE\mykey - objectType: Registry - user: FakeUser - permission: FulLControl - acetype: ALLOW - propagation: KEY&SUBKEYS Ensure an object is inheriting permissions parameters: name - the path of the object objectType - Registry/File/Directory clear_existing_acl - True/False - when inheritance is enabled, should the existing ACL be kept or cleared out .. code-block:: yaml eInherit: win_dacl.enableinheritance: - name: HKEY_LOCAL_MACHINE\SOFTWARE\mykey - objectType: Registry - clear_existing_acl: True Ensure an object is not inheriting permissions parameters: name - the path of the object objectType - Registry/File/Directory copy_inherited_acl - True/False - if inheritance is enabled, should the inherited permissions be copied to the ACL when inheritance is disabled .. code-block:: yaml dInherit: win_dacl.disableinheritance: - name: HKEY_LOCAL_MACHINE\SOFTWARE\mykey - objectType: Registry - copy_inherited_acl: False �win_daclc C s dt v rdS dS )z6 Load this state if the win_acl module exists �win_dacl.add_acer )Fz#win_dacl module could not be loaded)�__salt__� r r �H/opt/saltstack/salt/lib/python3.10/site-packages/salt/states/win_dacl.py�__virtual__L s r c C s | di dd�}t d | |||||d�}|d ry|d sktd r5d|d<