Projects
openEuler:24.03:SP1:Everything
setools
_service:tar_scm:Do-not-export-use-setools.Info...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:Do-not-export-use-setools.InfoFlowAnalysis-and-setoo.patch of Package setools
From c2df1a843136f2eced9bbc13e766024d560a97ee Mon Sep 17 00:00:00 2001 From: Vit Mojzis <vmojzis@redhat.com> Date: Fri, 26 Apr 2019 15:27:25 +0200 Subject: [PATCH] Do not export/use setools.InfoFlowAnalysis and setools.DomainTransitionAnalysis dta and infoflow modules require networkx which brings lot of dependencies. These dependencies are not necessary for setools module itself as it's used in policycoreutils. Therefore it's better to use setools.infoflow.InfoFlowAnalysis and setools.dta.DomainTransitionAnalysis and let the package containing sedta and seinfoflow to require python3-networkx --- sedta | 6 +++--- seinfoflow | 4 ++-- setools/__init__.py | 4 ---- setoolsgui/apol/dta.py | 2 +- setoolsgui/apol/infoflow.py | 2 +- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/sedta b/sedta index ffd9ede..30ff7f8 100755 --- a/sedta +++ b/sedta @@ -10,9 +10,9 @@ import logging import signal import setools +import setools.dta - -def print_transition(trans: setools.DomainTransition) -> None: +def print_transition(trans: setools.dta.DomainTransition) -> None: print() if trans.transition: @@ -104,7 +104,7 @@ else: try: p = setools.SELinuxPolicy(args.policy) - g = setools.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude) + g = setools.dta.DomainTransitionAnalysis(p, reverse=args.reverse, exclude=args.exclude) if args.shortest_path or args.all_paths: if args.shortest_path: diff --git a/seinfoflow b/seinfoflow index 5f4e764..f5b231d 100755 --- a/seinfoflow +++ b/seinfoflow @@ -4,7 +4,7 @@ # SPDX-License-Identifier: GPL-2.0-only # -import setools +import setools.infoflow import argparse import sys import logging @@ -91,7 +91,7 @@ elif args.booleans is not None: try: p = setools.SELinuxPolicy(args.policy) m = setools.PermissionMap(args.map) - g = setools.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude, + g = setools.infoflow.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude, booleans=booleans) if args.shortest_path or args.all_paths: diff --git a/setools/__init__.py b/setools/__init__.py index ad9b36a..5cb5e0f 100644 --- a/setools/__init__.py +++ b/setools/__init__.py @@ -77,12 +77,8 @@ from .pcideviceconquery import PcideviceconQuery from .devicetreeconquery import DevicetreeconQuery # Information Flow Analysis -from .infoflow import InfoFlowAnalysis from .permmap import PermissionMap, RuleWeight, Mapping -# Domain Transition Analysis -from .dta import DomainTransitionAnalysis, DomainEntrypoint, DomainTransition - # Policy difference from .diff import PolicyDifference diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py index a78d960..e71c70a 100644 --- a/setoolsgui/apol/dta.py +++ b/setoolsgui/apol/dta.py @@ -11,7 +11,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread from PyQt5.QtGui import QPalette, QTextCursor from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \ QTreeWidgetItem -from setools import DomainTransitionAnalysis +from setools.dta import DomainTransitionAnalysis from ..logtosignal import LogHandlerToSignal from .analysistab import AnalysisSection, AnalysisTab diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py index fb9b409..738f1b8 100644 --- a/setoolsgui/apol/infoflow.py +++ b/setoolsgui/apol/infoflow.py @@ -13,7 +13,7 @@ from PyQt5.QtCore import pyqtSignal, Qt, QStringListModel, QThread from PyQt5.QtGui import QPalette, QTextCursor from PyQt5.QtWidgets import QCompleter, QHeaderView, QMessageBox, QProgressDialog, \ QTreeWidgetItem -from setools import InfoFlowAnalysis +from setools.infoflow import InfoFlowAnalysis from setools.exception import UnmappedClass, UnmappedPermission from ..logtosignal import LogHandlerToSignal -- 2.27.0
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2