Update to upstream

* Ignore selevel/serange if MLS is disabled from Sven Vermeulen.
This commit is contained in:
Dan Walsh 2014-01-06 10:24:11 -05:00
parent 2200ddeea6
commit b9afd68089
3 changed files with 21 additions and 26 deletions

View File

@ -656205,7 +656205,7 @@ index 0000000..e2befdb
+ packages=["policycoreutils"],
+)
diff --git a/policycoreutils/semanage/semanage b/policycoreutils/semanage/semanage
index 36b41cd..c46c9e5 100644
index 36b41cd..209c308 100644
--- a/policycoreutils/semanage/semanage
+++ b/policycoreutils/semanage/semanage
@@ -18,24 +18,34 @@
@ -656327,15 +656327,6 @@ index 36b41cd..c46c9e5 100644
def parser_add_store(parser, name):
parser.add_argument('-S', '--store', action=SetStore, help=_("Select an alternate SELinux Policy Store to manage"))
@@ -229,7 +239,7 @@ def parser_add_type(parser, name):
def parser_add_level(parser, name):
parser.add_argument('-L', '--level', default='s0', help=_('Default SELinux Level for SELinux user, s0 Default. (MLS/MCS Systems only)'))
def parser_add_range(parser, name):
- parser.add_argument('-r', '--range', default="s0",
+ parser.add_argument('-r', '--range', default=None,
help=_('''
MLS/MCS Security Range (MLS/MCS Systems only)
SELinux Range for SELinux login mapping
@@ -289,7 +299,7 @@ def handleFcontext(args):
fcontext_equal_args = {'equal':[('list','locallist','type','ftype','seuser','deleteall','extract'),()]}
@ -656521,7 +656512,7 @@ index cba2c9c..fd27cf2 100644
Output local customizations
diff --git a/policycoreutils/semanage/seobject.py b/policycoreutils/semanage/seobject.py
deleted file mode 100644
index 00b085e..0000000
index f8d2243..0000000
--- a/policycoreutils/semanage/seobject.py
+++ /dev/null
@@ -1,2217 +0,0 @@
@ -657038,7 +657029,7 @@ index 00b085e..0000000
- if rc < 0:
- raise ValueError(_("Could not set name for %s") % name)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- rc = semanage_seuser_set_mlsrange(self.sh, u, serange)
- if rc < 0:
- raise ValueError(_("Could not set MLS range for %s") % name)
@ -657098,7 +657089,7 @@ index 00b085e..0000000
-
- self.oldserange = semanage_seuser_get_mlsrange(u)
- self.oldsename = semanage_seuser_get_sename(u)
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- semanage_seuser_set_mlsrange(self.sh, u, untranslate(serange))
-
- if sename != "":
@ -657365,9 +657356,9 @@ index 00b085e..0000000
- if rc >= 0:
- oldserole = string.join(rlist, ' ');
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- semanage_user_set_mlsrange(self.sh, u, untranslate(serange))
- if selevel != "":
- if (is_mls_enabled == 1) and (selevel != ""):
- semanage_user_set_mlslevel(self.sh, u, untranslate(selevel))
-
- if prefix != "":
@ -657585,7 +657576,7 @@ index 00b085e..0000000
- if rc < 0:
- raise ValueError(_("Could not set type in port context for %s/%s") % (proto, port))
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- rc = semanage_context_set_mls(self.sh, con, serange)
- if rc < 0:
- raise ValueError(_("Could not set mls fields in port context for %s/%s") % (proto, port))
@ -657631,7 +657622,7 @@ index 00b085e..0000000
-
- con = semanage_port_get_con(p)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- semanage_context_set_mls(self.sh, con, untranslate(serange))
- if setype != "":
- semanage_context_set_type(self.sh, con, setype)
@ -657859,7 +657850,7 @@ index 00b085e..0000000
- if rc < 0:
- raise ValueError(_("Could not set type in addr context for %s") % addr)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- rc = semanage_context_set_mls(self.sh, con, serange)
- if rc < 0:
- raise ValueError(_("Could not set mls fields in addr context for %s") % addr)
@ -657905,7 +657896,7 @@ index 00b085e..0000000
- raise ValueError(_("Could not query addr %s") % addr)
-
- con = semanage_node_get_con(node)
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- semanage_context_set_mls(self.sh, con, untranslate(serange))
- if setype != "":
- semanage_context_set_type(self.sh, con, setype)
@ -658055,7 +658046,7 @@ index 00b085e..0000000
- if rc < 0:
- raise ValueError(_("Could not set type in interface context for %s") % interface)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- rc = semanage_context_set_mls(self.sh, con, serange)
- if rc < 0:
- raise ValueError(_("Could not set mls fields in interface context for %s") % interface)
@ -658101,7 +658092,7 @@ index 00b085e..0000000
-
- con = semanage_iface_get_ifcon(iface)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- semanage_context_set_mls(self.sh, con, untranslate(serange))
- if setype != "":
- semanage_context_set_type(self.sh, con, setype)
@ -658355,7 +658346,7 @@ index 00b085e..0000000
- if rc < 0:
- raise ValueError(_("Could not set type in file context for %s") % target)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- rc = semanage_context_set_mls(self.sh, con, serange)
- if rc < 0:
- raise ValueError(_("Could not set mls fields in file context for %s") % target)
@ -658411,7 +658402,7 @@ index 00b085e..0000000
- if con == None:
- con = self.createcon(target)
-
- if serange != "":
- if (is_mls_enabled == 1) and (serange != ""):
- semanage_context_set_mls(self.sh, con, untranslate(serange))
- if seuser != "":
- semanage_context_set_user(self.sh, con, seuser)

View File

@ -6,8 +6,8 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.2.4
Release: 8%{?dist}
Version: 2.2.5
Release: 1%{?dist}
License: GPLv2
Group: System Environment/Base
# Based on git repository with tag 20101221
@ -383,6 +383,10 @@ The policycoreutils-restorecond package contains the restorecond service.
%systemd_postun_with_restart restorecond.service
%changelog
* Mon Jan 6 2014 Dan Walsh <dwalsh@redhat.com> - 2.2.5-1
- Update to upstream
* Ignore selevel/serange if MLS is disabled from Sven Vermeulen.
* Fri Jan 3 2014 Dan Walsh <dwalsh@redhat.com> - 2.2.4-8
- Update Tranlations
- Patch from Yuri Chornoivan to fix typos

View File

@ -1,3 +1,3 @@
59d33101d57378ce69889cc078addf90 policycoreutils_man_ru2.tar.bz2
e9134b52e6620c14cbce9234a6b67b20 sepolgen-1.2.1.tgz
afa39d869ec981f199fd8db0725a4715 policycoreutils-2.2.4.tgz
15340f6e3bdc703e2f960cd2dbff9019 policycoreutils-2.2.5.tgz