%PDF- %PDF-
Mini Shell

Mini Shell

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

�

�I�d����ddlmZddlmZddlmZmZmZm	Z	ddl
mZmZddl
mZGd�de�ZGd�d	e�ZGd
�de�ZGd�d
e	�Zy)�N)�Dn)�Command�CommandError�Option�SuperCommand)�AuthenticationSilo�User)�
ModelErrorc	��eZdZdZdZejejd�Ze	ddde
dd�	�e	d
ddd
e
��e	dddd
e
��gZ		dd�Zy)�cmd_domain_auth_silo_member_addz'Add a member to an authentication silo.�%prog -H <URL> [options]��	sambaopts�credopts�-H�--URL�&LDB URL for database or target server.�URL�ldap_url��help�type�metavar�dest�--name�'Name of authentication silo (required).�name�store�rr�actionr�--memberz/Member to add to the silo (DN or account name).�memberNc��|std��|std��|j|||�}	tj||��}|�td|�d���	dt||�i}		tj|fi|	��}
|
�td|�d	���|j|
_		|j||
�|
j|�|jjd|
j�d
|�d��y#t$r}t|��d}~wwxYw#t$rd|i}	Y��wxYw#t$r}t|��d}~wwxYw#t$r}t|��d}~wwxYw)N�Argument --name is required.�Argument --member is required.��cn�Authentication silo � not found.�dn�username�User '�' not found.z' added to the � silo.
)r�ldb_connectr�getr
r�
ValueErrorr	r*�
assigned_silo�
add_member�save�outf�writer��selfrrrrr"�ldb�silo�e�
user_query�users           �F/usr/lib/python3/dist-packages/samba/netcmd/domain/auth/silo_member.py�runz#cmd_domain_auth_silo_member_add.run3so����=�>�>���?�@�@����x��H�=��	"�%�)�)�#�$�7�D�
�<��!5�d�V�;�G�H�H�	.���3���0�J�	"��8�8�C�.�:�.�D�
�<����x�|�<�=�=�"�W�W���	"��O�O�C��&��I�I�c�N�	
�	�	���&�����?�4�&��I�J��A�	"��q�/�!��	"���	.�$�f�-�J�	.��
�	"��q�/�!��	"���	"��q�/�!��	"�sY�C0�D�'D� #D;�0	D	�9D�D	�
D�D�	D8�(D3�3D8�;	E�E�E�NNNNN�
�__name__�
__module__�__qualname__�__doc__�synopsis�options�SambaOptions�CredentialsOptions�takes_optiongroupsr�str�
takes_optionsr?��r>rrs}��1�)�H��)�)��.�.���	�t�W�#K���Z�	9��x�=��7��	6�	�z�E��W�3�	8�
	�M�;?�"�,KrNrc	��eZdZdZdZejejd�Ze	ddde
dd�	�e	d
ddd
e
��e	ddddd��gZ		dd�Zy)� cmd_domain_auth_silo_member_listz,List all members in the authentication silo.r
rrrrrrrrrrrrz--jsonzOutput results in JSON format.�
output_format�store_const�json)rrr �constNc�<�|std��|j|||�}	tj||��}|�td|�d���	|j
D�	cgc]}	t
j||	����}
}	|dk(r.|j|
D�cgc]}|j���c}�y|
D]*}|jj|j�d���,y#t$r}t|��d}~wwxYwcc}	w#t$r}t|��d}~wwxYwcc}w)Nr$r&r(r))r*rS�
)rr/rr0r
�membersr	�
print_json�as_dictr5r6r*)r8rrrrrQr9r:r;r*rWr"s            r>r?z$cmd_domain_auth_silo_member_list.runvs����=�>�>����x��H�=��	"�%�)�)�#�$�7�D�
�<��!5�d�V�;�G�H�H�	"�6:�l�l�C��t�x�x���+�C�G�C�
�F�"��O�O�G�D�&�V�^�^�-�D�E�!�
2���	�	���6�9�9�+�R� 0�1�
2��#�	"��q�/�!��	"��D���	"��q�/�!��	"��
EsG�C�C=�C8�7C=�
D�	C5�%C0�0C5�8C=�=	D�D�Dr@rArMrNr>rPrPbs}��6�)�H��)�)��.�.���	�t�W�#K���Z�	9��x�=��7��	6�	�x�>�#�M��	I�
�M�;?�%)�2rNrPc	��eZdZdZdZejejd�Ze	ddde
dd�	�e	d
ddd
e
��e	dddd
e
��gZ		dd�Zy)�"cmd_domain_auth_silo_member_removez,Remove a member from an authentication silo.r
rrrrrrrrrrrrr!z4Member to remove from the silo (DN or account name).r"Nc��|std��|std��|j|||�}	tj||��}|�td|�d���	dt||�i}		tj|fi|	��}
|
�td|�d	���d|
_	|j||
�|
j|�|jjd|
j�d
|�d��y#t$r}t|��d}~wwxYw#t$rd|i}	Y��wxYw#t$r}t|��d}~wwxYw#t$r}t|��d}~wwxYw)Nr$r%r&r(r)r*r+r,r-z' removed from the r.)rr/rr0r
rr1r	r2�
remove_memberr4r5r6rr7s           r>r?z&cmd_domain_auth_silo_member_remove.run�sn����=�>�>���?�@�@����x��H�=��	"�%�)�)�#�$�7�D�
�<��!5�d�V�;�G�H�H�	.���3���0�J�	"��8�8�C�.�:�.�D�
�<����x�|�<�=�=�"���	"����s�D�)��I�I�c�N�	
�	�	���&�����+>�t�f�H�M�N��A�	"��q�/�!��	"���	.�$�f�-�J�	.��
�	"��q�/�!��	"���	"��q�/�!��	"�sY�C&�D�'D�#D1�&	C?�/C:�:C?�
D�D�	D.�D)�)D.�1	E
�:E�E
r@rArMrNr>r[r[�s}��6�)�H��)�)��.�.���	�t�W�#K���Z�	9��x�=��7��	6�	�z�J��W�3�	8�
	�M�;?�"�,OrNr[c�:�eZdZdZe�e�e�d�Zy)�cmd_domain_auth_silo_memberz)Manage members in an authentication silo.)�add�list�removeN)rBrCrDrErrPr[�subcommandsrMrNr>r_r_�s ��3�/�0�0�2�4�6��KrNr_)�samba.getopt�getoptrGr9r�samba.netcmdrrrr�samba.netcmd.domain.modelsrr	�%samba.netcmd.domain.models.exceptionsr
rrPr[r_rMrNr>�<module>risT��.��D�D�?�<�AK�g�AK�H02�w�02�fAO��AO�H�,�rN

Zerion Mini Shell 1.0