%PDF- %PDF-
| Direktori : /lib/python3/dist-packages/samba/provision/__pycache__/ |
| Current File : //lib/python3/dist-packages/samba/provision/__pycache__/common.cpython-312.pyc |
�
���h � �X � d Z dZddlZddlmZ ddlmZ dZdZdZ d Z
d
� Zdd�Zdd�Z
d
� Zy)z/Functions for setting up a Samba configuration.�restructuredText� N)�read_and_sub_file)� setup_dir�FULL� SUBDOMAIN�NT4SYNC�DRSc � � t j j t � | � }t j j |� st d|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)a Setup 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_ldifr 0 s; � � ���;���i��%�%�%��Y�
�3�D��L�L��x� r c �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_ldifr s r �setup_modify_ldifr"