Ë
    Üb¡j  ã                   óX   — d Z dZddlZddlmZ ddlmZ dZdZdZ	d	Z
d
„ Zdd„Zdd„Zd„ Zy)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	                  |«      st        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   — |€dg}t        |t        «      sJ ‚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   — |€dg}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"   ?   s+   € ð ÐØ�;ˆÜ˜Y¨
Ó3€DØ‡O�O�D˜(Õ#r   c                 ó”   — | €J ‚| j                  «        	 t        | ||«       | j                  «        y#  | j                  «        ‚ xY w)a6  Import 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)r   r   r   s      r   Ú	setup_ldbr'   L   sO   € ð ˆ?Ðˆ?Ø×ÑÔð!Ü�s˜I zÔ2ð
 	×ÑÕ øð	Ø×ÑÔ Øús	   –4 ´A)NN)Ú__doc__Ú__docformat__r   Úsambar   Úsamba.paramr   Ú	FILL_FULLÚFILL_SUBDOMAINÚFILL_NT4SYNCÚFILL_DRSr   r   r"   r'   © r   r   ú<module>r1      s@   ðñ4 6à"€ã 	Ý #Ý !à€	Ø€Ø€Ø€òó!ó
$ó!r   