* Mon Oct 27 2008 Dan Walsh <dwalsh@redhat.com> 2.0.57-6
- Add usermode-gtk requires
This commit is contained in:
parent
1fd30f90e9
commit
3f2ca56c60
@ -292,8 +292,8 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/booleansPage.py poli
|
|||||||
+
|
+
|
||||||
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.57/gui/fcontextPage.py
|
diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py policycoreutils-2.0.57/gui/fcontextPage.py
|
||||||
--- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500
|
--- nsapolicycoreutils/gui/fcontextPage.py 1969-12-31 19:00:00.000000000 -0500
|
||||||
+++ policycoreutils-2.0.57/gui/fcontextPage.py 2008-10-10 16:04:46.000000000 -0400
|
+++ policycoreutils-2.0.57/gui/fcontextPage.py 2008-10-23 14:06:23.000000000 -0400
|
||||||
@@ -0,0 +1,217 @@
|
@@ -0,0 +1,223 @@
|
||||||
+## fcontextPage.py - show selinux mappings
|
+## fcontextPage.py - show selinux mappings
|
||||||
+## Copyright (C) 2006 Red Hat, Inc.
|
+## Copyright (C) 2006 Red Hat, Inc.
|
||||||
+
|
+
|
||||||
@ -400,10 +400,14 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
|
|||||||
+ self.fcontextTypeEntry = xml.get_widget("fcontextTypeEntry")
|
+ self.fcontextTypeEntry = xml.get_widget("fcontextTypeEntry")
|
||||||
+ self.fcontextMLSEntry = xml.get_widget("fcontextMLSEntry")
|
+ self.fcontextMLSEntry = xml.get_widget("fcontextMLSEntry")
|
||||||
+
|
+
|
||||||
+ def match(self, fcon, filter):
|
+ def match(self, fcon_dict, k, filter):
|
||||||
+ try:
|
+ try:
|
||||||
+ f=filter.lower()
|
+ f=filter.lower()
|
||||||
+ for con in fcon:
|
+ for con in k:
|
||||||
|
+ k=con.lower()
|
||||||
|
+ if k.find(f) >= 0:
|
||||||
|
+ return True
|
||||||
|
+ for con in fcon_dict[k]:
|
||||||
+ k=con.lower()
|
+ k=con.lower()
|
||||||
+ if k.find(f) >= 0:
|
+ if k.find(f) >= 0:
|
||||||
+ return True
|
+ return True
|
||||||
@ -414,16 +418,18 @@ diff --exclude-from=exclude -N -u -r nsapolicycoreutils/gui/fcontextPage.py poli
|
|||||||
+ def load(self, filter=""):
|
+ def load(self, filter=""):
|
||||||
+ self.filter=filter
|
+ self.filter=filter
|
||||||
+ self.fcontext=seobject.fcontextRecords()
|
+ self.fcontext=seobject.fcontextRecords()
|
||||||
+ fcon_list=self.fcontext.get_all(self.local)
|
|
||||||
+ self.store.clear()
|
+ self.store.clear()
|
||||||
+ for fcon in fcon_list:
|
+ fcon_dict=self.fcontext.get_all(self.local)
|
||||||
+ if not self.match(fcon, filter):
|
+ keys = fcon_dict.keys()
|
||||||
|
+ keys.sort()
|
||||||
|
+ for k in keys:
|
||||||
|
+ if not self.match(fcon_dict, k, filter):
|
||||||
+ continue
|
+ continue
|
||||||
+ iter=self.store.append()
|
+ iter=self.store.append()
|
||||||
+ self.store.set_value(iter, SPEC_COL, fcon[0])
|
+ self.store.set_value(iter, SPEC_COL, k[0])
|
||||||
+ self.store.set_value(iter, FTYPE_COL, fcon[1])
|
+ self.store.set_value(iter, FTYPE_COL, k[1])
|
||||||
+ if len(fcon) > 3:
|
+ if fcon_dict[k]:
|
||||||
+ rec="%s:%s" % (fcon[4], seobject.translate(fcon[5],False))
|
+ rec="%s:%s" % (fcon_dict[k][2], seobject.translate(fcon_dict[k][3],False))
|
||||||
+ else:
|
+ else:
|
||||||
+ rec="<<None>>"
|
+ rec="<<None>>"
|
||||||
+ self.store.set_value(iter, TYPE_COL, rec)
|
+ self.store.set_value(iter, TYPE_COL, rec)
|
||||||
|
@ -30,7 +30,7 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po
|
|||||||
rc |= cap_set_flag(new_caps, CAP_PERMITTED, 6, cap_list, CAP_SET);
|
rc |= cap_set_flag(new_caps, CAP_PERMITTED, 6, cap_list, CAP_SET);
|
||||||
diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.57/semanage/seobject.py
|
diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.57/semanage/seobject.py
|
||||||
--- nsapolicycoreutils/semanage/seobject.py 2008-09-12 11:48:15.000000000 -0400
|
--- nsapolicycoreutils/semanage/seobject.py 2008-09-12 11:48:15.000000000 -0400
|
||||||
+++ policycoreutils-2.0.57/semanage/seobject.py 2008-10-23 11:04:33.000000000 -0400
|
+++ policycoreutils-2.0.57/semanage/seobject.py 2008-10-23 14:05:27.000000000 -0400
|
||||||
@@ -1430,7 +1430,7 @@
|
@@ -1430,7 +1430,7 @@
|
||||||
if rc < 0:
|
if rc < 0:
|
||||||
raise ValueError(_("Could not create key for %s") % target)
|
raise ValueError(_("Could not create key for %s") % target)
|
||||||
@ -40,3 +40,59 @@ diff --exclude-from=exclude --exclude=sepolgen-1.0.13 --exclude=gui --exclude=po
|
|||||||
if rc < 0:
|
if rc < 0:
|
||||||
raise ValueError(_("Could not check if file context for %s is defined") % target)
|
raise ValueError(_("Could not check if file context for %s is defined") % target)
|
||||||
if exists:
|
if exists:
|
||||||
|
@@ -1485,7 +1485,11 @@
|
||||||
|
if rc < 0:
|
||||||
|
raise ValueError(_("Could not check if file context for %s is defined") % target)
|
||||||
|
if not exists:
|
||||||
|
- raise ValueError(_("File context for %s is not defined") % target)
|
||||||
|
+ (rc,exists) = semanage_fcontext_exists(self.sh, k)
|
||||||
|
+ if exists:
|
||||||
|
+ return self.__add(target, setype, ftype, serange, seuser)
|
||||||
|
+ else:
|
||||||
|
+ raise ValueError(_("File context for %s is not defined") % target)
|
||||||
|
|
||||||
|
(rc,fcontext) = semanage_fcontext_query_local(self.sh, k)
|
||||||
|
if rc < 0:
|
||||||
|
@@ -1591,30 +1595,33 @@
|
||||||
|
|
||||||
|
self.flist += fclocal
|
||||||
|
|
||||||
|
+ ddict = {}
|
||||||
|
for fcontext in self.flist:
|
||||||
|
expr = semanage_fcontext_get_expr(fcontext)
|
||||||
|
ftype = semanage_fcontext_get_type(fcontext)
|
||||||
|
ftype_str = semanage_fcontext_get_type_str(ftype)
|
||||||
|
con = semanage_fcontext_get_con(fcontext)
|
||||||
|
if con:
|
||||||
|
- l.append((expr, ftype_str, semanage_context_get_user(con), semanage_context_get_role(con), semanage_context_get_type(con), semanage_context_get_mls(con)))
|
||||||
|
+ ddict[(expr, ftype_str)] = (semanage_context_get_user(con), semanage_context_get_role(con), semanage_context_get_type(con), semanage_context_get_mls(con))
|
||||||
|
else:
|
||||||
|
- l.append((expr, ftype_str, con))
|
||||||
|
+ ddict[(expr, ftype_str)] = con
|
||||||
|
|
||||||
|
- return l
|
||||||
|
+ return ddict
|
||||||
|
|
||||||
|
def list(self, heading = 1, locallist = 0 ):
|
||||||
|
if heading:
|
||||||
|
print "%-50s %-18s %s\n" % (_("SELinux fcontext"), _("type"), _("Context"))
|
||||||
|
- fcon_list = self.get_all(locallist)
|
||||||
|
- for fcon in fcon_list:
|
||||||
|
- if len(fcon) > 3:
|
||||||
|
+ fcon_dict = self.get_all(locallist)
|
||||||
|
+ keys = fcon_dict.keys()
|
||||||
|
+ keys.sort()
|
||||||
|
+ for k in keys:
|
||||||
|
+ if fcon_dict[k]:
|
||||||
|
if is_mls_enabled:
|
||||||
|
- print "%-50s %-18s %s:%s:%s:%s " % (fcon[0], fcon[1], fcon[2], fcon[3], fcon[4], translate(fcon[5],False))
|
||||||
|
+ print "%-50s %-18s %s:%s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1], fcon_dict[k][2], translate(fcon_dict[k][3],False))
|
||||||
|
else:
|
||||||
|
- print "%-50s %-18s %s:%s:%s " % (fcon[0], fcon[1], fcon[2], fcon[3],fcon[4])
|
||||||
|
+ print "%-50s %-18s %s:%s:%s " % (k[0], k[1], fcon_dict[k][0], fcon_dict[k][1],fcon_dict[k][2])
|
||||||
|
else:
|
||||||
|
- print "%-50s %-18s <<None>>" % (fcon[0], fcon[1])
|
||||||
|
+ print "%-50s %-18s <<None>>" % (k[0], k[1])
|
||||||
|
|
||||||
|
class booleanRecords(semanageRecords):
|
||||||
|
def __init__(self, store = ""):
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
Summary: SELinux policy core utilities
|
Summary: SELinux policy core utilities
|
||||||
Name: policycoreutils
|
Name: policycoreutils
|
||||||
Version: 2.0.57
|
Version: 2.0.57
|
||||||
Release: 5%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Base
|
Group: System Environment/Base
|
||||||
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
|
||||||
@ -28,6 +28,7 @@ BuildRequires: pam-devel libsepol-static >= %{libsepolver} libsemanage-devel >=
|
|||||||
Requires: /bin/mount /bin/egrep /bin/awk /usr/bin/diff rpm /bin/sed
|
Requires: /bin/mount /bin/egrep /bin/awk /usr/bin/diff rpm /bin/sed
|
||||||
Requires: libsepol >= %{libsepolver} libsemanage-python >= %{libsemanagever} coreutils audit-libs-python >= %{libauditver} checkpolicy libselinux-python libselinux-utils >= %{libselinuxver}
|
Requires: libsepol >= %{libsepolver} libsemanage-python >= %{libsemanagever} coreutils audit-libs-python >= %{libauditver} checkpolicy libselinux-python libselinux-utils >= %{libselinuxver}
|
||||||
Requires(post): /sbin/service /sbin/chkconfig
|
Requires(post): /sbin/service /sbin/chkconfig
|
||||||
|
Requires: usermode-gtk
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -192,6 +193,9 @@ if [ "$1" -ge "1" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Oct 27 2008 Dan Walsh <dwalsh@redhat.com> 2.0.57-6
|
||||||
|
- Add usermode-gtk requires
|
||||||
|
|
||||||
* Tue Oct 23 2008 Dan Walsh <dwalsh@redhat.com> 2.0.57-5
|
* Tue Oct 23 2008 Dan Walsh <dwalsh@redhat.com> 2.0.57-5
|
||||||
- Allow addition of local modifications of fcontext policy.
|
- Allow addition of local modifications of fcontext policy.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user