| Server IP : 77.50.203.18 / Your IP : 192.168.0.10 Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23 System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64 User : warsnews.ru ( 1001) PHP Version : 8.4.23 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/lib/python3.9/site-packages/cockpit/__pycache__/ |
Upload File : |
a
7(=j�T � @ sT d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlmZ d dl
mZmZmZmZ d dlmZ d dlmZ d dlmZ d dlmZ d dlmZmZ d d lmZ d d
lm Z d dl!m"Z"m#Z# d dl$m%Z% d d
l&m'Z'm(Z(m)Z) d dl*m+Z+ d dl,m-Z-m.Z. d dl/m0Z0m1Z1 d dl2m3Z3 e�4d�Z5ed�dd�Z6G dd� de(�Z7dddd�ej8�Z8G dd� de1�Z9G dd� dej:�Z;e<e=ee< ee< f d �d!d"�Z>ee< e<ee<e=ee< ee< f d#�d$d%�Z?ee< ee< e=ee< ee< f d&�d'd(�Z@G d)d*� d*e+�ZAG d+d,� d,e0�ZBdd�d-d.�ZCdd�d/d0�ZDeEd1k�rPeD� dS )2� N)�Path)�Dict�Literal�Optional�Sequence)� polyfills)�ferny)�
bootloader)�BridgeBeibootHelper)�parse_os_release�
setup_logging)�ChannelRoutingRule)�PackagesChannel)�
JsonObject�get_str)�supported_oses)�Packages�PackagesLoader�patch_libexecdir)�Peer)�CockpitProblem�CockpitProtocolError)�Router�RoutingRule)�StdioTransportzcockpit.beiboot��returnc C s� t j�tj�d } | �� }tj�d�}|du r:tj �
d�}tj|dd� t|d�}t
�d|� z:|�� |krzt
�d � t�|�� jd
@ s�t
�d� t�W n4 ttfy� t
�d� |�|� |�d
� Y n0 |S )z�Create askpass executable
We need this for the flatpak: ssh and thus the askpass program run on the host (via flatpak-spawn),
not the flatpak. Thus we cannot use the shipped cockpit-askpass program.
zinteraction_client.pyZXDG_CACHE_HOMENz~/.cacheT)�exist_okzcockpit-client-askpasszChecking if %s exists...z. ... it exists but is not the same version...�@ z; ... it has the correct contents, but is not executable...z ... writing contents.i� )� importlibZ resources�filesr �__name__�
read_bytes�os�environ�get�path�
expanduser�makedirsr �logger�debug�
ValueError�stat�st_mode�FileNotFoundError�write_bytes�chmod)Zsrc_pathZsrc_dataZxdg_cache_homeZ dest_path� r1 �3/usr/lib/python3.9/site-packages/cockpit/beiboot.py�ensure_ferny_askpass% s(
r3 c @ sD e Zd ZU eeef ed<