403Webshell
Server IP : 80.87.202.40  /  Your IP : 216.73.216.169
Web Server : Apache
System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64
User : bitrix ( 600)
PHP Version : 8.2.27
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : ON |  Perl : ON |  Python : OFF |  Sudo : ON |  Pkexec : ON
Directory :  /lib/python3.11/site-packages/ansible/module_utils/common/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : /lib/python3.11/site-packages/ansible/module_utils/common/__pycache__/file.cpython-311.pyc
�

���c����ddlmZmZmZeZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
Z
ddlZddlZddlZddlmZddlmZmZmZddlmZmZddlmZ	ddlZdZn
#e$rdZYnwxYwid	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd �d!d"�d#d$�d%d&�d'd(�d)d*�d+d,d-d.��Ze	j d/��Z!e	j d0��Z"e	j d1��Z#d2Z$d3Z%d4Z&d5�Z'd6�Z(d7�Z)d8�Z*Gd9�d:e+��Z,Gd;�d<��Z-dS)=�)�absolute_import�division�print_functionN)�contextmanager)�to_bytes�	to_native�to_text)�b�binary_type)�	deprecateTF�A�noatime�a�append�c�
compressed�C�nocow�d�nodump�D�dirsync�e�extents�E�	encrypted�h�	blocksize�i�	immutable�I�indexed�j�
journalled�N�inline�s�zero�S�synchronous�t�notail�T�	blockroot�undelete�
compressedraw�compresseddirty)�u�X�Zz[+=-]z[^ugo]z[^rwxXstugo]i��Ii�c��tjtjztjzt	j|��tjzS)a>is_executable(path)

    is the given path executable?

    :arg path: The path of the file to check.

    Limitations:

    * Does not account for FSACLs.
    * Most times we really want to know "Can the current user execute this
      file".  This function does not tell us that, only if any execute bit is set.
    )�stat�S_IXUSR�S_IXGRP�S_IXOTH�os�ST_MODE)�paths �E/usr/lib/python3.11/site-packages/ansible/module_utils/common/file.py�
is_executabler?Bs.��*�\�D�L�
(�4�<�
7�2�7�4�=�=���;V�V�W�c��d�|D��}|S)Nc�T�g|]%}|tv�t�|����&S�)�FILE_ATTRIBUTES�get)�.0�attrs  r>�
<listcomp>z%format_attributes.<locals>.<listcomp>[s1��b�b�b�D�$�Ra�Ja�Ja�o�)�)�$�/�/�Ja�Ja�Jar@rC)�
attributes�attribute_lists  r>�format_attributesrKZs��b�b�J�b�b�b�N��r@c�x���fd�t���D��}d�|��S)Nc�"��g|]\}}|�v�	|��SrCrC)rF�keyrGrIs   �r>rHz-get_flags_from_attributes.<locals>.<listcomp>`s'���P�P�P�Y�S�$�T�Z�=O�=O�S�=O�=O�=Or@�)rD�items�join)rI�flagss` r>�get_flags_from_attributesrS_s8���P�P�P�P�/�"7�"7�"9�"9�P�P�P�E�
�7�7�5�>�>�r@c��ttd���t��t��t��t��t��t��tdg������}|S)N�raw)�typerG)�aliases)�mode�owner�group�seuser�serole�selevel�setyperI)�dict)�arg_specs r>�get_file_arg_specradse���
�u�
�
�
��f�f��f�f��v�v��v�v�����v�v����)�)�)�	�	�	�H��Or@c��eZdZdS)�LockTimeoutN)�__name__�
__module__�__qualname__rCr@r>rcrcrs�������Dr@rcc�>�eZdZdZd�Zedd���Zdd�Zd�ZdS)�FileLocka
    Currently FileLock is implemented via fcntl.flock on a lock file, however this
    behaviour may change in the future. Avoid mixing lock types fcntl.flock,
    fcntl.lockf and module_utils.common.file.FileLock as it will certainly cause
    unwanted and/or unexpected behaviour
    c�6�tdd���d|_dS)Nz�FileLock is not reliable and has never been used in core for that reason. There is no current alternative that works across POSIX targetsz2.16)�version)r�lockfd��selfs r>�__init__zFileLock.__init__}s-���^� �	"�	"�	"�	"�����r@Nc#�K�	|�|||��dV�|���dS#|���wxYw)z.
        Context for lock acquisition
        N)�set_lock�unlock)rmr=�tmpdir�lock_timeouts    r>�	lock_filezFileLock.lock_file�sM����
	��M�M�$���5�5�5��E�E�E��K�K�M�M�M�M�M��D�K�K�M�M�M�M���s	�5�Ac��tj�|d�tj�|������}d}t
}tjddkrt}t|d��|_
|dkr_tj|j
tj
tjz��tj|t jt jz��dS|r�d}||kr�	tj|j
tj
tjz��tj|t jt jz��dS#|$rt'j|��||z
}Y��wxYw|j
���t-d�|�����tj|j
tj
��tj|t jt jz��dS)ak
        Create a lock file based on path with flock to prevent other processes
        using given path.
        Please note that currently file locking only works when it's executed by
        the same user, I.E single user scenarios

        :kw path: Path (file) to lock
        :kw tmpdir: Path where to place the temporary .lock file
        :kw lock_timeout:
            Wait n seconds for lock acquisition, fail if timeout is reached.
            0 = Do not wait, fail if lock cannot be acquired immediately,
            Default is None, wait indefinitely until lock is released.
        :returns: True
        zansible-{0}.lockg�������?r��wTz{0} sec)r;r=rQ�format�basename�IOError�sys�version_info�BlockingIOError�openrk�fcntl�flock�LOCK_EX�LOCK_NB�chmodr7�S_IWRITE�S_IREAD�time�sleep�closerc)rmr=rrrs�	lock_path�l_wait�r_exception�e_secss        r>rpzFileLock.set_lock�s����G�L�L��);�)B�)B�2�7�CS�CS�TX�CY�CY�)Z�)Z�[�[�	�������A��!�#�#�)�K��9�c�*�*����1����K���U�]�U�]�%B�C�C�C��H�Y��
��� <�=�=�=��4��
	>��F��<�'�'���K���U�]�U�]�-J�K�K�K��H�Y��
