| Server IP : 198.38.94.13 / Your IP : 216.73.217.33 Web Server : Apache System : Linux d4744.dxb1.stableserver.net 5.14.0-611.49.1.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Apr 21 16:39:08 EDT 2026 x86_64 User : revivere ( 1140) PHP Version : 8.2.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /lib64/python3.9/site-packages/ldap/__pycache__/ |
Upload File : |
a
�.d( � @ s\ d Z ddlmZ ddlZddlZdd� Zddd�Zdd � Zddd�Z dd
d�Z
ddd�ZdS )zs
dn.py - misc stuff for handling distinguished names (see RFC 4514)
See https://www.python-ldap.org/ for details.
� )�__version__Nc C s� | r�| � dd�} | � dd�} | � dd�} | � dd�} | � d d
�} | � dd�} | � d
d�} | � dd�} | � dd�} | d dkr�d�| dd� df�} | d dks�| d dkr�d�d| f�} | S )za
Escape all DN special characters found in s
with a back-slash (see RFC 4514, section 2.4)
�\z\\�,z\,�+z\+�"z\"�<z\<�>z\>�;z\;�=z\=� z\ ���� � Nz\ r �#)�replace�join)�s� r �-/usr/lib64/python3.9/site-packages/ldap/dn.py�escape_dn_chars s r c C s | sg S t j�dtj| |�S )z�
This function takes a DN as string as parameter and returns
a decomposed DN. It's the inverse to dn2str().
flags describes the format of the dn
See also the OpenLDAP man-page ldap_str2dn(3)
N)�ldapZ functionsZ_ldap_function_call�_ldap�str2dn)�dn�flagsr r r r % s r c C s d� dd� | D ��S )z�
This function takes a decomposed DN as parameter and returns
a single string. It's the inverse to str2dn() but will always
return a DN in LDAPv3 format compliant to RFC 4514.
r c S s g | ]}d � dd� |D ���qS )r c S s( g | ] \}}}d � |t|pd�f��qS �r
r �r r ��.0ZatypeZavalueZdummyr r r �
<listcomp>: s �z%dn2str.<locals>.<listcomp>.<listcomp>�r )r �rdnr r r r 9 s �
�zdn2str.<locals>.<listcomp>r )r r r r �dn2str3 s
�r"