X7ROOT File Manager
Current Path:
/opt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/webisolation
opt
/
cloudlinux
/
venv
/
lib
/
python3.11
/
site-packages
/
clcagefslib
/
webisolation
/
📁
..
📄
__init__.py
(248 B)
📁
__pycache__
📄
admin_config.py
(3.07 KB)
📄
config.py
(1.74 KB)
📁
crontab
📄
jail_config.py
(2.72 KB)
📄
jail_config_builder.py
(6.21 KB)
📄
jail_utils.py
(4.93 KB)
📄
libenter.py
(2.23 KB)
📄
mount_config.py
(1.38 KB)
📄
mount_ordering.py
(4.96 KB)
📄
mount_types.py
(1.26 KB)
📄
php.py
(3.39 KB)
📄
service.py
(1.76 KB)
📄
triggers.py
(1.9 KB)
Editing: mount_types.py
#!/opt/cloudlinux/venv/bin/python3 -sbb # -*- coding: utf-8 -*- # # Copyright © Cloud Linux GmbH & Cloud Linux Software, Inc 2010-2021 All Rights Reserved # # Licensed under CLOUD LINUX LICENSE AGREEMENT # http://cloudlinux.com/docs/LICENCE.TXT # from dataclasses import dataclass from enum import Enum, auto class MountType(Enum): """Types of mount operations.""" # Bind mount source to target (source="tmpfs" for tmpfs mounts) BIND = auto() # @USER_MOUNTS directive USER_MOUNTS = auto() # Comment line for organization COMMENT = auto() @dataclass class MountEntry: """A single mount operation.""" type: MountType source: str target: str = "" options: tuple[str, ...] = () def render(self) -> str: """Render to jail.c mount syntax.""" opts = ",".join(self.options) if self.options else "" if self.type == MountType.BIND: parts = [self.source, self.target] if opts: parts.append(opts) return " ".join(parts) elif self.type == MountType.USER_MOUNTS: return f"@USER_MOUNTS {self.source}" elif self.type == MountType.COMMENT: return f"## {self.source}" raise ValueError(f"Unknown mount type: {self.type}")
Upload File
Create Folder