/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/clsetuplib.py (4422B)
# -*- coding: utf-8 -*- # CLSETUP python lib # # 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 # Classes: # # Kernel # check min kernel for securelinks # Setup: # # setup apache gid for securelinks # setup nagios from __future__ import print_function from __future__ import absolute_import import sys, subprocess, os, grp, pwd import cldetectlib from cl_proc_hidepid import remount_proc from clcommon.sysctl import SysCtlConf, SYSCTL_CL_CONF_FILE # Kernel Version Class class KernelVersion: _SECURELINKS_MIN_KERNEL = ['1','1','95'] _system_kernel = '' _cl_kernel = True def __init__(self): p = subprocess.Popen(['uname', '-r'], stdout=subprocess.PIPE, stderr=subprocess.PIPE) (out, err) = p.communicate() if (p.returncode != 0): print('error: subprocess call error. Cant\'t get current kernel version') sys.exit(1) if (out.find('lve') != -1): self._system_kernel = out.split('lve')[1].split('el')[0][:-1].strip().split('.') print(self._system_kernel) else: self._cl_kernel = False # Check if system kernel newer then securelinks min kernel def securelinks_kernel_requirement(self): if self._cl_kernel: if (self._system_kernel >= self._SECURELINKS_MIN_KERNEL) and os.path.isfile('/proc/sys/fs/symlinkown_gid'): return True else: return False else: print('error: Feature is not supported on non CL kernel.') sys.exit(1) # return _SECURELINKS_MIN_KERNEL def get_securelinks_min_kernel(self): return 'lve' + '.'.join(self._SECURELINKS_MIN_KERNEL) sysctl = SysCtlConf(config_file=SYSCTL_CL_CONF_FILE) def set_securelinks_gid(apache_gid): """ Change /etc/sysctl.conf for apache gid :param apache_gid: id of apache's group :return: None """ symlink_command = 'fs.symlinkown_gid' sysctl.set(symlink_command, apache_gid) def _add_to_super_gid(user): """ Add user to the group specified by fs.proc_super_gid. If fs.proc_super_gid is 0 (means undefined) or group doesn't really exists then create "clsupergid" group, configure it as fs.proc_super_gid and add user to this group """ sgid_key = 'fs.proc_super_gid' try: # sysctl.get may return empty string in some cases like cldeploy # when CL kernel is not loaded yet and proc has no such param proc_super_gid = int(sysctl.get(sgid_key)) except ValueError: proc_super_gid = 0 try: # Check that group with this gid really exists, and if not, then reset # it to undefined so it will be replaced with clsupergid below grp.getgrgid(proc_super_gid).gr_name except KeyError: proc_super_gid = 0 if proc_super_gid == 0: # Create and configure group if it was undefined sgid_name = 'clsupergid' subprocess.run('groupadd -f ' + sgid_name, shell=True, executable='/bin/bash') proc_super_gid = grp.getgrnam(sgid_name).gr_gid sysctl.set(sgid_key, proc_super_gid) # If user already in this group or it's primary group == proc_super_gid # this will do nothing subprocess.run('usermod -a -G {} {}'.format(proc_super_gid, user), shell=True, executable='/bin/bash') def setup_nagios(do_remount_proc=True): """ Add nagios to configured fs.proc_super_gid group """ if not cldetectlib.get_nagios(): return # Nothing to do _add_to_super_gid('nagios') # CAG-796: use hidepid=2 when mounting /proc if do_remount_proc: remount_proc() def setup_mailman(): """ Detect "mailman" and add it to fs.proc_super_gid group """ if not os.path.isdir('/usr/local/cpanel/3rdparty/mailman'): return try: pwd.getpwnam('mailman') except KeyError: return _add_to_super_gid('mailman') def setup_supergids(): """ Configure "special" users to be in fs.proc_super_gid group, if it's necessary. If this GID was undefined(0) then create and setup special clsupergid group """ setup_nagios(do_remount_proc=False) setup_mailman() # CAG-796: use hidepid=2 when mounting /proc remount_proc()