File: //opt/cloudlinux/venv/lib/python3.11/site-packages/ssa/__pycache__/clos_ssa_ini.cpython-311.pyc
�
4C�i' � �~ � d Z ddlZddlZdZ edd� �� � fZ edd� �� � fZd Zd
ede fd�Z
d
edefd�ZdS )z@
Shared constants and helpers for clos_ssa.ini file management.
� Nzclos_ssa.iniz./var/cagefs/*/*/etc/cl.php.d/alt-php[0-9][0-9]c �\ � t j | � d� � d � � S �N�/� ��pwd�getpwnam�split��paths �G/opt/cloudlinux/venv/lib64/python3.11/site-packages/ssa/clos_ssa_ini.py�<lambda>r � � �3�<��
�
�3����(:�;�;� � )r �userz0/var/cagefs/*/*/etc/cl.php.d/*/alt-php[0-9][0-9]c �\ � t j | � d� � d � � S r r r s r
r r r r )�php44�php51�php52�php53zphp\d+-imunifyzphp-internal�dir_path�returnc �J � t D ]}t j || � � r dS �dS )z'Check if given path is in exclude list.TF)�EXCLUDE_DIR_PATHS�re�search)r �patterns r
�is_excluded_pathr $ s6 � �$� � ��
�9�W�h�'�'� ��4�4� ��5r r c �^ � t j d| � � }|r|� d� � ndS )zAExtract PHP version number from path (e.g., 'alt-php80' -> '80').z
php(\d{2})� N)r r �group)r �matchs r
�extract_php_versionr# , s, � ��I�m�T�*�*�E�"�,�5�;�;�q�>�>�>��,r )�__doc__r r �
INI_FILE_NAME�dict�INI_USER_LOCATIONS_BASE�$INI_USER_LOCATIONS_WEBSITE_ISOLATIONr �str�boolr r# � r r
�<module>r, s� ��� � �
�
�
� � � � � �
� �D�>�;�;�=� =� =�� � �D�@�;�;�=� =� =�(� $�� �
�s� �t� � � � �-�c� -�c� -� -� -� -� -� -r