Fix cut and paste errors for sepolicy network command
This commit is contained in:
parent
fefce8f581
commit
e5aaa46215
@ -2196,7 +2196,7 @@ index b6abdf5..c05c943 100644
|
|||||||
Generate an additional HTML man pages for the specified domain(s).
|
Generate an additional HTML man pages for the specified domain(s).
|
||||||
|
|
||||||
diff --git a/policycoreutils/sepolicy/sepolicy.py b/policycoreutils/sepolicy/sepolicy.py
|
diff --git a/policycoreutils/sepolicy/sepolicy.py b/policycoreutils/sepolicy/sepolicy.py
|
||||||
index b25d3b2..0ca3fc3 100755
|
index b25d3b2..2bbea35 100755
|
||||||
--- a/policycoreutils/sepolicy/sepolicy.py
|
--- a/policycoreutils/sepolicy/sepolicy.py
|
||||||
+++ b/policycoreutils/sepolicy/sepolicy.py
|
+++ b/policycoreutils/sepolicy/sepolicy.py
|
||||||
@@ -22,6 +22,8 @@
|
@@ -22,6 +22,8 @@
|
||||||
@ -2239,11 +2239,11 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
class CheckPortType(argparse.Action):
|
class CheckPortType(argparse.Action):
|
||||||
def __call__(self, parser, namespace, values, option_string=None):
|
def __call__(self, parser, namespace, values, option_string=None):
|
||||||
- from sepolicy.network import port_types
|
- from sepolicy.network import port_types
|
||||||
+ domains = sepolicy.get_all_port_types()
|
+ port_types = sepolicy.get_all_port_types()
|
||||||
newval = getattr(namespace, self.dest)
|
newval = getattr(namespace, self.dest)
|
||||||
if not newval:
|
if not newval:
|
||||||
newval = []
|
newval = []
|
||||||
@@ -140,19 +141,17 @@ class CheckPolicyType(argparse.Action):
|
@@ -140,19 +141,18 @@ class CheckPolicyType(argparse.Action):
|
||||||
|
|
||||||
class CheckUser(argparse.Action):
|
class CheckUser(argparse.Action):
|
||||||
def __call__(self, parser, namespace, value, option_string=None):
|
def __call__(self, parser, namespace, value, option_string=None):
|
||||||
@ -2261,11 +2261,12 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
def _print_net(src, protocol, perm):
|
def _print_net(src, protocol, perm):
|
||||||
- from sepolicy.network import get_network_connect
|
- from sepolicy.network import get_network_connect
|
||||||
- portdict = get_network_connect(src, protocol, perm)
|
- portdict = get_network_connect(src, protocol, perm)
|
||||||
+ portdict = sepolicy.get_network_connect(src, protocol, perm)
|
+ import sepolicy.network
|
||||||
|
+ portdict = sepolicy.network.get_network_connect(src, protocol, perm)
|
||||||
if len(portdict) > 0:
|
if len(portdict) > 0:
|
||||||
print "%s: %s %s" % (src, protocol, perm)
|
print "%s: %s %s" % (src, protocol, perm)
|
||||||
for p in portdict:
|
for p in portdict:
|
||||||
@@ -160,7 +159,7 @@ def _print_net(src, protocol, perm):
|
@@ -160,7 +160,7 @@ def _print_net(src, protocol, perm):
|
||||||
print "\t" + recs
|
print "\t" + recs
|
||||||
|
|
||||||
def network(args):
|
def network(args):
|
||||||
@ -2274,7 +2275,7 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
if args.list_ports:
|
if args.list_ports:
|
||||||
all_ports = []
|
all_ports = []
|
||||||
for i in portrecs:
|
for i in portrecs:
|
||||||
@@ -201,41 +200,41 @@ def manpage(args):
|
@@ -201,41 +201,41 @@ def manpage(args):
|
||||||
from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains
|
from sepolicy.manpage import ManPage, HTMLManPages, manpage_domains, manpage_roles, gen_domains
|
||||||
|
|
||||||
path = args.path
|
path = args.path
|
||||||
@ -2339,7 +2340,7 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
|
|
||||||
def gen_network_args(parser):
|
def gen_network_args(parser):
|
||||||
net = parser.add_parser("network",
|
net = parser.add_parser("network",
|
||||||
@@ -283,7 +282,6 @@ def gen_communicate_args(parser):
|
@@ -283,7 +283,6 @@ def gen_communicate_args(parser):
|
||||||
comm.set_defaults(func=communicate)
|
comm.set_defaults(func=communicate)
|
||||||
|
|
||||||
def booleans(args):
|
def booleans(args):
|
||||||
@ -2347,7 +2348,7 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
from sepolicy import boolean_desc
|
from sepolicy import boolean_desc
|
||||||
if args.all:
|
if args.all:
|
||||||
rc, args.booleans = selinux.security_get_boolean_names()
|
rc, args.booleans = selinux.security_get_boolean_names()
|
||||||
@@ -320,7 +318,7 @@ def gen_transition_args(parser):
|
@@ -320,7 +319,7 @@ def gen_transition_args(parser):
|
||||||
trans.set_defaults(func=transition)
|
trans.set_defaults(func=transition)
|
||||||
|
|
||||||
def interface(args):
|
def interface(args):
|
||||||
@ -2356,7 +2357,7 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
if args.list_admin:
|
if args.list_admin:
|
||||||
for a in get_admin():
|
for a in get_admin():
|
||||||
print a
|
print a
|
||||||
@@ -328,7 +326,7 @@ def interface(args):
|
@@ -328,7 +327,7 @@ def interface(args):
|
||||||
for a in get_user():
|
for a in get_user():
|
||||||
print a
|
print a
|
||||||
if args.list:
|
if args.list:
|
||||||
@ -2365,7 +2366,7 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
print m
|
print m
|
||||||
|
|
||||||
def generate(args):
|
def generate(args):
|
||||||
@@ -368,10 +366,10 @@ def gen_interface_args(parser):
|
@@ -368,10 +367,10 @@ def gen_interface_args(parser):
|
||||||
help=_('List SELinux Policy interfaces'))
|
help=_('List SELinux Policy interfaces'))
|
||||||
group = itf.add_mutually_exclusive_group(required=True)
|
group = itf.add_mutually_exclusive_group(required=True)
|
||||||
group.add_argument("-a", "--list_admin", dest="list_admin",action="store_true", default=False,
|
group.add_argument("-a", "--list_admin", dest="list_admin",action="store_true", default=False,
|
||||||
@ -2378,7 +2379,7 @@ index b25d3b2..0ca3fc3 100755
|
|||||||
group.add_argument("-l", "--list", dest="list",action="store_true",
|
group.add_argument("-l", "--list", dest="list",action="store_true",
|
||||||
default=False,
|
default=False,
|
||||||
help="List all interfaces")
|
help="List all interfaces")
|
||||||
@@ -461,7 +459,10 @@ if __name__ == '__main__':
|
@@ -461,7 +460,10 @@ if __name__ == '__main__':
|
||||||
gen_transition_args(subparsers)
|
gen_transition_args(subparsers)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Summary: SELinux policy core utilities
|
Summary: SELinux policy core utilities
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 2.1.14
|
Version: 2.1.14
|
||||||
Release: 16%{?dist}
|
Release: 17%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
# Based on git repository with tag 20101221
|
# Based on git repository with tag 20101221
|
||||||
@ -310,6 +310,9 @@ The policycoreutils-restorecond package contains the restorecond service.
|
|||||||
%{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
|
%{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Mar 4 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-17
|
||||||
|
- Fix cut and paste errors for sepolicy network command
|
||||||
|
|
||||||
* Fri Mar 1 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-16
|
* Fri Mar 1 2013 Dan Walsh <dwalsh@redhat.com> - 2.1.14-16
|
||||||
- Fix sepoicy interface to work properly
|
- Fix sepoicy interface to work properly
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user