Sid Gifari From Gifari Industries - BD Cyber Security Team
Home
/
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
websiteisolation
/
__pycache__
/
✏️
Editing: config.cpython-311.opt-1.pyc
� �@�jng � �` � d Z ddlZddlmZ ddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z mZ ddlmZmZ ddlmZ ddlmZmZ ddlmZmZ dd lmZ d dlmZ d dlmZ d d l m!Z!m"Z" ej# e$� � Z%dZ&dZ'd Z(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0dZ1d� Z2d� Z3d� Z4e G d� d� � � � Z5e G d� d� � � � Z6e G d � d!� � � � Z7ed"� � � Z8d#� Z9d$� Z:d%� Z;d&� Z<d3d'�Z=d(� Z>d)� Z?d*� Z@ejA d+� � � ZBed,eCfd-�� � ZDd.� ZEd/� ZFd0� ZGd1� ZHd2� ZIdS )4z9Per-user domain config persistence (~/.lve/domains.json).� N)�cache)� dataclass�field)�List�Optional)� disable_quota)�ClPwd�drop_privileges)�userdomains�docroot)�CPAPIException� )�domain_lve_sentry_extra)�id_registry)� ErrorCode�LvdErrorz.lvezdomains.jsong $@g�������?i i� )�cpu�pmem�io�nproc�iops�ep�vmemi �i���i )r r c �l � | t v rt t z t t z fS t t fS )zEReturn the inclusive (min, max) a stored *field_name* value may take.)� _BYTES_FIELDS� _INT32_MIN� PAGE_SIZE� _INT32_MAX)� field_names �py/websiteisolation/config.py� _limit_boundsr! I s- � ��]�"�"��I�%�z�I�'=�=�=��z�!�!� c �^ � t |� � }nS# t t t f$ r9}t d| � dt |� � j � �t j �� � d�d}~ww xY wt | � � \ }}||cxk r|k s)n t d| � d|� d|� d|� �t j �� � �|S )a2 Coerce *value* to int and bound it to what *field_name* can carry. The single definition of "a usable limit value", shared by the reader and the writer. They disagreed once, and a value that could be written but not read back made the whole account's configuration unreadable (CLOS-7494). �limit 'z' must be an integer, got ��codeNz' out of range [z, z], got ) �int� TypeError� ValueError� OverflowErrorr �type�__name__r � INVALID_VALUEr! )r �value�iv�e�low�highs r �_validate_limitr3 P s� � � 4� ��Z�Z�����z�=�1� 4� 4� 4� � *�j� *� *���;�;�'� *� *��(�*� *� *� 04� 4�����4���� �j�)�)�I�C���"�����������J�j�J�J�#�J�J��J�J�b�J�J��(�*� *� *� *� �Is � �A"�4A�A"c � � | t v r?d|cxk rt k r/n dS t d| � dt � d|� �t j �� � �dS dS )a_ Refuse a memory limit smaller than one page, other than 0. The kernel takes memory limits in pages, so a value below PAGE_SIZE reaches it as 0 -- unlimited -- while the caller is told it was set (CLOS-7520). Checked on write only: a stored record with such a value still reads back, so the account's other records stay reachable. r r$ z$' must be 0 (unlimited) or at least z bytes, got r% N)r r r r r- )r r. s r �_reject_sub_pager5 m s� � � �]�"�"�q�5�'<�'<�'<�'<�9�'<�'<�'<�'<�'<�'<�� .�j� .� .�� .� .�&+� .� .��(�*� *� *� *� #�"�'<�'<r"