%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�I�d�&�	��dZddlZddlZddlZiZidd�dd�dd�d	d
�dd�d
d�dd�dd�dd�dd�dd�dd�dd�dd�dd�dd�ed <id!d�d"d�d#d�d$d�d%d�d&d�d'd
�d(d�d)d�d*d+�d,d-�d.d/�d0d1�d2d3�d4d5�d6d�ed7<d8died9<ej
d:�j
d;�ej
d<�j
d;�ej
d=�j
d;�ej
d>�j
d;�ej
d?�j
d;�ej
d@�j
d;�ej
dA�j
d;�dB�ZegdC��Z	dD�Z
dE�ZdF�ZdG�Z
dH�ZdI�ZdJ�ZdOdK�ZedLk(r3ddlZ	ej(d5Zej(d3Zeeee��yy#e$r9edMej(dzej2�N�ej4d5�Y�NwxYw)Pz&Generate LDIF from WSPP documentation.�N�	fATTINDEX��
fPDNTATTINDEX��fANR��fPRESERVEONDELETE��fCOPY��fTUPLEINDEX��fSUBTREEATTINDEX��
fCONFIDENTIAL��
fCONFIDENTAIL�fNEVERVALUEAUDIT��fRODCAttribute��fRODCFilteredAttribute�fRODCFILTEREDATTRIBUTE�fEXTENDEDLINKTRACKING��	fBASEONLY��fPARTITIONSECRET��searchflags�FLAG_ATTR_NOT_REPLICATED�FLAG_CR_NTDS_NC� FLAG_ATTR_REQ_PARTIAL_SET_MEMBER�FLAG_CR_NTDS_DOMAIN�FLAG_ATTR_IS_CONSTRUCTED�FLAG_CR_NTDS_NOT_GC_REPLICATED�FLAG_ATTR_IS_OPERATIONAL�FLAG_SCHEMA_BASE_OBJECT�FLAG_ATTR_IS_RDN�FLAG_DISALLOW_MOVE_ON_DELETE��FLAG_DOMAIN_DISALLOW_MOVE��FLAG_DOMAIN_DISALLOW_RENAME��FLAG_CONFIG_ALLOW_LIMITED_MOVE��FLAG_CONFIG_ALLOW_MOVE��FLAG_CONFIG_ALLOW_RENAME��FLAG_DISALLOW_DELETE�systemflags�FLAG_ATTR_IS_CRITICAL�
schemaflagsexs	+�s�>�utf8s
*�H��sVs
*�H��s	+�s�Js	+�s�\s
*�H��)z1.3.12.2.1011.28.0.702z1.2.840.113556.1.1.1.12z2.6.6.1.2.5.11.29z1.2.840.113556.1.1.1.11z1.3.12.2.1011.28.0.714z1.3.12.2.1011.28.0.732z1.2.840.113556.1.1.1.6)�auxiliaryclass�
maycontain�mustcontain�
posssuperiors�systemauxiliaryclass�systemmaycontain�systemmustcontain�systemposssuperiorsc��|}tjd�}	|j�}|dddk(r|dk7r|dk7sJ�||z}nF|dk(r|}|dk(r:	||fS|dddk7r&|dk7r!|dk7r|j|�}|s	|dz|z}�j|}	||fS�q)z- reads a line from an LDIF file, unfolding it�&^([A-Za-z][A-Za-z0-9-]*[A-Za-z0-9])::?Nr5� ��
�#)�re�compile�readline�match)�f�buffer�line�attr_type_re�l�ms      �1/usr/lib/python3/dist-packages/samba/ms_schema.py�__read_folded_linerTYs����D��:�:�F�G�L�
�
�J�J�L���R�a�5�C�<��2�:�$�$�,�/�.��!�8�D��r�z�����7��
�&�>���R�a�5�C�<�A��I�!�r�'�$�*�*�1�-�A��#�c�z�A�~�� �
����&�>��A�c#�zK�ddl}tjd�}d}	g}	t||�\}}|dddk(r�|dk(s|dk(rn`|j	|�}|r|dddk(r|dd}|j|�n-t
d	|zd
|j��|jd���t|�r|��|dk(ry���w)z)reads an LDIF entry, only unfolding linesrNrDrFr5rHrG���zInvalid line: %srE)�end�file)
�sysrIrJrTrL�append�print�stderr�exit�len)rMrZrPrN�entryrQrRs       rS�__read_raw_entriesra�s�������:�:�F�G�L�
�F�
����,�Q��7�K�Q����!�u��|���D�y�A��G���"�"�1�%�A���R�S�6�T�>��#�2��A����Q���(�1�,�#�C�J�J�G�������%�(�u�:��K���7��7�s�B9B;c�&�|jd�dk7r6|jdd�}|jdd�}|jdd�S|jd�r|jd	d�S|jd
�r|jdd�S|S)z"fix a string DN to use ${SCHEMADN}z<RootDomainDN>rW�
 rFrEz)CN=Schema,CN=Configuration,<RootDomainDN>z${SCHEMADN}zDC=XzCN=Schema,CN=Configuration,DC=XzCN=XzCN=Schema,CN=Configuration,CN=X)�find�replace�endswith)�dns rS�fix_dnrh�s���
�w�w�� �B�&�
�Z�Z��r�
"��
�Z�Z��R�
 ���z�z�E�}�U�U�	���V�	��z�z�;�]�K�K�	���V�	��z�z�;�]�K�K��	rUc�0�t|t�sJ�|jdd�}|jdd�}	t|�}t|�S#t$r>d}|jd�}|D]}t||}|dd|z
