Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialized _pol #423

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions python/sepolicy/sepolicy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,10 @@ def get_init_entrypoint(transtype):
return entrypoints

def get_init_entrypoints_str():
global _pol
if not _pol:
init_policy()

q = TERuleQuery(_pol,
ruletype=["type_transition"],
source="init_t",
Expand Down Expand Up @@ -849,6 +853,10 @@ def get_user_types():


def get_all_role_allows():
global _pol
if not _pol:
init_policy()

global role_allows
if role_allows:
return role_allows
Expand Down Expand Up @@ -1138,6 +1146,10 @@ def get_all_allow_rules():
return all_allow_rules

def get_all_bool_rules():
global _pol
if not _pol:
init_policy()

global all_bool_rules
if not all_bool_rules:
q = TERuleQuery(_pol, boolean=".*", boolean_regex=True,
Expand Down