Hacked By AnonymousFox

Current Path : /opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/__pycache__/cloudways.cpython-311.pyc

�

��g
��p�dZddlZddlmZddlmZddlmZmZddl	m
Z
eGd�d����ZdS)	u

This program is free software: you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License,
or (at your option) any later version.


This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
See the GNU General Public License for more details.


You should have received a copy of the GNU General Public License
 along with this program.  If not, see <https://www.gnu.org/licenses/>.

Copyright © 2019 Cloud Linux Software Inc.

This software is also available under ImunifyAV commercial license,
see <https://www.imunify360.com/legal/eula>
�N)�	dataclass)�Path)�List�Set)�is_cloudwaysc��eZdZUdZdZeed<dZeed<e	de
dddeedee
jd	df
d
���Ze	de
dedeedee
jd	ef
d���Ze	de
d
edeedee
jd	ef
d���ZdS)�
CloudwaysUsera
    Helper to override a `user` for Cloudways environment where a file (db)
    in a customer's directory may belong to another user but should be
    visible for the customer and at the same time it must be cleanable
    (the true `owner` of a file is used for cleaning up)
    N�name�uid�path�fallback�users_from_panel�pw_all�returnc�d����t��rt���fd�|D��|��S|S)Nc3��K�|]?}|j�vr4t|j���jv�&�|j|j���V��@dS))r
rN)�pw_namer�pw_dir�parents�pw_uid)�.0�pw�clsrrs  ����T/opt/imunify360/venv/lib/python3.11/site-packages/imav/malwarelib/utils/cloudways.py�	<genexpr>z3CloudwaysUser.get_user_from_path.<locals>.<genexpr>4sg���������z�%5�5�5��R�Y���4�<�7�7��C�R�Z�R�Y�7�7�7�8�7�7�7�	��)r�next)rrr
rrs`` ` r�get_user_from_pathz CloudwaysUser.get_user_from_path*sa������>�>�		��������$�������
��r�
fallback_namec�X�||���}|�||||��}|jS)N)r
)rr
)rrrrrr
�users       r�override_name_by_pathz#CloudwaysUser.override_name_by_path>s8���3�M�*�*�*���%�%�d�H�6F��O�O���y�r�fallback_uidc�X�||���}|�||||��}|jS)N)r)rr)rrr#rrr
r!s       r�override_uid_by_pathz"CloudwaysUser.override_uid_by_pathJs7���3�<�(�(�(���%�%�d�H�6F��O�O���x�r)�__name__�
__module__�__qualname__�__doc__r
�str�__annotations__r�int�classmethodrrr�pwd�
struct_passwdrr"r%�rrr	r	sQ����������D�#�����C��O�O�O�����"���c�(�	�
�S�&�'��
�
����[��&�	��	��	��c�(�		�
�S�&�'�	�

�
	�	�	��[�	��	��	��	��c�(�		�
�S�&�'�	�

�
	�	�	��[�	�	�	rr	)r)r.�dataclassesr�pathlibr�typingrr�defence360agent.utilsrr	r0rr�<module>r5s�����*�
�
�
�!�!�!�!�!�!���������������.�.�.�.�.�.��5�5�5�5�5�5�5���5�5�5r

Hacked By AnonymousFox1.0, Coded By AnonymousFox