403Webshell
Server IP : 23.254.227.96  /  Your IP : 216.73.216.7
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.1.1k
System : Linux hwsrv-1277026.hostwindsdns.com 4.18.0-477.13.1.el8_8.x86_64 #1 SMP Tue May 30 14:53:41 EDT 2023 x86_64
User : viralblo ( 1001)
PHP Version : 8.1.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/lib/python3.6/site-packages/cloudinit/distros/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3.6/site-packages/cloudinit/distros/__pycache__/ug_util.cpython-36.pyc
3

��b�%�@sNddlmZddlmZmZeje�Zdd�Zddd�Z	dd	�Z
d
d
d�ZdS)�)�log)�
type_utils�utilcCs$t|t�r|j�jd�}t|t�r�i}x�|D]�}t|t�r�x�|j�D]X\}}t|ttf�sltdtj	|���t|t�r�|j
|g�j|�qD|j
|g�j|�qDWq,t|t�r�||kr�g||<q,tdtj	|���q,W|}i}t|t��rx6|j�D]\}}t
j|�||<q�Wntdtj	|���|S)N�,zBad group member type %szUnknown group name type %sz@Group config must be list, dict or string type only but found %s)�
isinstance�str�strip�split�list�dict�items�	TypeErrorr�obj_name�
setdefault�extend�appendr�uniq_merge_sorted)Zgrp_cfgZ	c_grp_cfg�i�k�v�groupsZgrp_nameZgrp_members�r�/usr/lib/python3.6/ug_util.py�_normalize_groupss8






rNcCsXt|t�r�g}xt|j�D]h\}}t|ttttf�rLtj|�r�|j	t|��qt|t�rj||d<|j	|�qt
dtj|�|f��qW|}nt|t�r�tj
|�}i}x�|D]�}t|ttf�r�xvtj|�D]}|r�||kr�i||<q�Wq�t|t��r |jdd�}|j|��p
i}	tj|	|g�||<q�t
dtj|���q�W|�r�i}
xX|j�D]L\}}i}
x4|j�D](\}}|jdd�j�}|�r`||
|<�q`W|
|
|<�qJW|
}d}|�r&d|k�r&|jd�}|�r&|j�}|jd�}|jdg�}|j|i�}|jdg�}tj
||�}dj|�|d<tj|||g�||<x,|j�D] \}}|�rF||knd	|d<�q0W|S)
N�namez(Unmappable user value type %s for key %s�defaultzDUser config must be dictionary/list or string  types only and not %s�-�_rrF)rrr�bool�int�floatrrZis_truerr
rrrr
Z
uniq_merge�pop�get�
mergemanydict�replacer�copy�join)Zu_cfgZdef_user_cfgZad_ucfgrr�usersZuser_config�u�nZprev_configZc_users�unameZuconfigZ	c_uconfigZdef_userZ
def_configZ
def_groupsZ
parsed_configZ
parsed_groupsZusers_groupsrrr�_normalize_usersHsl







r+c
CsJ|si}i}d|krX|drX|d}t|t�r8d|i}n t|t�sXtjdtj|��i}i}y|j�}Wntk
r�tjd�YnXt	j
||g�}|jdg�}t|tttf�s�tjdtj|��g}|�rt|t�r�|j
ddi�n6t|t��r
t|�jdd�|d<nt|t��r|d	7}i}d
|k�r8t|d
�}t||�}||fS)N�userrz?Format for 'user' key must be a string or dictionary and not %sziDistro has not implemented default user access. No distribution provided default user will be normalized.r'z^Format for 'users' key must be a comma separated string or a dictionary or a list but found %srTz,defaultr)rrr�LOGZwarningrrZget_default_user�NotImplementedErrorrr#r"r
rrr+)ZcfgZdistroZold_userZdistro_user_configZdefault_user_configZ
base_usersrr'rrr�normalize_users_groups�sJ





r/cCsZ|s||fSdd�}tt||j���}|s2||fSt|�d}||}|jdd�||fS)NcSs"|d}|sd|krdS|dS)N�rFr)�entry�configrrr�	safe_find�sz"extract_default.<locals>.safe_findrr)r�filterrr
r!)r'Zdefault_nameZdefault_configr3Z	tmp_usersrr2rrr�extract_default�sr5)N)NN)Z	cloudinitrZloggingrrZ	getLogger�__name__r-rr+r/r5rrrr�<module>s
1
\C

Youez - 2016 - github.com/yon3zu
LinuXploit