✏️ 编辑:policygen.cpython-39.pyc
路径:
/usr/lib/python3.9/site-packages/sepolgen/__pycache__/policygen.cpython-39.pyc
大小:12.6 KB · 修改:2026-04-05 11:05:56 · 权限:0644 · 只读(保存会失败)
← 返回目录
👁 查看
⬇ 下载
检测到二进制内容,直接保存可能损坏文件。请改用「上传替换」。
a B�i�; � @ s� d Z ddlZddlZddlmZ zddlT W n Y n0 ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ dd lmZ dZ dZdZG dd � d �Zdefdd�Zdd� ZG dd� d�Zdd� ZdS )z> classes and algorithms for the generation of SELinux policy. � N)�*� )� refpolicy)�objectmodel)�access)� interfaces)�matching)�util� c @ s� e Zd ZdZddd�Zd dd�Zd!dd �Zefd d�Zdd � Z dd� Z dd� Zd"dd�Zdd� Z dd� Zdd� Zdd� Zdd� ZdS )#�PolicyGeneratora� Generate a reference policy module from access vectors. PolicyGenerator generates a new reference policy module or updates an existing module based on requested access in the form of access vectors. It generates allow rules and optionally module require statements, reference policy interfaces, and extended permission access vector rules. By default only allow rules are generated. The methods .set_gen_refpol, .set_gen_requires and .set_gen_xperms turns on interface generation, requires generation, and xperms rules generation respectively. PolicyGenerator can also optionally add comments explaining why a particular access was allowed based on the audit messages that generated the access. The access vectors passed in must have the .audit_msgs field set correctly and .explain set to SHORT|LONG_EXPLANATION to enable this feature. The module created by PolicyGenerator can be passed to output.ModuleWriter to output a text representation. Nc C s>