���(D�E�E�E��4��"�����J�v�&�&�&��f�$�F��H�����

�K�������i�.�.�|�<�<�=�=�=�
��D�K���/�/�/�
���D�M�D�L�8�9�9�9��ts�<AE�E<�;E<c��|jsdS	tj|jtj��|j���n#t
$rYnwxYwdS)z�
        Make sure lock file is available for everyone and Unlock the file descriptor
        locked by set_lock

        :returns: True
        T)rkrr��LOCK_UNr��
ValueErrorrls r>rqzFileLock.unlock�sl���{�	��4�	��K���U�]�3�3�3��K���������	�	�	��D�	�����ts�=A	�	
A�A)N)	rdrerf�__doc__rnrrtrprqrCr@r>rhrhvsq�����������
�����^��.�.�.�.�`����r@rh).�
__future__rrrrV�
__metaclass__�errnor;r7�re�pwd�grpr��shutil�	tracebackrr{�
contextlibr�ansible.module_utils._textrrr	�ansible.module_utils.sixr
r�$ansible.module_utils.common.warningsr�selinux�HAVE_SELINUX�ImportErrorrD�compile�MODE_OPERATOR_RE�USERS_RE�PERMS_RE�
_PERM_BITS�_EXEC_PERM_BITS�
_DEFAULT_PERMr?rKrSra�	ExceptionrcrhrCr@r>�<module>r�s���C�B�B�B�B�B�B�B�B�B��
�����	�	�	�	�����	�	�	�	�
�
�
�
�
�
�
�
�����
�
�
�
���������
�
�
�
�%�%�%�%�%�%�C�C�C�C�C�C�C�C�C�C�3�3�3�3�3�3�3�3�:�:�:�:�:�:���N�N�N��L�L�������L�L�L�����������������	�
�����
���������������������������� ��!�"��#�$
�	�	�)����2�2�:�h�'�'���2�:�i� � ���2�:�o�&�&���
����
�X�X�X�0���
���
���	�	�	�	�	�)�	�	�	�W�W�W�W�W�W�W�W�W�Ws�A�A)�(A)

Youez - 2016 - github.com/yon3zu
LinuXploit