%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/samba/gp/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/samba/gp/__pycache__/vgp_files_ext.cpython-312.pyc

�

�I�d����ddlZddlZddlZddlmZmZmZddlmZddl	m
Z
mZddlm
Z
d�Zd�Zd�ZGd	�d
ee�Zy)�N)�
gp_xml_ext�check_safe_path�gp_file_applier)�NamedTemporaryFile)�copyfile�move)�logc��d}|jd�D]�}|jd�}|dk(rD|jd��|dz}|jd��|dz}|jd	���W|d
z}�]|dk(rD|jd��|dz}|jd��|d
z}|jd	����|dz}��|dk(s��|jd��|dz}|jd��|dz}|jd	����|dz}��|S)Nr�permissions�type�user�read��write��execute�@�group� ���other���)�findall�get�find)�entry�moder�ptypes    �8/usr/lib/python3/dist-packages/samba/gp/vgp_files_ext.py�	calc_moder#s5���D��}�}�]�3�������'���F�?�����'�3���
������(�4���
�����	�*�6���
��
�g�
�����'�3���
������(�4���
�����	�*�6���
��
�g�
�����'�3���
������(�4���
�����	�*�6���
��-�.�K�c��d}tddd�D]3}dddd�}|j�D]}|||zzr	|||z
}�|dz
}��5|S)	N�-��������r�w�x)rrr)�range�keys)r �stat�i�maskr,s     r"�stat_from_moder22sh���D�
�1�b�"�
����s��-������	�A��q�A�v����Q��������		���Kr$c��tjj|�r"dtj|�jzSy)N�%d)�os�path�existsr/�st_ctime)�fnames r"�source_file_changer:=s0��	�w�w�~�~�e���r�w�w�u�~�.�.�.�.�r$c��eZdZd�Zd�Zd�Zy)�
vgp_files_extc��y)NzVGP/Unix Settings/Files�)�selfs r"�__str__zvgp_files_ext.__str__Bs��(r$c
���|D]J\}}t|�|vs�|t|�j�D]\}}|j|||���L|D�]"}|js�|jj|j�d}tjj|j|�}	|j|	�}
|
s�v|
jd�}|jd�}|jd�D�]v}
|jjd�}|
jd�j}tjj|tjj!t#|	��j%�|j%��}tjj'|�st)j*d|���|
jd�j}|
jd	�j}|
jd
�j}t-|
�}|}|j/t1|�||d|z�}d�}|j3|j||||||||�	��y��%y)
N�(MACHINE/VGP/VTLA/Unix/Files/manifest.xml�
policysetting�data�file_properties�	gpo_cache�sourcezSource file does not exist�targetr
rr4c���ttjj|�d��5}t	||j
�tj|j
tj|�jtj|�j�tj|j
|�t|j
|�ddd�|gS#1swY|gSxYw)NF)�dir�delete)rr5r6�dirnamer�name�chown�pwd�getpwnam�pw_uid�grp�getgrnam�gr_gid�chmodr)�source_filerHr
rr �fs      r"�applier_funcz8vgp_files_ext.process_group_policy.<locals>.applier_funcls���/�B�G�G�O�O�F�4K�7<�>�1�AB�$�[�!�&�&�9��H�H�Q�V�V�S�\�\�$�-?�-F�-F�%(�\�\�%�%8�%?�%?�A��H�H�Q�V�V�T�2� �����0�
1�!'�x��1�!'�x��s�B(C�C))�str�items�unapply�
file_sys_path�gp_db�set_guidrMr5r6�join�parserr�lp�
cache_path�textrLr�upperr7r	�warnr#�generate_value_hashr:�apply)r?�deleted_gpo_list�changed_gpo_list�guid�settings�	attribute�_�gpo�xmlr6�xml_conf�policyrDr�
local_pathrGrVrHr
rr �
value_hashrXs                       r"�process_group_policyz"vgp_files_ext.process_group_policyEs��.�	=�N�D�(��4�y�H�$�$,�S��Y�$7�$=�$=�$?�=�L�I�q��L�L��y�)�<�=�	=�
$�+	G�C�� � ��
�
�#�#�C�H�H�-�@���w�w�|�|�C�$5�$5�s�;���:�:�d�+����!����7���{�{�6�*��!�\�\�*;�<�!G�E�!%���!3�!3�K�!@�J�"�Z�Z��1�6�6�F�"$�'�'�,�,�z��������(=�>�D�D�F�(.����#8�K��7�7�>�>�+�6����!=�{�K� �"�Z�Z��1�6�6�F� �:�:�f�-�2�2�D�!�J�J�w�/�4�4�E�$�U�+�D�!'�I�
"&�!9�!9�.�{�;� �%����"7�J�(��J�J�s�x�x��J��*�F�D�%��G�A!G�+	Gr$c
���i}d}|j�rMtjj|j|�}|j	|�}|s|S|jd�}|jd�}|j
d�D]�}|jd�j}	|jd�j}
|jd�j}|jd�j}t|�}
t|
��d	|�d	|�d	|
�d
|	��	}t|�|j�vrg|t|�<|t|�j|���|S)NrBrCrDrErGrHr
r�	z -> )
r\r5r6r_r`rrrcr#r2rYr.�append)r?rn�outputror6rprqrDrrGrHr
rr �ps               r"�rsopzvgp_files_ext.rsopxs*����8������7�7�<�<�� 1� 1�3�7�D��z�z�$�'�H���
��]�]�?�3�F��;�;�v�&�D����&7�8�

,�����H�-�2�2�����H�-�2�2���z�z�&�)�.�.���
�
�7�+�0�0�� ��'��#�D�)�4����H���t�9�F�K�K�M�1�(*�F�3�t�9�%��s�4�y�!�(�(��+�

,��
r$N)�__name__�
__module__�__qualname__r@rtrzr>r$r"r<r<As��)�1G�fr$r<)r5rOrR�samba.gp.gpclassrrr�tempfiler�shutilrr�samba.gp.util.loggingr	r#r2r:r<r>r$r"�<module>r�s;��"��I�I�'�!�%��6	�/�L�J��Lr$

Zerion Mini Shell 1.0