/opt/cloudlinux/venv/lib/python3.11/site-packages
NameSizeModeActions
aiohttp/-0755rm
aiohttp-3.9.2.dist-info/-0755rm
aiosignal/-0755rm
aiosignal-1.3.1.dist-info/-0755rm
alembic/-0755rm
alembic-1.11.1.dist-info/-0755rm
astroid/-0755rm
astroid-2.15.6.dist-info/-0755rm
async_timeout/-0755rm
async_timeout-4.0.3.dist-info/-0755rm
attr/-0755rm
attrs/-0755rm
attrs-23.1.0.dist-info/-0755rm
certifi/-0755rm
certifi-2023.5.7.dist-info/-0755rm
chardet/-0755rm
chardet-5.2.0.dist-info/-0755rm
charset_normalizer/-0755rm
charset_normalizer-2.1.1.dist-info/-0755rm
clcagefslib/-0755rm
clcommon/-0755rm
clconfig/-0755rm
clconfigure/-0755rm
cldashboard/-0755rm
clevents/-0755rm
clflags/-0755rm
cllicense/-0755rm
cllimits/-0755rm
cllimitslib_v2/-0755rm
cllimits_validator/-0755rm
cllvectl/-0755rm
clpackages/-0755rm
clquota/-0755rm
clselect/-0755rm
clselector/-0755rm
clsentry/-0755rm
clsummary/-0755rm
clveconfig/-0755rm
clwizard/-0755rm
clwpos/-0755rm
cl_dom_collector/-0755rm
colorama/-0755rm
colorama-0.4.6.dist-info/-0755rm
contextlib2/-0755rm
contextlib2-21.6.0.dist-info/-0755rm
coverage/-0755rm
coverage-7.2.7.dist-info/-0755rm
Cython/-0755rm
Cython-0.29.35.dist-info/-0755rm
ddt-1.6.0.dist-info/-0755rm
dill/-0755rm
dill-0.3.6.dist-info/-0755rm
distlib/-0755rm
distlib-0.3.8.dist-info/-0755rm
docopt-0.6.2.dist-info/-0755rm
dodgy/-0755rm
dodgy-0.2.1.dist-info/-0755rm
filelock/-0755rm
filelock-3.13.1.dist-info/-0755rm
flake8/-0755rm
flake8-5.0.4.dist-info/-0755rm
flake8_polyfill/-0755rm
flake8_polyfill-1.0.2.dist-info/-0755rm
frozenlist/-0755rm
frozenlist-1.4.0.dist-info/-0755rm
future/-0755rm
future-0.18.3.dist-info/-0755rm
git/-0755rm
gitdb/-0755rm
gitdb-4.0.10.dist-info/-0755rm
GitPython-3.1.32.dist-info/-0755rm
guppy/-0755rm
guppy3-3.1.3.dist-info/-0755rm
idna/-0755rm
idna-3.4.dist-info/-0755rm
iniconfig/-0755rm
iniconfig-2.0.0.dist-info/-0755rm
isort/-0755rm
isort-5.12.0.dist-info/-0755rm
jinja2/-0755rm
Jinja2-3.1.2.dist-info/-0755rm
jsonschema/-0755rm
jsonschema-3.2.0.dist-info/-0755rm
jwt/-0755rm
lazy_object_proxy/-0755rm
lazy_object_proxy-1.9.0.dist-info/-0755rm
libfuturize/-0755rm
libpasteurize/-0755rm
lvemanager/-0755rm
lvestats/-0755rm
lve_stats-2.0.dist-info/-0755rm
lve_utils/-0755rm
lxml/-0755rm
lxml-4.9.2.dist-info/-0755rm
mako/-0755rm
Mako-1.2.4.dist-info/-0755rm
markupsafe/-0755rm
MarkupSafe-2.1.3.dist-info/-0755rm
mccabe-0.7.0.dist-info/-0755rm
mock/-0755rm
mock-5.1.0.dist-info/-0755rm
multidict/-0755rm
multidict-6.0.4.dist-info/-0755rm
numpy/-0755rm
numpy-1.24.3.dist-info/-0755rm
packaging/-0755rm
packaging-23.1.dist-info/-0755rm
past/-0755rm
pep8_naming-0.10.0.dist-info/-0755rm
pip/-0755rm
pip-24.1.2.dist-info/-0755rm
pkg_resources/-0755rm
platformdirs/-0755rm
platformdirs-3.11.0.dist-info/-0755rm
pluggy/-0755rm
pluggy-1.2.0.dist-info/-0755rm
prettytable/-0755rm
prettytable-3.8.0.dist-info/-0755rm
prometheus_client/-0755rm
prometheus_client-0.8.0.dist-info/-0755rm
prospector/-0755rm
prospector-1.10.2.dist-info/-0755rm
psutil/-0755rm
psutil-5.9.5.dist-info/-0755rm
psycopg2/-0755rm
psycopg2-2.6.2.dist-info/-0755rm
pycodestyle-2.9.1.dist-info/-0755rm
pydocstyle/-0755rm
pydocstyle-6.3.0.dist-info/-0755rm
pyfakefs/-0755rm
pyfakefs-5.2.3.dist-info/-0755rm
pyflakes/-0755rm
pyflakes-2.5.0.dist-info/-0755rm
PyJWT-2.8.0.dist-info/-0755rm
pylint/-0755rm
pylint-2.17.4.dist-info/-0755rm
pylint_celery/-0755rm
pylint_celery-0.3.dist-info/-0755rm
pylint_django/-0755rm
pylint_django-2.5.3.dist-info/-0755rm
pylint_flask/-0755rm
pylint_flask-0.6.dist-info/-0755rm
pylint_plugin_utils/-0755rm
pylint_plugin_utils-0.7.dist-info/-0755rm
pylve-2.1-py3.11.egg-info/-0755rm
pymysql/-0755rm
PyMySQL-0.7.11.dist-info/-0755rm
pyparsing/-0755rm
pyparsing-3.0.9.dist-info/-0755rm
pyrsistent/-0755rm
pyrsistent-0.19.3.dist-info/-0755rm
pytest/-0755rm
pytest-7.4.0.dist-info/-0755rm
pytest_subprocess/-0755rm
pytest_subprocess-1.5.0.dist-info/-0755rm
pyvirtualdisplay/-0755rm
PyVirtualDisplay-3.0.dist-info/-0755rm
pyximport/-0755rm
PyYAML-6.0.1.dist-info/-0755rm
raven/-0755rm
raven-6.10.0.dist-info/-0755rm
requests/-0755rm
requests-2.31.0.dist-info/-0755rm
requirements_detector/-0755rm
requirements_detector-1.2.2.dist-info/-0755rm
schema-0.7.5.dist-info/-0755rm
semver/-0755rm
semver-3.0.1.dist-info/-0755rm
sentry_sdk/-0755rm
sentry_sdk-1.29.2.dist-info/-0755rm
setoptconf/-0755rm
setoptconf_tmp-0.3.1.dist-info/-0755rm
setuptools/-0755rm
setuptools-70.2.0.dist-info/-0755rm
simplejson/-0755rm
simplejson-3.19.1.dist-info/-0755rm
six-1.16.0.dist-info/-0755rm
smmap/-0755rm
smmap-5.0.0.dist-info/-0755rm
snowballstemmer/-0755rm
snowballstemmer-2.2.0.dist-info/-0755rm
sqlalchemy/-0755rm
SQLAlchemy-1.3.24.dist-info/-0755rm
ssa/-0755rm
svgwrite/-0755rm
svgwrite-1.4.3.dist-info/-0755rm
tap/-0755rm
tap.py-3.1.dist-info/-0755rm
testfixtures/-0755rm
testfixtures-7.1.0.dist-info/-0755rm
toml/-0755rm
toml-0.10.2.dist-info/-0755rm
tomlkit/-0755rm
tomlkit-0.11.8.dist-info/-0755rm
typing_extensions-4.7.1.dist-info/-0755rm
unshare-0.22.dist-info/-0755rm
urllib3/-0755rm
urllib3-2.0.3.dist-info/-0755rm
vendors_api/-0755rm
virtualenv/-0755rm
virtualenv-20.21.1.dist-info/-0755rm
wcwidth/-0755rm
wcwidth-0.2.6.dist-info/-0755rm
wheel/-0755rm
wheel-0.37.0.dist-info/-0755rm
wmt/-0755rm
wrapt/-0755rm
wrapt-1.15.0.dist-info/-0755rm
xray/-0755rm
yaml/-0755rm
yarl/-0755rm
yarl-1.9.2.dist-info/-0755rm
_distutils_hack/-0755rm
_pytest/-0755rm
_yaml/-0755rm
__pycache__/-0755rm
clcontrollib.py531400644editdlrm
cldetectlib.py188700644editdlrm
cldiaglib.py468720644editdlrm
clhooklib.py14320644editdlrm
cli_utils.py17780644editdlrm
cllicenselib.py80980644editdlrm
clsetuplib.py44220644editdlrm
clsudo.py150490644editdlrm
cl_proc_hidepid.py46790644editdlrm
cython.py5200644editdlrm
ddt.py152730644editdlrm
distutils-precedence.pth1510644editdlrm
docopt.py199460644editdlrm
lveapi.py199760644editdlrm
lvectllib.py1045690644editdlrm
lvestat.py71060644editdlrm
mccabe.py106540644editdlrm
pep8ext_naming.py190520644editdlrm
py.py2630644editdlrm
pycodestyle.py1035010644editdlrm
pylve.cpython-311-x86_64-linux-gnu.so209280755editdlrm
remove_ubc.py56730755editdlrm
schema.py302210644editdlrm
secureio.py192500644editdlrm
simple_rpm.so72800755editdlrm
six.py345490644editdlrm
typing_extensions.py1110820644editdlrm
unshare.cpython-311-x86_64-linux-gnu.so184640755editdlrm
_pyrsistent_version.py230644editdlrm
Edit: /opt/cloudlinux/venv/lib/python3.11/site-packages/cl_proc_hidepid.py (4679B)
# -*- coding: utf-8 -*- # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2019 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENSE.TXT # Module contains functions for remounting /proc with hidepid=2 option # see CAG-796 for details from __future__ import print_function from __future__ import absolute_import import subprocess import re from clcommon.cpapi import Feature, is_panel_feature_supported from clcommon.sysctl import SysCtlConf, SYSCTL_CL_CONF_FILE from clcommon.utils import grep, proc_can_see_other_uid_and_hidepid_synced # on some systems hidepid value is str HidepidValuesDict = { 'noaccess': 1, 'invisible': 2, '1': 1, '2': 2, } def hidepid_found(): """ Search for line like "proc /proc proc defaults,hidepid=2,gid=clsupergid 0 0" in /etc/fstab Return True if /proc is mounted with hidepid option in /etc/fstab """ fstab = '/etc/fstab' try: with open(fstab, 'r') as f: for line in f: line = line.strip() if line and not line.startswith('#'): splitted_line = line.split() if splitted_line and splitted_line[0] == 'proc' and 'hidepid=' in splitted_line[3]: return True except (IOError, IndexError) as e: print('Error: failed to parse', fstab, ':', str(e)) return False def execute(cmd, verbose): if verbose: print('executing', ' '.join(cmd)) return subprocess.call(cmd) def remount_proc(verbose=False): """ Remount /proc with hidepid=2 option when needed """ # In latest versions of the kernel on CL8 # no need to remount /proc with hidepid option # because it is synchronized with fs.proc_can_see_other_uid option if proc_can_see_other_uid_and_hidepid_synced(): return if not is_panel_feature_supported(Feature.LVE): if verbose: print('environment without LVE detected - remounting /proc is skipped') return sysctl = SysCtlConf(config_file=SYSCTL_CL_CONF_FILE) if verbose: print('apply sysctl settings') if hidepid_found(): # admin can override hidepid option via /etc/fstab if verbose: print('hidepid option is found in /etc/fstab - remounting /proc with options from /etc/fstab') return execute(['/bin/mount', '-o', 'remount', '/proc'], verbose) proc_can_see_other_uid = sysctl.get('fs.proc_can_see_other_uid') super_gid = sysctl.get('fs.proc_super_gid') if proc_can_see_other_uid != '0': if verbose: print('virtualized procfs feature is not enabled in sysctl conf - disable hidepid') return execute(['/bin/mount', '-o', 'remount,hidepid=0,gid=0', '/proc'], verbose) if verbose: print('enable hidepid for /proc') return execute(['/bin/mount', '-o', 'remount,hidepid=2,gid='+super_gid, '/proc'], verbose) def get_gid_from_mounts(): """ Retrieve hidepid gid from /proc/mounts :return: gid, 0 if absent """ lines_gen = grep(',hidepid=', '/proc/mounts') gid_prefix = ',gid=' try: for line in lines_gen: line = line.strip() if gid_prefix not in line: continue # Search gid=xxxx in line pos = line.find(gid_prefix) if pos == -1: continue pos += 5 line = line[pos:] pos = line.find(',') if pos != -1: line = line[:pos] else: pos = line.find(' ') if pos != -1: line = line[:pos] else: # Invalid or unsupported proc format return -1 return int(line) except (IOError, IndexError, ValueError): pass # hidepid not found in /proc/mounts return -1 def get_hidepid_typing_from_mounts() -> int: """ Retrieve hidepid value from /proc/mounts :return: hidepid, 0 if absent """ mounts_path = '/proc/mounts' res = 0 try: # Parse mounts file output for proc lines and get the hidepid with open(mounts_path, mode='r') as file: for line in file: m = re.search(r'hidepid=(\d|\w+)', line) if not line.strip().startswith('proc /proc'): continue elif m: res = HidepidValuesDict.get(str(m.group(1)), 0) break except (OSError, IOError, IndexError, ValueError): pass # hidepid not found in /proc/mounts return res