HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //proc/1233/root/usr/lib/python3/dist-packages/samba/__pycache__/gp_scripts_ext.cpython-310.pyc
o

�/ah�@sLddlZddlZddlmZddlmZddlmZdZGdd�de�Z	dS)�N)�
gp_pol_ext)�	b64encode)�NamedTemporaryFilea

### autogenerated by samba
#
# This file is generated by the gp_scripts_ext Group Policy
# Client Side Extension. To modify the contents of this file,
# modify the appropriate Group Policy objects which apply
# to this machine. DO NOT MODIFY THIS FILE DIRECTLY.
#

c@s&eZdZdd�Zddd�Zdd�ZdS)	�gp_scripts_extcCsdS)NzUnix Settings/Scripts�)�selfrr�6/usr/lib/python3/dist-packages/samba/gp_scripts_ext.py�__str__"szgp_scripts_ext.__str__Nc
Cs�|D]6\}}|j�|�t|�|vr3|t|���D]\}}tj�|�r)t�|�|j�t|�|�q|j�	�q|D]�}|j
r�d}	d|	dd|	dd|	dd|	d	i}
|j�|j�d
}tj�|j
|�}|�
|�}
|
smq;|
jD]o}|j|
��vr�|j��r�|s�|
|jn|}d|jt|j�����f}|j�t|�|�}|s�tdd
d|d��*}dt}|d|j7}|�|�t�|jd�|j�t|�||j�Wd�n1s�wY|j�	�qpq;dS)Nz%Software\Policies\Samba\Unix Settingsz%s\Daily Scriptsz/etc/cron.dailyz%s\Monthly Scriptsz/etc/cron.monthlyz%s\Weekly Scriptsz/etc/cron.weeklyz%s\Hourly Scriptsz/etc/cron.hourly�MACHINE/Registry.polz%s:%s�gp_zw+F)�prefix�mode�delete�dirz#!/bin/sh
%sz%s
i�)�gp_db�set_guid�str�items�os�path�exists�unlinkr�commit�
file_sys_path�name�join�parse�entries�keyname�keys�data�stripr�encode�decode�retriever�intro�write�chmod�store)r�deleted_gpo_list�changed_gpo_list�cdir�guid�settings�	attribute�script�gpo�reg_key�sections�pol_filer�pol_conf�e�cron_dir�old_val�f�contentsrrr�process_group_policy%sV
�

��
�
��z#gp_scripts_ext.process_group_policycCs�i}d}|jrBtj�|j|�}|�|�}|s|S|jD]&}|j�d�d}|�d�rA|j	�
�rA||��vr9g||<||�|j	�q|S)Nr
�\����Scripts)
rrrrrrr�split�endswithr r!r�append)rr0�outputr3rr4r5�keyrrr�rsopLs

�zgp_scripts_ext.rsop)N)�__name__�
__module__�__qualname__r	r:rCrrrrr!s
'r)
r�re�
samba.gpclassr�base64r�tempfilerr%rrrrr�<module>s