Uname : Linux serv1.rebootns.com 5.14.0-570.62.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Nov 11 10:10:59 EST 2025 x86_64
Soft : LiteSpeed
Ip : 139.99.125.122
Port : 443
~
/
usr
/
lib64
/
python3.9
/
site-packages
/
setools
/
checker
/
__pycache__
[ HOME ]
Exec
Submit
File Name : roexec.cpython-39.pyc
a q�qe � @ s| d dl Z d dlmZ d dlmZmZmZ ddlmZm Z ddl mZ ddlm Z dd lmZ d ZdZdZG d d� de �ZdS )� N)�defaultdict)�Dict�List�Set� )� AnyTERule�Type)�TERuleQuery� )� CheckerModule)�ConfigSetDescriptor�exempt_write_domain�exempt_exec_domain�exempt_filec s� e Zd ZdZdZeeeef�Z e dddd�Ze dddd�Ze dddd�Z dd�� fd d �Zeeee f d�dd�Zed�d d�Z� ZS )�ReadOnlyExecutablesz@Checker module for asserting all executable files are read-only.Zro_execsZlookup_type_or_attrFT)�strict�expandN)�returnc sD t � �|||� t�t�| _|�t�| _|�t �| _ |�t�| _d S )N) �super�__init__�loggingZ getLogger�__name__�log�get�EXEMPT_WRITEr �EXEMPT_FILEr �EXEMPT_EXECr )�self�policyZ checknameZconfig�� __class__� �</usr/lib64/python3.9/site-packages/setools/checker/roexec.pyr ! s zReadOnlyExecutables.__init__c C s� | j �d� | j �d�| j�� t| jdddd�}tt�}|�� D ]t}t|j � � �| j }t|j� � �| j }|rv|s�| j �d�|�� qB|D ]&}| j �d�||�� || � |� q�qB|S ) Nz)Collecting list of executable file types.zIgnore exec domains: {!r}�Zallow��file)ZexecuteZexecute_no_trans�ZruletypeZtclassZpermszIgnoring execute rule: {}z"Determined {} is executable by: {})r �debug�formatr r r r �set�results�sourcer �targetr �add)r �queryZ collected�ruleZsources�targets�tr! r! r"