????
| Current Path : /proc/1724857/root/usr/lib/python3.9/site-packages/ipalib/__pycache__/ |
| Current File : //proc/1724857/root/usr/lib/python3.9/site-packages/ipalib/__pycache__/rpc.cpython-39.opt-1.pyc |
a
�8jK� � @ sZ d Z ddlmZ ddlmZ ddlZddlZddlZddlZddl Z ddl
Z
ddlZddlZddl
Z
ddlZddlmZ ddlmZ ddlZddlmZ ddlZddlmZ dd lmZ dd
lmZmZmZm Z m!Z! ddl"m#Z#m$Z$ ddl%m&Z&m'Z' dd
l(m)Z*m+Z+ ddl,m-Z- ddl,m.Z. ddl/m0Z0 ddl1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@ ddlAmBZB ddlCmDZD ddlEmFZF ddl"mGZG ddlHmIZImJZJ z4ddlKmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZU W nD eV�y0 ddlWmLZLmMZMmNZNmOZOmPZPmQZQmRZRmSZSmTZTmUZU Y n0 ejX�rHddlYmZZZ nddl[m\ZZ ejX�r`e]Z^e�_e`�ZadZbdZcdd � Zdd!d"� Zed#d$� Zfd%d&� ZgdEd(d)�ZhdFd+d,�ZidGd-d.�ZjdHd/d0�ZkG d1d2� d2�ZlG d3d4� d4eR�ZmG d5d6� d6em�ZnG d7d8� d8en�ZoG d9d:� d:eo�ZpG d;d<� d<ep�ZqG d=d>� d>e�ZrG d?d@� d@er�ZsG dAdB� dB�ZtG dCdD� dDer�ZudS )Ia`
RPC client and shared RPC client/server functionality.
This module adds some additional functionality on top of the ``xmlrpc.client``
module in the Python standard library (``xmlrpclib`` in Python 2).
For documentation on the ``xmlrpclib`` module, see:
http://docs.python.org/2/library/xmlrpclib.html
Also see the `ipaserver.rpcserver` module.
� )�absolute_import)�DecimalN)�SSLError)�x509)�DNSException)�Connectible)�LDAP_GENERALIZED_TIME_FORMAT)�errors_by_code�UnknownError�NetworkError�XMLRPCMarshallError� JSONError)�errors�capabilities)�context�
Connection)�Encoding�IPACertificate)�ipautil)�session_storage)�Cookie)�DNSName� query_srv)�_)�create_https_connection)�KRB5KDC_ERR_S_PRINCIPAL_UNKNOWN�KRB5KRB_AP_ERR_TKT_EXPIRED�
KRB5_FCC_PERM�KRB5_FCC_NOFILE�KRB5_CC_FORMAT�KRB5_REALM_CANT_RESOLVE�KRB5_CC_NOTFOUND�
get_principal)�DN)� Principal)�VERSION_WITHOUT_CAPABILITIES)�api)�json_encode_binary�json_decode_binary)
�Binary�Fault�DateTime�dumps�loads�ServerProxy� Transport�
ProtocolError�MININT�MAXINT)�RemoteDisconnected)�
BadStatusLineZipa_sessionzX-IPA-Session-Cookiec
C sH zt �| t|� W n0 tyB } ztt|���W Y d}~n
d}~0 0 dS )z�
Given a principal create or update the session data for that
principal in the persistent secure storage.
Raises ValueError if unable to perform the action for any reason.
N)r Z
store_data�CCACHE_COOKIE_KEY� Exception�
ValueError�str)� principal�data�e� r<