~Gu d Z ddlZddlZddlZddlZddlZddlmZ ej e Z
dZd ZdZ
d Zd Zd Zdd
Zd ZdS )
z
CLI helper utilities for CageFS user commands.
Provides functions for:
- Re-entering CageFS environment
- Calling commands via proxyexec for privilege escalation
N)clcagefsz/var/.cagefs/.cagefs.tokenc t t d 5 } | cddd S # 1 swxY w Y dS # t t
f$ r Y dS w xY w)zv
Read the CageFS token from the token file.
Returns:
str: The CageFS token, or None if not found
rN)openCAGEFS_TOKEN_PATHreadstripIOErrorOSError)fs Copt/cloudlinux/venv/lib/python3.11/site-packages/clcagefslib/cli.pyget_cagefs_tokenr s
#S
)
) $Q6688>>## $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $W tts3 A &A
A
AA AA A,+A,/usr/sbin/proxyexecc t j } t j d| z }| d r|dt d }|t
k S # t t f$ r Y dS w xY w)z
Verify that the parent process is the proxyexec daemon
by checking /proc/