%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/samba/netcmd/domain/models/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/samba/netcmd/domain/models/__pycache__/auth_policy.cpython-312.pyc

�

�I�d|��t�ddlmZddlmZddlmZmZmZmZddl	m
Z
dZdZGd�d	e�Z
Gd
�de
�Zy)
�)�IntEnum)�Dn�)�BooleanField�	EnumField�IntegerField�StringField)�Model�-i���c�8�eZdZdZdZdZed��Zed��Zy)�StrongNTLMPolicyrr�c�n�t|jD�cgc]}|j���c}�Scc}w)N)�sorted�_member_names_�
capitalize)�cls�choices  �H/usr/lib/python3/dist-packages/samba/netcmd/domain/models/auth_policy.py�get_choiceszStrongNTLMPolicy.get_choices's*����9K�9K�L�v�v�(�(�*�L�M�M��Ls�2c�@�dj|j��S)Nz, )�joinr)rs r�choices_strzStrongNTLMPolicy.choices_str+s���y�y����*�+�+�N)	�__name__�
__module__�__qualname__�DISABLED�OPTIONAL�REQUIRED�classmethodrr�rrr
r
"s9���H��H��H��N��N��,��,rr
c��eZdZed�Zed�Zede�Z	ed�Z
ed�Zed�Z
ed�Zed�Zed	��Zed
��Zed��Zy)
�AuthenticationPolicy�descriptionzmsDS-AuthNPolicyEnforcedzmsDS-StrongNTLMPolicyz)msDS-UserAllowedNTLMNetworkAuthenticationzmsDS-UserTGTLifetimez,msDS-ServiceAllowedNTLMNetworkAuthenticationzmsDS-ServiceTGTLifetimezmsDS-ComputerTGTLifetimec�H�|j�}|jd�|S)z�Return the base DN for the AuthenticationPolicy model.

        :param ldb: Ldb connection
        :return: Dn object of container
        z;CN=AuthN Policies,CN=AuthN Policy Configuration,CN=Services)�get_config_basedn�	add_child)�ldb�base_dns  r�get_base_dnz AuthenticationPolicy.get_base_dn<s)���'�'�)�����I�	K��rc��y)NzmsDS-AuthNPolicyr"r"rr�get_object_classz%AuthenticationPolicy.get_object_classHs��!rc��|std��	t|t�r|nt||�}tj	||��}|�td|�d���|S#t$rtj	||��}Y�5wxYw)aHelper function to return auth policy or raise LookupError.

        :param ldb: Ldb connection
        :param name: Either DN or name of Authentication Policy
        :raises: LookupError if not found
        :raises: ValueError if name is not set
        zAttribute 'name' is required.)�dn)�cnzAuthentication policy z not found.)�
ValueError�
isinstancerr$�get�LookupError)r)�namer/�policys    r�lookupzAuthenticationPolicy.lookupLs�����<�=�=�	<�#�D�"�-��2�c�4�=�B�)�-�-�c�b�-�9�F��>�� 6�t�f�K�H�I�I��
��
�	<�)�-�-�c�d�-�;�F�	<�s�5A� A:�9A:N)rrrr	r%r�enforcedrr
�strong_ntlm_policy�user_allow_ntlm_network_authr�user_tgt_lifetime�service_allow_ntlm_network_auth�service_tgt_lifetime�computer_tgt_lifetime�staticmethodr+r-r7r"rrr$r$0s����m�,�K��6�7�H�"�#:�<L�M��#/�3�$5� �$�%;�<��&2�6�'8�#�'�(A�B��(�)C�D���	��	��"��"����rr$N)�enumrr)r�fieldsrrrr	�modelr
�MIN_TGT_LIFETIME�MAX_TGT_LIFETIMEr
r$r"rr�<module>rEs<��.��F�F������,�w�,�2�5�2r

Zerion Mini Shell 1.0