%PDF- %PDF-
Direktori : /lib/python3/dist-packages/samba/netcmd/__pycache__/ |
Current File : //lib/python3/dist-packages/samba/netcmd/__pycache__/spn.cpython-312.pyc |
� �I�d� � � � d dl mZ d dlZd dlmZ d dlmZ d dlm Z d dl mZmZm Z mZ G d� de� Z G d� d e� Z G d � de� Z G d� d e � Zy)� N)�SamDB)�system_session)�_get_user_realm_domain)�Command�CommandError�SuperCommand�Optionc � � e Zd ZdZdZej ej ej d�Z e dddedd� � gZd gZ d d�Zy)�cmd_spn_listzList spns of a given user.z%prog <user> [options]�� sambaopts�credopts�versionopts�-H�--URL�%LDB URL for database or target server�URL�H��help�type�metavar�dest�userNc � � |j � }|j |� }t |t � ||�� }t ||� \ } } }| j j | dz � |j dt j | � z t j dg�� }t |� dkD r�|d j d� } | �Q| j j d|d j z � | D ] }| j j d|z � �" y | j j d |d j z � y t d |z � �)N��session_info�credentials�lp� �samaccountname=%s�servicePrincipalName�� expression�scope�attrsr z1User %s has the following servicePrincipalName: z %s z$User %s has no servicePrincipalName �User %s not found)�get_loadparm�get_credentialsr r r �outf�write�search�ldb� binary_encode� SCOPE_SUBTREE�len�get�dnr )�selfr r r r r r �creds�sam�cleaneduser�realm�domain�res�spns�es �2/usr/lib/python3/dist-packages/samba/netcmd/spn.py�runzcmd_spn_list.run1 s> � � � #� #� %���(�(��,���A�N�$4� %�"�.�� (>�d�C�'H�$��e�V�� � ����d�*�+��j�j�*�S�->�->�{�-K�K��#�#�,B�+C� � E�� �s�8�a�<��q�6�:�:�4�5�D���� � ���H���F�I�I��� � 3�A��I�I�O�O�I��M�2�3� � � ��� G� #�A�� � �!*� +� �2�T�9�:�:� �NNNN��__name__� __module__�__qualname__�__doc__�synopsis�options�SambaOptions�CredentialsOptions�VersionOptions�takes_optiongroupsr �str� takes_options� takes_argsr= � r>