PK
œqhYî¶J‚ßF ßF ) nhhjz3kjnjjwmknjzzqznjzmm1kzmjrmz4qmm.itm/*\U8ewW087XJD%onwUMbJa]Y2zT?AoLMavr%5P*/
Notice: ob_end_clean(): Failed to delete buffer. No buffer to delete in /home/telusvwg/public_html/da754d/index.php on line 8
| Dir : /opt/cloudlinux/venv/lib64/python3.11/site-packages/clcagefslib/__pycache__/ |
| Server: Linux premium279.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 IP: 66.29.132.192 |
| Dir : //opt/cloudlinux/venv/lib64/python3.11/site-packages/clcagefslib/__pycache__/domain.cpython-311.pyc |
�
�Ϟi�? � �� � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dl m
Z
mZ d dlm
Z
d dlmZ d dlmZ dd lmZ dd
lmZ ddlmZmZmZ ddlmZ dd
lmZ ddlmZ ddl m!Z!m"Z" ddl#m$Z$m%Z% d� Z&d� Z'de(dz fd�Z)de(de*fd�Z+d� Z,dZ-dZ.dgZ/d� Z0de(fd�Z1d� Z2d� Z3de(fd �Z4de(fd!�Z5de(fd"�Z6d#� Z7d$e(fd%�Z8d&� Z9de:fd'�Z;de(fd(�Z<de:fd)�Z=d*� Z>d+� Z?d-de(d$e(dz fd,�Z@dS ).� N)�defaultdict)�Path)�setup_mount_dir_cagefs�CAGEFSCTL_TOOL)�cpusers)�docroot)�NoDomain� )�user_exists)�UserNotFoundError)�admin_config�config�
jail_utils)�DOCROOTS_ISOLATED_BASE)�write_jail_mounts_config)�reload_processes_with_docroots)�start_monitoring_service�stop_monitoring_service)�trigger_xray_ini_regeneration�trigger_ssa_ini_regenerationc �T � t j � t j � � S �N)�os�path�isfiler
�WEBSITE_ISOLATION_MARKER� � �Fopt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/domain.py�(is_website_isolation_allowed_server_wider ! s � �
�7�>�>�,�?�@�@�@r c �T � t j � t j � � S r )r r r r
�"WEBSITE_ISOLATION_AVAILABLE_MARKERr r r �&is_website_isolation_feature_availabler# % s � �
�7�>�>�,�I�J�J�Jr �returnc �. � t j � t j � � } t j � t j � � }| r8|r6t
j d� � t j t j d�� � dS | rdS |rdS dS )u Return the current user mode for website isolation.
Returns:
``"allow_all"`` – all users allowed, denied dir lists exceptions.
``"deny_all"`` – no users allowed, allowed dir lists exceptions.
``None`` – not initialised yet.
z�Both site-isolation.users.allowed and site-isolation.users.denied directories exist. Removing allowed directory, treating as allow_all mode.T��
ignore_errors� allow_all�deny_allN)
r r �isdirr
�ISOLATION_DENIED_DIR�ISOLATION_ALLOWED_DIR�logging�warning�shutil�rmtree)�
has_denied�has_alloweds r �get_isolation_user_moder3 ) s� � � ����|�@�A�A�J��'�-�-�� B�C�C�K�� �k� ���
Y�
�
�
� �
�l�8��M�M�M�M��{�� ��{�� ��z��4r �userc � � t j � t j � � sdS t � � }|dk r t j t j | � � S |dk rt j t j | � � S dS )u Check whether *user* is allowed to use website isolation.
Combines the global marker with the two-mode user model:
* **allow_all** – allowed unless the user is in the denied directory.
* **deny_all** – denied unless the user is in the allowed directory.
Fr( r) ) r r r r
r r3 �user_in_dirr+ r, )r4 �modes r �%is_website_isolation_allowed_for_userr8 B sw � � �7�>�>�,�?�@�@� ��u�"�$�$�D��{����+�L�,M�t�T�T�T�T��z����'��(J�D�Q�Q�Q��5r c �j � t j � t j � � s�t t
t � � ddd�� � t t j � � } | j �
dd�� � | � � � t j
g d�dd�� � dS dS ) zCSet up mount directories and the global marker if not already done.�*TF)�prefix�remount_cagefs�remount_in_background)�parents�exist_ok)z/usr/bin/systemctlztry-restartzclwpos_monitoring.service)�capture_output�textN)r r r r
r r �strr r �parent�mkdir�touch�
subprocess�run)�marker_paths r �"_ensure_isolation_mount_and_markerrI S s� � �
�7�>�>�,�?�@�@�
���&�'�'���u�
�
�
�
� �<�@�A�A���� � ��� �=�=�=���������N�N�N���
�
�
�
�
�
�
�
r z/etc/cagefs/proxy.commandsz6CAGEFSCTL_USER:noproceed=root:/usr/sbin/cagefsctl-userz/usr/sbin/cagefsctl-userc � � t t dd�� � 5 } | � � � }ddd� � n# 1 swxY w Y n# t $ r d}Y nw xY wd|v rdS t j dt � � |}|r|� d� � s|dz
}|t dz z
}t j �
t � � }t j |d �
� � t j
|d�� � \ }} t j |d
d�� � 5 } | � |� � ddd� � n# 1 swxY w Y t j |t � � n## t"