관리-도구
편집 파일: auth_protocol.cpython-311.opt-1.pyc
� IMg� � �l � d dl Z d dlZd dlZd dlZ ej e� � Z G d� de j � � ZdS )� Nc � � e Zd ZdZdZd� ZdS )�UnixSocketAuthProtocolz� This protocol uses SO_PEERCRED attribute of unix socket to get authentication data (pid, uid, gid) After connect, this values are stored in object's _pid, _uid, _gid attributes �3ic �~ � || _ | j � d� � }|� t j t j t j | j � � � � }t j | j |� � \ | _ | _ | _ t � d| j | j | j � � d S )N�socketz1New socket connection from pid=%s, uid=%s, gid=%s)� _transport�get_extra_info� getsockoptr � SOL_SOCKET�SO_PEERCRED�struct�calcsize� STRUCT_FORMAT�unpack�_pid�_uid�_gid�logger�debug)�self� transport�conn�credss �\/opt/imunify360/venv/lib/python3.11/site-packages/defence360agent/internals/auth_protocol.py�connection_madez&UnixSocketAuthProtocol.connection_made s� � �#�����-�-�h�7�7����������O�D�.�/�/� � �� +1�-����+ � + �'�� �4�9�d�i� ���?��I��I��I� � � � � � N)�__name__� __module__�__qualname__�__doc__r r � r r r r s4 � � � � � �� � �M� � � � � r r ) �asyncior �loggingr � getLoggerr r �Protocolr r! r r �<module>r&