Add new man pages for each semanage subsection
This commit is contained in:
parent
69da86fcf8
commit
4f89c533b5
@ -251474,7 +251474,7 @@ index b25d3b2..9b29b39 100755
|
|||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
diff --git a/policycoreutils/sepolicy/sepolicy/__init__.py b/policycoreutils/sepolicy/sepolicy/__init__.py
|
diff --git a/policycoreutils/sepolicy/sepolicy/__init__.py b/policycoreutils/sepolicy/sepolicy/__init__.py
|
||||||
index 5e7415c..3a5391e 100644
|
index 5e7415c..b367e9c 100644
|
||||||
--- a/policycoreutils/sepolicy/sepolicy/__init__.py
|
--- a/policycoreutils/sepolicy/sepolicy/__init__.py
|
||||||
+++ b/policycoreutils/sepolicy/sepolicy/__init__.py
|
+++ b/policycoreutils/sepolicy/sepolicy/__init__.py
|
||||||
@@ -7,6 +7,9 @@ import _policy
|
@@ -7,6 +7,9 @@ import _policy
|
||||||
@ -251487,7 +251487,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
|
gettext.bindtextdomain(PROGNAME, "/usr/share/locale")
|
||||||
gettext.textdomain(PROGNAME)
|
gettext.textdomain(PROGNAME)
|
||||||
try:
|
try:
|
||||||
@@ -37,9 +40,116 @@ CLASS = 'class'
|
@@ -37,9 +40,119 @@ CLASS = 'class'
|
||||||
TRANSITION = 'transition'
|
TRANSITION = 'transition'
|
||||||
ROLE_ALLOW = 'role_allow'
|
ROLE_ALLOW = 'role_allow'
|
||||||
|
|
||||||
@ -251596,7 +251596,10 @@ index 5e7415c..3a5391e 100644
|
|||||||
+ fcdict = get_fcdict()
|
+ fcdict = get_fcdict()
|
||||||
+ mpaths = {}
|
+ mpaths = {}
|
||||||
+ for f in get_entrypoint_types(setype):
|
+ for f in get_entrypoint_types(setype):
|
||||||
+ mpaths[f] = fcdict[f]
|
+ try:
|
||||||
|
+ mpaths[f] = fcdict[f]
|
||||||
|
+ except:
|
||||||
|
+ mpaths[f] = []
|
||||||
+ return mpaths
|
+ return mpaths
|
||||||
+
|
+
|
||||||
+def get_installed_policy(root = "/"):
|
+def get_installed_policy(root = "/"):
|
||||||
@ -251606,7 +251609,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
policies = glob.glob ("%s.*" % path )
|
policies = glob.glob ("%s.*" % path )
|
||||||
policies.sort()
|
policies.sort()
|
||||||
return policies[-1]
|
return policies[-1]
|
||||||
@@ -47,6 +157,27 @@ def __get_installed_policy():
|
@@ -47,6 +160,27 @@ def __get_installed_policy():
|
||||||
pass
|
pass
|
||||||
raise ValueError(_("No SELinux Policy installed"))
|
raise ValueError(_("No SELinux Policy installed"))
|
||||||
|
|
||||||
@ -251634,7 +251637,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
all_types = None
|
all_types = None
|
||||||
def get_all_types():
|
def get_all_types():
|
||||||
global all_types
|
global all_types
|
||||||
@@ -54,6 +185,13 @@ def get_all_types():
|
@@ -54,6 +188,13 @@ def get_all_types():
|
||||||
all_types = map(lambda x: x['name'], info(TYPE))
|
all_types = map(lambda x: x['name'], info(TYPE))
|
||||||
return all_types
|
return all_types
|
||||||
|
|
||||||
@ -251648,7 +251651,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
role_allows = None
|
role_allows = None
|
||||||
def get_all_role_allows():
|
def get_all_role_allows():
|
||||||
global role_allows
|
global role_allows
|
||||||
@@ -71,6 +209,7 @@ def get_all_role_allows():
|
@@ -71,6 +212,7 @@ def get_all_role_allows():
|
||||||
return role_allows
|
return role_allows
|
||||||
|
|
||||||
def get_all_entrypoint_domains():
|
def get_all_entrypoint_domains():
|
||||||
@ -251656,7 +251659,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
all_domains = []
|
all_domains = []
|
||||||
types=get_all_types()
|
types=get_all_types()
|
||||||
types.sort()
|
types.sort()
|
||||||
@@ -81,11 +220,54 @@ def get_all_entrypoint_domains():
|
@@ -81,11 +223,54 @@ def get_all_entrypoint_domains():
|
||||||
all_domains.append(m[0])
|
all_domains.append(m[0])
|
||||||
return all_domains
|
return all_domains
|
||||||
|
|
||||||
@ -251712,7 +251715,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
return all_domains
|
return all_domains
|
||||||
|
|
||||||
roles = None
|
roles = None
|
||||||
@@ -139,50 +321,92 @@ def get_all_attributes():
|
@@ -139,50 +324,92 @@ def get_all_attributes():
|
||||||
return all_attributes
|
return all_attributes
|
||||||
|
|
||||||
def policy(policy_file):
|
def policy(policy_file):
|
||||||
@ -251830,7 +251833,7 @@ index 5e7415c..3a5391e 100644
|
|||||||
def gen_bool_dict(path="/usr/share/selinux/devel/policy.xml"):
|
def gen_bool_dict(path="/usr/share/selinux/devel/policy.xml"):
|
||||||
global booleans_dict
|
global booleans_dict
|
||||||
if booleans_dict:
|
if booleans_dict:
|
||||||
@@ -191,7 +415,7 @@ def gen_bool_dict(path="/usr/share/selinux/devel/policy.xml"):
|
@@ -191,7 +418,7 @@ def gen_bool_dict(path="/usr/share/selinux/devel/policy.xml"):
|
||||||
import re
|
import re
|
||||||
booleans_dict = {}
|
booleans_dict = {}
|
||||||
try:
|
try:
|
||||||
@ -252526,7 +252529,7 @@ index 25062da..086f2a7 100755
|
|||||||
.SH NETWORK
|
.SH NETWORK
|
||||||
""")
|
""")
|
||||||
diff --git a/policycoreutils/sepolicy/sepolicy/network.py b/policycoreutils/sepolicy/sepolicy/network.py
|
diff --git a/policycoreutils/sepolicy/sepolicy/network.py b/policycoreutils/sepolicy/sepolicy/network.py
|
||||||
index 66efe26..739afa9 100755
|
index 66efe26..970f4c8 100755
|
||||||
--- a/policycoreutils/sepolicy/sepolicy/network.py
|
--- a/policycoreutils/sepolicy/sepolicy/network.py
|
||||||
+++ b/policycoreutils/sepolicy/sepolicy/network.py
|
+++ b/policycoreutils/sepolicy/sepolicy/network.py
|
||||||
@@ -25,27 +25,6 @@ import sepolicy
|
@@ -25,27 +25,6 @@ import sepolicy
|
||||||
@ -252557,7 +252560,7 @@ index 66efe26..739afa9 100755
|
|||||||
def get_types(src, tclass, perm):
|
def get_types(src, tclass, perm):
|
||||||
allows=search([sepolicy.ALLOW],{sepolicy.SOURCE:src,sepolicy.CLASS:tclass, sepolicy.PERMS:perm})
|
allows=search([sepolicy.ALLOW],{sepolicy.SOURCE:src,sepolicy.CLASS:tclass, sepolicy.PERMS:perm})
|
||||||
nlist=[]
|
nlist=[]
|
||||||
@@ -57,6 +36,7 @@ def get_types(src, tclass, perm):
|
@@ -57,11 +36,12 @@ def get_types(src, tclass, perm):
|
||||||
|
|
||||||
|
|
||||||
def get_network_connect(src, protocol, perm):
|
def get_network_connect(src, protocol, perm):
|
||||||
@ -252565,6 +252568,12 @@ index 66efe26..739afa9 100755
|
|||||||
d={}
|
d={}
|
||||||
tlist = get_types(src, "%s_socket" % protocol, [perm])
|
tlist = get_types(src, "%s_socket" % protocol, [perm])
|
||||||
if len(tlist) > 0:
|
if len(tlist) > 0:
|
||||||
|
if "port_type" in tlist:
|
||||||
|
- d[(src,protocol,perm)] = ["all ports"]
|
||||||
|
+ d[(src,protocol,perm)] = [("port_type", ["all ports"])]
|
||||||
|
return d
|
||||||
|
|
||||||
|
d[(src,protocol,perm)] = []
|
||||||
@@ -77,16 +57,16 @@ def get_network_connect(src, protocol, perm):
|
@@ -77,16 +57,16 @@ def get_network_connect(src, protocol, perm):
|
||||||
if "port_t" in tlist:
|
if "port_t" in tlist:
|
||||||
continue
|
continue
|
||||||
|
@ -126,7 +126,7 @@ an SELinux environment.
|
|||||||
%{_mandir}/man8/chcat.8*
|
%{_mandir}/man8/chcat.8*
|
||||||
%{_mandir}/ru/man8/chcat.8*
|
%{_mandir}/ru/man8/chcat.8*
|
||||||
%{_mandir}/man8/sandbox.8*
|
%{_mandir}/man8/sandbox.8*
|
||||||
%{_mandir}/man8/semanage.8*
|
%{_mandir}/man8/semanage*.8*
|
||||||
%{_mandir}/ru/man8/semanage.8*
|
%{_mandir}/ru/man8/semanage.8*
|
||||||
%{_usr}/share/bash-completion/completions/semanage
|
%{_usr}/share/bash-completion/completions/semanage
|
||||||
%{_usr}/share/bash-completion/completions/setsebool
|
%{_usr}/share/bash-completion/completions/setsebool
|
||||||
|
Loading…
Reference in New Issue
Block a user