Tj,I d dl Z d dlZd dlZd dlZd dlZd dlZd dlmZ d dlm Z m Z mZmZm Z d dlmZ d dlmZ d dlmZmZ dZdZd e eef d ee fdZd e eef d ee fdZ G d de Z G d de Zdeded eeef fdZded efdZde eef d efdZ ded efdZ!de eef d efdZ"de eef d efdZ#d5dedee e d e e fdZ$d Z%d efd!Z&d" Z'd# Z(d ed$efd%Z)d&ed'ed ee fd(Z*d&ed ee fd)Z+d6d+Z,d, Z-d7d.ed/efd0Z.d5d/efd1Z/d5d/efd2Z0d3 Z1d4 Z2dS )8 N)Path)UnionIterableOptionalTupleList)Enum)ClPwd)get_rhn_systemid_value is_ubuntuz0/opt/cpvendor/config/cl-manager-ui-settings.jsoni pathreturnc t j | t j t j z t j z t j z }n# t $ r Y dS w xY w t j t j | j s t j | dS t j |t t j | S # t $ r Y t j | dS w xY w# t j | w xY w)aT Read at most _MAX_DROP_IN_BYTES from an untrusted per-user path, refusing symlinks (O_NOFOLLOW) and non-regular files (FIFO/device fstat guard). O_NONBLOCK keeps the open of a planted FIFO/device from blocking. Returns the bytes read, or None if the path is a symlink, not a regular file, or cannot be opened/read. N)osopenO_RDONLY O_NOFOLLOW O_NONBLOCK O_CLOEXECOSErrorstatS_ISREGfstatst_modecloseread_MAX_DROP_IN_BYTES)r fds /builddir/build/BUILDROOT/alt-python27-cllib-3.4.41-1.el8.cloudlinux.x86_64/opt/cloudlinux/venv/lib/python3.11/site-packages/clcommon/clwpos_lib.py_safe_read_bytesr s WT2;6FU V V tt|BHRLL011 wr-.. s<