HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //usr/lib/python3.9/site-packages/tuned/utils/__pycache__/polkit.cpython-39.pyc
a

,�g��@s,ddlZddlZej��ZGdd�d�ZdS)�Nc@seZdZdd�Zdd�ZdS)�polkitcCs4t��|_|jjdddd�|_tj|jdd�|_dS)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�6/usr/lib/python3.9/site-packages/tuned/utils/polkit.py�__init__s
zpolkit.__init__c

Cs|dus|durdSi}d}d}dd|if}z|j�|||||�d}Wn�tjjtf�y�}z�t�d|�z|j�	|�}	WnBtjjy�}z&t�d	|�WYd}~WYd}~d
Sd}~00|	dkr�WYd}~dSWYd}~dSWYd}~n
d}~00|�rdSdS)
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�namerzerror querying polkit: %sz-error using fallback authorization method: %s�������)
rZCheckAuthorizationr�
exceptionsZ
DBusException�
ValueError�log�errorrZ
get_unix_user)
rZsenderZ	action_id�details�flagsZcancellation_idZsubject�ret�e�uidrrr	�check_authorizations&	"$zpolkit.check_authorizationN)�__name__�
__module__�__qualname__r
rrrrr	rsr)rZ
tuned.logsZtunedZlogs�getrrrrrr	�<module>s