File manager - Edit - /opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/__pycache__/linux_acl.cpython-310.pyc
Back
o ;j� � @ sl d Z ddlZddlmZ dZdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� Zddd�Z ddd�ZdS )zs Support for Linux File Access Control Lists The Linux ACL module requires the `getfacl` and `setfacl` binaries. � N��CommandExecutionError�aclc C s t jj�d�r tS dS )z6 Only load the module if getfacl is installed �getfacl)FzWThe linux_acl execution module cannot be loaded: the getfacl binary is not in the path.)�salt�utils�path�which�__virtualname__� r r �J/opt/saltstack/salt/lib/python3.10/site-packages/salt/modules/linux_acl.py�__virtual__ s r c C s, d} t d | ��� }|d �� }|d �� S )z~ Return facl version from getfacl --version CLI Example: .. code-block:: bash salt '*' acl.version zgetfacl --version�cmd.runr � )�__salt__� splitlines�split�strip)�cmd�out�retr r r �version s r c G s | st d��d S )Nz@You need to specify at least one file or directory to work with!r )�argsr r r �_raise_on_no_files, s ��r c O sz |� dd�}t| � i }d}|r|d7 }| D ] }|d|� d�7 }qtd |dd��� }d }|D �] }|s5q/|�d �r;q/|�d�r�|�dd ��d �}|d dkr[|d }i g g d�||<