zz}�Yt|�SwxYw)z%Evaluate the OR expression in 'value'rcrFrEr�|r5r)�
isinstance�strre�int�
ValueError�split�	bitFields)�key�value�o�flagsrM�bitposs      rS�__convert_bitfieldrv�s����e�S�!�"�!��M�M�%��$�E��M�M�#�r�"�E�)���J���q�6�M���)�
�����C� ���	)�A��s�^�A�&�F��Q�2��;�'�(�A�	)��q�6�M�)�s�A�:B�Bc��g}|D]c}t|dt�r|dg}n|d}|dr|j|d�d|d����D|D]}|j|d�d|�����edj|�S)zWrite out entry as LDIFr5r3rz:: �: rG)rkrlr[�join)r`�outrQ�vl�vs     rS�__write_ldif_oner}�s���
�C�
�-���a��d�C� ��A�$��B��1��B��Q�4��J�J�A�a�D�!�A�$�/�0���	-�A��J�J�1�Q�4��+�,�	-�-��9�9�S�>�rUc	��|D�cgc]}|jdd���}}d}dx}x}x}}|D�]p}|djd�r|jd�|ddd|d<n|jd�|d	j�}|dj	�|d<|dj�|d<|s
|d
k(r|d}|tvrG|djdd�|d<|djdd�|d<|djd
�|d<|tvrt||d�|d<|dk(r'|ds"t|dj�|d<d|d<t|dt�rt|d�|d<|dk(rd}|d}	|dk(rd}��_|dk(rd}��h|dk(s��od}��s|sJ�g}
|s|
jdd|zdg�n|
jd	dg�|s|
jdd|gdg�|s|
jd|dg�|s|
jd|dg�|
jdttj ��dg�|
|D�cgc]%}|d	j�t#gd��vs�$|��'c}z}|Scc}wcc}w)z}Perform transformations required to convert the LDIF-like schema
       file entries to LDIF, including Samba-specific stuff.�:r5rFFrxTr3Nr�cnrcrE�,�
omobjectclassrg�objectclass�admindisplayname�admindescriptionzCN=%s,${SCHEMADN}�objectClass�top�adminDescription�adminDisplayName�
objectGUID)rg�
changetype�objectcategory)ro�
startswithr[�lower�lstrip�rstrip�multivalued_attrsrerprv�oMObjectClassBER�striprkrlrh�uuid�uuid4�set)r`r�rQr��skip_dn�skip_objectclass�skip_admin_description�skip_admin_display_namerqrg�header�xs            rS�__transform_entryr��s���',�,��Q�W�W�S�!�_�,�E�,�	�B�TY�Y�G�Y��Y�!7�:Q�
�)*���Q�4�?�?�4� �
�H�H�T�N��Q�4���8�A�a�D�
�H�H�U�O���d�j�j�l����t�{�{�}��!����t�{�{�}��!���c�T�k��1��B��#�#��Q�4�<�<��r�*�A�a�D��Q�4�<�<��R�(�A�a�D��Q�4�:�:�c�?�A�a�D��)��%�c�1�Q�4�0�A�a�D��/�!��Q�4�'��!��
�
��5��!����!���a��d�C� ��!�A�$�<�A�a�D��$�;��G��1��B��-��#��
�&�
&�&*�#�
�&�
&�%)�"�S)*�V�J�2�
�F���
�
�t�0�2�5�u�=�>��
�
�t�R��'�(���
�
�}�u�k�&:�E�B�C�!��
�
�)�2�u�5�6�"��
�
�)�2�u�5�6�
�M�M�<��T�Z�Z�\�!2�E�:�;���j�A�!�A�$�*�*�,�c�Bh�>i�*i�a�j�j�E��L��G
-��Bks�I=�%J�2Jc
���g}ddlm}||dd��5}t|�D]&}|jt	t||����(	ddd�dj
|�S#1swY�xYw)z!Load and transform a schema file.r)�open�rzlatin-1)�encodingN�

)�ior�rar[r}r�ry)�filenamer�rzr�rMr`s      rS�__parse_schema_filer�,st��
�C��	
�h��i�	0�P�A�'��*�	P�E��J�J�'�(9�%��(M�N�O�	P�P��;�;�s���	P�P�s�5A#�#A,c�X�d}d}|rt|d�}|rt|d�}|dz|zdzS)z-Read WSPP documentation-derived schema files.rF�attributeSchema�classSchemar�)r�)�	attr_file�classes_file�dump_attributes�dump_classes�debug�	attr_ldif�classes_ldifs       rS�read_ms_schemar�9sB���I��L��'�	�3D�E�	��*�<��G���v���,�v�5�5rU�__main__z(Usage: %s attr-file.txt classes-file.txt)rY)TTF)�__doc__rI�base64r�rp�	b64encode�decoder�r�r�rTrarhrvr}r�r�r��__name__rZ�argvr�r��
IndexErrorr\r]r^�rUrS�<module>r�sG��$-�	�
���	������R���B����	�
�R���2�
�����R���R������b���b�� �b�!�"�R�#�$��%�&��'�	�-��.����$5�r��&���,A�2�����%E�b����	�
�r����
�#�A�� ���"�1��%�a���a������A��	�-��$�R��	�/��/�f�.�.�/V�W�^�^�_e�f�/�v�/�/�0[�\�c�c�dj�k�)��)�)�*I�J�Q�Q�RX�Y�/�v�/�/�0[�\�c�c�dj�k�.�f�.�.�/V�W�^�^�_e�f�.�f�.�.�/V�W�^�^�_e�f�.�f�.�.�/Z�[�b�b�ci�j����0�1��
&�R%�P
� �(�(G�T
�6��z�����H�H�Q�K�	��x�x��{��

�.��L�
1�2�����
�8�C�H�H�Q�K�H�s�z�z�Z��������s�G�;G?�>G?

Zerion Mini Shell 1.0