sepolicy transition was blowing up. Also cleanup output when only source is specified.
- sepolicy generate should allow policy modules names that include - or _
This commit is contained in:
parent
2a0d3b9155
commit
558e4d0e2d
@ -333230,10 +333230,10 @@ index 0000000..a40f37d
|
||||
+selinux(8), sepolicy-generate(8), sepolicy-communicate(8), sepolicy-generate(8), sepolicy-network(8), sepolicy-transition(8)
|
||||
diff --git a/policycoreutils/sepolicy/sepolicy.py b/policycoreutils/sepolicy/sepolicy.py
|
||||
new file mode 100755
|
||||
index 0000000..57018a6
|
||||
index 0000000..2f562b0
|
||||
--- /dev/null
|
||||
+++ b/policycoreutils/sepolicy/sepolicy.py
|
||||
@@ -0,0 +1,334 @@
|
||||
@@ -0,0 +1,338 @@
|
||||
+#! /usr/bin/python -Es
|
||||
+# Copyright (C) 2012 Red Hat
|
||||
+# AUTHOR: Dan Walsh <dwalsh@redhat.com>
|
||||
@ -333493,13 +333493,17 @@ index 0000000..57018a6
|
||||
+
|
||||
+def transition(args):
|
||||
+ from sepolicy.transition import setrans
|
||||
+ source = args.source[0]
|
||||
+ source = args.source
|
||||
+ if args.target:
|
||||
+ target = args.target[0]
|
||||
+ for l in setrans(source, args.target):
|
||||
+ print " --> ".join(l)
|
||||
+ else:
|
||||
+ target = None
|
||||
+ for l in setrans(source, target):
|
||||
+ print " --> ".join(l)
|
||||
+ for l in setrans(source):
|
||||
+ msg = l[0]
|
||||
+ for i in range(1, len(l)-1, 2):
|
||||
+ msg = "%s @ %s --> %s" % (msg, l[i], l[i+1])
|
||||
+ print msg
|
||||
+
|
||||
+
|
||||
+def gen_transition_args(parser):
|
||||
+ trans = parser.add_parser("transition",
|
||||
@ -333833,7 +333837,7 @@ index 0000000..a179d95
|
||||
+
|
||||
diff --git a/policycoreutils/sepolicy/sepolicy/generate.py b/policycoreutils/sepolicy/sepolicy/generate.py
|
||||
new file mode 100644
|
||||
index 0000000..209568c
|
||||
index 0000000..7fd6dd6
|
||||
--- /dev/null
|
||||
+++ b/policycoreutils/sepolicy/sepolicy/generate.py
|
||||
@@ -0,0 +1,1302 @@
|
||||
@ -334183,7 +334187,7 @@ index 0000000..209568c
|
||||
+( self.generate_root_user_types, self.generate_root_user_rules))
|
||||
+ if name == "":
|
||||
+ raise ValueError(_("You must enter a name for your confined process/user"))
|
||||
+ if not name.isalnum():
|
||||
+ if not re.match(r"^[a-zA-Z0-9-_]+$", name):
|
||||
+ raise ValueError(_("Name must be alpha numberic with no spaces. Consider using option \"-n MODULENAME\""))
|
||||
+
|
||||
+ if type == CGI:
|
||||
|
@ -7,7 +7,7 @@
|
||||
Summary: SELinux policy core utilities
|
||||
Name: policycoreutils
|
||||
Version: 2.1.13
|
||||
Release: 45%{?dist}
|
||||
Release: 46%{?dist}
|
||||
License: GPLv2
|
||||
Group: System Environment/Base
|
||||
# Based on git repository with tag 20101221
|
||||
@ -338,6 +338,10 @@ The policycoreutils-restorecond package contains the restorecond service.
|
||||
%{_bindir}/systemctl try-restart restorecond.service >/dev/null 2>&1 || :
|
||||
|
||||
%changelog
|
||||
* Mon Dec 17 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.12-46
|
||||
- sepolicy transition was blowing up. Also cleanup output when only source is specified.
|
||||
- sepolicy generate should allow policy modules names that include - or _
|
||||
|
||||
* Mon Dec 10 2012 Dan Walsh <dwalsh@redhat.com> - 2.1.12-45
|
||||
- Apply patch from Miroslav to display proper range description in man pages g
|
||||
- Should print warning on missing default label when run in recusive mode iff
|
||||
|
Loading…
Reference in New Issue
Block a user