* Update buildroot-patches for 2020.11-rc1 buildroot * Update buildroot to 2020.11-rc1 Signed-off-by: Stefan Agner <stefan@agner.ch> * Don't rely on sfdisk --list-free output The --list-free (-F) argument does not allow machine readable mode. And it seems that the output format changes over time (different spacing, using size postfixes instead of raw blocks). Use sfdisk json output and calculate free partition space ourselfs. This works for 2.35 and 2.36 and is more robust since we rely on output which is meant for scripts to parse. * Migrate defconfigs for Buildroot 2020.11-rc1 In particular, rename BR2_TARGET_UBOOT_BOOT_SCRIPT(_SOURCE) to BR2_PACKAGE_HOST_UBOOT_TOOLS_BOOT_SCRIPT(_SOURCE). * Rebase/remove systemd patches for systemd 246 * Drop apparmor/libapparmor from buildroot-external * hassos-persists: use /run as directory for lockfiles The U-Boot tools use /var/lock by default which is not created any more by systemd by default (it is under tmpfiles legacy.conf, which we no longer install). * Disable systemd-update-done.service The service is not suited for pure read-only systems. In particular the service needs to be able to write a file in /etc and /var. Remove the service. Note: This is a static service and cannot be removed using systemd-preset. * Disable apparmor.service for now The service loads all default profiles. Some might actually cause problems. E.g. the profile for ping seems not to match our setup for /etc/resolv.conf: [85503.634653] audit: type=1400 audit(1605286002.684:236): apparmor="DENIED" operation="open" profile="ping" name="/run/resolv.conf" pid=27585 comm="ping" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
145 lines
4.8 KiB
Diff
145 lines
4.8 KiB
Diff
From ae84e5ef59bb24d5b8fd17e6756952f42c2d5c36 Mon Sep 17 00:00:00 2001
|
|
From: rpm-build <rpm-build>
|
|
Date: Thu, 23 Feb 2017 08:17:07 +0100
|
|
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
|
|
|
|
Signed-off-by: Antoine Tenart <antoine.tenart@bootlin.com>
|
|
[Refreshed for 4.3.0]
|
|
Signed-off-by: Adam Duskett <aduskett@gmail.com>
|
|
---
|
|
sedta | 3 ++-
|
|
seinfoflow | 5 +++--
|
|
setools/__init__.py | 4 ++--
|
|
setoolsgui/apol/dta.py | 2 +-
|
|
setoolsgui/apol/infoflow.py | 2 +-
|
|
tests/dta.py | 2 +-
|
|
tests/infoflow.py | 2 +-
|
|
7 files changed, 11 insertions(+), 9 deletions(-)
|
|
|
|
diff --git a/sedta b/sedta
|
|
index 60861ca630a5..0056172a55e5 100755
|
|
--- a/sedta
|
|
+++ b/sedta
|
|
@@ -23,6 +23,7 @@ import logging
|
|
import signal
|
|
|
|
import setools
|
|
+import setools.dta
|
|
|
|
|
|
def print_transition(trans):
|
|
@@ -114,7 +115,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 f10c39de4d8e..fe733bbd0787 100755
|
|
--- a/seinfoflow
|
|
+++ b/seinfoflow
|
|
@@ -18,6 +18,7 @@
|
|
#
|
|
|
|
import setools
|
|
+import setools.infoflow
|
|
import argparse
|
|
import sys
|
|
import logging
|
|
@@ -101,8 +102,8 @@ 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,
|
|
- booleans=booleans)
|
|
+ g = setools.infoflow.InfoFlowAnalysis(p, m, min_weight=args.min_weight, exclude=args.exclude,
|
|
+ booleans=booleans)
|
|
|
|
if args.shortest_path or args.all_paths:
|
|
if args.shortest_path:
|
|
diff --git a/setools/__init__.py b/setools/__init__.py
|
|
index 26fa5aa34a19..9e9058a6bf90 100644
|
|
--- a/setools/__init__.py
|
|
+++ b/setools/__init__.py
|
|
@@ -75,11 +75,11 @@ from .pcideviceconquery import PcideviceconQuery
|
|
from .devicetreeconquery import DevicetreeconQuery
|
|
|
|
# Information Flow Analysis
|
|
-from .infoflow import InfoFlowAnalysis
|
|
+# from .infoflow import InfoFlowAnalysis
|
|
from .permmap import PermissionMap
|
|
|
|
# Domain Transition Analysis
|
|
-from .dta import DomainTransitionAnalysis
|
|
+# from .dta import DomainTransitionAnalysis
|
|
|
|
# Policy difference
|
|
from .diff import PolicyDifference
|
|
diff --git a/setoolsgui/apol/dta.py b/setoolsgui/apol/dta.py
|
|
index 4608b9dbf34e..2cde44c142e9 100644
|
|
--- a/setoolsgui/apol/dta.py
|
|
+++ b/setoolsgui/apol/dta.py
|
|
@@ -23,7 +23,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 AnalysisTab
|
|
diff --git a/setoolsgui/apol/infoflow.py b/setoolsgui/apol/infoflow.py
|
|
index 7bca299d23fc..7fee2778f35f 100644
|
|
--- a/setoolsgui/apol/infoflow.py
|
|
+++ b/setoolsgui/apol/infoflow.py
|
|
@@ -26,7 +26,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
|
|
diff --git a/tests/dta.py b/tests/dta.py
|
|
index a0cc9381469c..177e6fb0b961 100644
|
|
--- a/tests/dta.py
|
|
+++ b/tests/dta.py
|
|
@@ -18,7 +18,7 @@
|
|
import os
|
|
import unittest
|
|
|
|
-from setools import DomainTransitionAnalysis
|
|
+from setools.dta import DomainTransitionAnalysis
|
|
from setools import TERuletype as TERT
|
|
from setools.exception import InvalidType
|
|
from setools.policyrep import Type
|
|
diff --git a/tests/infoflow.py b/tests/infoflow.py
|
|
index aa0e44a7e4f8..fca2848aeca5 100644
|
|
--- a/tests/infoflow.py
|
|
+++ b/tests/infoflow.py
|
|
@@ -18,7 +18,7 @@
|
|
import os
|
|
import unittest
|
|
|
|
-from setools import InfoFlowAnalysis
|
|
+from setools.infoflow import InfoFlowAnalysis
|
|
from setools import TERuletype as TERT
|
|
from setools.exception import InvalidType
|
|
from setools.permmap import PermissionMap
|
|
--
|
|
2.26.2
|
|
|