ok
Direktori : /opt/cloudlinux/venv/lib/python3.11/site-packages/lvemanager/__pycache__/ |
Current File : //opt/cloudlinux/venv/lib/python3.11/site-packages/lvemanager/__pycache__/sudoers.cpython-311.pyc |
� E��f! � � � d dl mZ d dl mZ d dl mZ d dlZd dlZd dlmZ d dlm Z m Z d dlmZm Z d dlmZ d d lmZ d d lmZ dZdZd Zd� Zd� Zd� Zd� Zd� Zd� Zd� ZdS )� )�print_function)�division)�absolute_importN)�remount_proc)�admins� getCPName)� SysCtlConf�SYSCTL_CL_CONF_FILE)�Feature)�is_panel_feature_supported)�Clsudo�admin� clsupergid� clsudoersc �F � t j dd| |g� � }|dk rdS dS )zAdd user to given unix group�/usr/bin/gpasswdz-ar FT�� subprocess�call�� user_name� group_name�retcodes �I/opt/cloudlinux/venv/lib64/python3.11/site-packages/lvemanager/sudoers.py�_add_user_to_groupr s. � ��o�1�4��J�O�P�P�G��!�|�|��u��4� c �F � t j dd| |g� � }|dk rdS dS )Nr z-dr FTr r s r �_remove_user_from_groupr ( s. � ��o�1�4��J�O�P�P�G��!�|�|��u��4r c � � t t � � � � }||vr|� |� � |D ]}t || � � �dS )z� Add all present DA admins (plus new_admin_name admin) to supplied group :param new_admin_name: new admin name to add :return: N)�listr �appendr )r �new_admin_name� admin_listr s r �_add_admins_into_groupr$ / s^ � � �f�h�h���J��Z�'�'����.�)�)�)�� .� .���5�*�-�-�-�-�.� .r c �D � t j dd| g� � }|dk rdS dS )zCreate group with given namez/usr/sbin/groupaddz-fr FTr )r r s r � _create_groupr&