ÿØÿà JPEG ÿþ;
| Server IP : 68.65.120.201 / Your IP : 216.73.216.126 Web Server : LiteSpeed System : Linux server179.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64 User : taxhyuvu ( 2294) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /usr/lib/python3.6/site-packages/tuned/utils/__pycache__/ |
Upload File : |
3
�<�e� � @ s, d dl Z d dlZejj� ZG dd� d�ZdS )� Nc @ s e Zd Zdd� Zdd� ZdS )�polkitc C s4 t j� | _| jjdddd�| _t j| jdd�| _d S )Nzorg.freedesktop.PolicyKit1z%/org/freedesktop/PolicyKit1/AuthorityT)Zfollow_name_owner_changesz$org.freedesktop.PolicyKit1.Authority)Zdbus_interface)�dbusZ SystemBus�_busZ
get_object�_proxyZ Interface�
_authority)�self� r �/usr/lib/python3.6/polkit.py�__init__ s
zpolkit.__init__c
C s� |dks|dkrdS i }d}d}dd|if}y| j j|||||�d }W n� tjjtfk
r� } zhtjd| � y| jj |�} W n2 tjjk
r� } ztjd | � dS d}~X nX | dkr�d
S dS W Y dd}~X nX |r�dS dS )
z�Check authorization, return codes:
1 - authorized
2 - polkit error, but authorized with fallback method
0 - unauthorized
-1 - polkit error and unauthorized by the fallback method
-2 - polkit error and unable to use the fallback method
NF� � zsystem-bus-name�namer zerror querying polkit: %sz-error using fallback authorization method: %s� ������)
r ZCheckAuthorizationr �
exceptionsZ
DBusException�
ValueError�log�errorr Z
get_unix_user)
r ZsenderZ action_idZdetails�flagsZcancellation_idZsubject�ret�eZuidr r r �check_authorization s&