%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/lib/python3/dist-packages/samba/provision/__pycache__/
Upload File :
Create Path :
Current File : //usr/lib/python3/dist-packages/samba/provision/__pycache__/common.cpython-312.pyc

�

�f��X�dZdZddlZddlmZddlmZdZdZdZ	d	Z
d
�Zdd�Zdd�Z
d
�Zy)z/Functions for setting up a Samba configuration.�restructuredText�N)�read_and_sub_file)�	setup_dir�FULL�	SUBDOMAIN�NT4SYNC�DRSc��tjjt�|�}tjj	|�std|z��|S)zHReturn an absolute path to the provision template file specified by filez>File [%s] not found. Please install samba-ad-provision package)�os�path�joinr�exists�	Exception)�filers  �8/usr/lib/python3/dist-packages/samba/provision/common.py�
setup_pathr(s?��
�7�7�<�<�	��T�*�D�
�7�7�>�>�$���X�[_�_�`�`��K�c�n�|�dg}t|t�sJ�t||�}|j||�y)aSetup a ldb in the private dir.

    :param ldb: LDB file to import data into
    :param ldif_path: Path of the LDIF file to load
    :param subst_vars: Optional variables to substitute in LDIF.
    :param nocontrols: Optional list of controls, can be None for no controls
    N�relax:0)�
isinstance�strr�add_ldif��ldb�	ldif_path�
subst_vars�controls�datas     r�setup_add_ldifr0s;�����;���i��%�%�%��Y�
�3�D��L�L��x� rc�J�|�dg}t||�}|j||�y)z�Modify a ldb in the private dir.

    :param ldb: LDB object.
    :param ldif_path: LDIF file path.
    :param subst_vars: Optional dictionary with substitution variables.
    Nr)r�modify_ldifrs     r�setup_modify_ldifr"?s+�����;���Y�
�3�D��O�O�D�(�#rc��|�J�|j�	t|||�|j�y#|j��xYw)a6Import a LDIF a file into a LDB handle, optionally substituting
    variables.

    :note: Either all LDIF data will be added or none (using transactions).

    :param ldb: LDB file to import into.
    :param ldif_path: Path to the LDIF file.
    :param subst_vars: Dictionary with substitution variables.
    N)�transaction_startr�transaction_commit�transaction_cancel)rrrs   r�	setup_ldbr'LsO���?��?�����!��s�I�z�2�
	��� ��	���� �
�s	�
4�A)NN)�__doc__�
__docformat__r�sambar�samba.paramr�	FILL_FULL�FILL_SUBDOMAIN�FILL_NT4SYNC�FILL_DRSrrr"r'�rr�<module>r1s@��46�"�
�	�#�!��	��������!�
$�!r

Zerion Mini Shell 1.0