rpms/policycoreutils/devel policycoreutils-rhat.patch, 1.315, 1.316 policycoreutils.spec, 1.431, 1.432
Daniel J Walsh (dwalsh)
fedora-extras-commits at redhat.com
Wed Aug 1 13:42:44 UTC 2007
- Previous message (by thread): rpms/xen/devel vnc-client-iterator.patch, NONE, 1.1 vnc-double-cleanup.patch, NONE, 1.1 vnc-invalid-fd.patch, NONE, 1.1 vnc-ref-counting.patch, NONE, 1.1 xen-3.1.0-dev-native-protocol.patch, NONE, 1.1 xen-3.1.0-libxc-native-protocol.patch, NONE, 1.1 xen-keyboard.patch, NONE, 1.1 xen.spec, 1.180, 1.181
- Next message (by thread): rpms/gnome-applets/devel .cvsignore, 1.51, 1.52 gnome-applets.spec, 1.230, 1.231 sources, 1.54, 1.55
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: dwalsh
Update of /cvs/extras/rpms/policycoreutils/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv11819
Modified Files:
policycoreutils-rhat.patch policycoreutils.spec
Log Message:
* Wed Aug 1 2007 Dan Walsh <dwalsh at redhat.com> 2.0.22-12
- Allow semanage fcontext -a -t <<none>> /path to work
policycoreutils-rhat.patch:
Index: policycoreutils-rhat.patch
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils-rhat.patch,v
retrieving revision 1.315
retrieving revision 1.316
diff -u -r1.315 -r1.316
--- policycoreutils-rhat.patch 31 Jul 2007 19:46:03 -0000 1.315
+++ policycoreutils-rhat.patch 1 Aug 2007 13:42:41 -0000 1.316
@@ -1,6 +1,6 @@
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/audit2allow/Makefile policycoreutils-2.0.22/audit2allow/Makefile
--- nsapolicycoreutils/audit2allow/Makefile 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/audit2allow/Makefile 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/audit2allow/Makefile 2007-07-31 15:45:57.000000000 -0400
@@ -1,6 +1,7 @@
# Installation directories.
PREFIX ?= ${DESTDIR}/usr
@@ -18,9 +18,20 @@
-mkdir -p $(MANDIR)/man1
install -m 644 audit2allow.1 $(MANDIR)/man1/
+diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/ChangeLog policycoreutils-2.0.22/ChangeLog
+--- nsapolicycoreutils/ChangeLog 2007-07-16 14:20:43.000000000 -0400
++++ policycoreutils-2.0.22/ChangeLog 2007-06-21 05:17:13.000000000 -0400
+@@ -91,7 +91,6 @@
+ 1.33.15 2007-01-17
+ * Merged unicode-to-string fix for seobject audit from Dan Walsh.
+ * Merged man page updates to make "apropos selinux" work from Dan Walsh.
+-
+ 1.33.14 2007-01-16
+ * Merged newrole man page patch from Michael Thompson.
+
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/Makefile policycoreutils-2.0.22/Makefile
--- nsapolicycoreutils/Makefile 2007-07-16 14:20:43.000000000 -0400
-+++ policycoreutils-2.0.22/Makefile 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/Makefile 2007-07-31 15:45:57.000000000 -0400
@@ -1,4 +1,4 @@
-SUBDIRS=setfiles semanage load_policy newrole run_init restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po
+SUBDIRS=setfiles semanage load_policy newrole run_init restorecond secon audit2allow audit2why scripts sestatus semodule_package semodule semodule_link semodule_expand semodule_deps setsebool po gui
@@ -29,7 +40,7 @@
@for subdir in $(SUBDIRS); do \
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/Makefile policycoreutils-2.0.22/restorecond/Makefile
--- nsapolicycoreutils/restorecond/Makefile 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/restorecond/Makefile 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/restorecond/Makefile 2007-07-31 15:45:57.000000000 -0400
@@ -22,7 +22,7 @@
-mkdir -p $(INITDIR)
install -m 644 restorecond.init $(INITDIR)/restorecond
@@ -41,7 +52,7 @@
/sbin/restorecon $(SBINDIR)/restorecond
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/restorecond/restorecond.c policycoreutils-2.0.22/restorecond/restorecond.c
--- nsapolicycoreutils/restorecond/restorecond.c 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/restorecond/restorecond.c 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/restorecond/restorecond.c 2007-07-31 15:45:57.000000000 -0400
@@ -210,9 +210,10 @@
}
@@ -70,7 +81,7 @@
close(fd);
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/run_init/Makefile policycoreutils-2.0.22/run_init/Makefile
--- nsapolicycoreutils/run_init/Makefile 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/run_init/Makefile 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/run_init/Makefile 2007-07-31 15:45:57.000000000 -0400
@@ -34,8 +34,8 @@
install: all
test -d $(SBINDIR) || install -m 755 -d $(SBINDIR)
@@ -84,7 +95,7 @@
ifeq (${PAMH}, /usr/include/security/pam_appl.h)
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/chcat policycoreutils-2.0.22/scripts/chcat
--- nsapolicycoreutils/scripts/chcat 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/scripts/chcat 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/scripts/chcat 2007-07-31 15:45:57.000000000 -0400
@@ -77,7 +77,7 @@
if len(cats) > 0:
@@ -105,7 +116,7 @@
if add_ind:
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/fixfiles policycoreutils-2.0.22/scripts/fixfiles
--- nsapolicycoreutils/scripts/fixfiles 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/scripts/fixfiles 2007-07-31 15:36:53.000000000 -0400
++++ policycoreutils-2.0.22/scripts/fixfiles 2007-07-31 15:45:57.000000000 -0400
@@ -88,7 +88,7 @@
esac; \
fi; \
@@ -125,7 +136,7 @@
#
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/scripts/genhomedircon policycoreutils-2.0.22/scripts/genhomedircon
--- nsapolicycoreutils/scripts/genhomedircon 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/scripts/genhomedircon 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/scripts/genhomedircon 2007-07-31 15:45:57.000000000 -0400
@@ -302,7 +302,7 @@
regex = re.sub("\(\/\.\*\)\?", "", regex)
@@ -137,7 +148,7 @@
continue
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/semanage policycoreutils-2.0.22/semanage/semanage
--- nsapolicycoreutils/semanage/semanage 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/semanage/semanage 2007-07-23 10:40:06.000000000 -0400
++++ policycoreutils-2.0.22/semanage/semanage 2007-07-31 15:45:57.000000000 -0400
@@ -34,7 +34,10 @@
sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.__stdout__, 'replace')
@@ -152,7 +163,7 @@
__builtin__.__dict__['_'] = unicode
diff --exclude-from=exclude --exclude=sepolgen-1.0.8 --exclude=gui --exclude=po -N -u -r nsapolicycoreutils/semanage/seobject.py policycoreutils-2.0.22/semanage/seobject.py
--- nsapolicycoreutils/semanage/seobject.py 2007-07-16 14:20:41.000000000 -0400
-+++ policycoreutils-2.0.22/semanage/seobject.py 2007-07-31 09:55:36.000000000 -0400
++++ policycoreutils-2.0.22/semanage/seobject.py 2007-08-01 09:23:28.000000000 -0400
@@ -210,6 +210,7 @@
os.write(fd, self.out())
os.close(fd)
@@ -161,7 +172,33 @@
class semanageRecords:
def __init__(self):
-@@ -1051,26 +1052,30 @@
+@@ -1024,6 +1025,25 @@
+ def __init__(self):
+ semanageRecords.__init__(self)
+
++ def createcon(self):
++ (rc, con) = semanage_context_create(self.sh)
++ if rc < 0:
++ raise ValueError(_("Could not create context for %s") % target)
++ rc = semanage_context_set_user(self.sh, con, "system_u")
++ if rc < 0:
++ raise ValueError(_("Could not set user in file context for %s") % target)
++
++ rc = semanage_context_set_role(self.sh, con, "object_r")
++ if rc < 0:
++ raise ValueError(_("Could not set role in file context for %s") % target)
++
++ if is_mls_enabled == 1:
++ rc = semanage_context_set_mls(self.sh, con, "s0")
++ if rc < 0:
++ raise ValueError(_("Could not set mls fields in file context for %s") % target)
++
++ return con
++
+ def add(self, target, type, ftype = "", serange = "", seuser = "system_u"):
+ if seuser == "":
+ seuser = "system_u"
+@@ -1051,33 +1071,30 @@
raise ValueError(_("Could not create file context for %s") % target)
rc = semanage_fcontext_set_expr(self.sh, fcontext, target)
@@ -185,14 +222,8 @@
- 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)
-+ if type == "<<none>>":
-+ rc, con = semanage_context_from_string(self.sh, type)
-+ if rc < 0:
-+ raise ValueError(_("Could not set context from string %s for %s") % (type, target))
-+ else:
-+ (rc, con) = semanage_context_create(self.sh)
-+ if rc < 0:
-+ raise ValueError(_("Could not create context for %s") % target)
++ if type != "<<none>>":
++ con = self.createcon()
+ rc = semanage_context_set_user(self.sh, con, seuser)
+ if rc < 0:
+ raise ValueError(_("Could not set user in file context for %s") % target)
@@ -209,10 +240,69 @@
+ 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)
++ rc = semanage_fcontext_set_con(self.sh, fcontext, con)
++ if rc < 0:
++ raise ValueError(_("Could not set file context for %s") % target)
semanage_fcontext_set_type(fcontext, file_types[ftype])
-@@ -1283,9 +1288,12 @@
+- rc = semanage_fcontext_set_con(self.sh, fcontext, con)
+- if rc < 0:
+- raise ValueError(_("Could not set file context for %s") % target)
+-
+ rc = semanage_begin_transaction(self.sh)
+ if rc < 0:
+ raise ValueError(_("Could not start semanage transaction"))
+@@ -1090,7 +1107,8 @@
+ if rc < 0:
+ raise ValueError(_("Could not add file context for %s") % target)
+
+- semanage_context_free(con)
++ if type != "<<none>>":
++ semanage_context_free(con)
+ semanage_fcontext_key_free(k)
+ semanage_fcontext_free(fcontext)
+
+@@ -1112,16 +1130,29 @@
+ if rc < 0:
+ raise ValueError(_("Could not query file context for %s") % target)
+
+- con = semanage_fcontext_get_con(fcontext)
++ if setype != "<<none>>":
++ print setype
++ con = semanage_fcontext_get_con(fcontext)
+
+- if serange != "":
+- semanage_context_set_mls(self.sh, con, untranslate(serange))
+- if seuser != "":
+- semanage_context_set_user(self.sh, con, seuser)
+- if setype != "":
+- semanage_context_set_type(self.sh, con, setype)
+-
+- rc = semanage_begin_transaction(self.sh)
++ if con == None:
++ con = self.createcon()
++
++ if serange != "":
++ semanage_context_set_mls(self.sh, con, untranslate(serange))
++ if seuser != "":
++ semanage_context_set_user(self.sh, con, seuser)
++ if setype != "":
++ semanage_context_set_type(self.sh, con, setype)
++
++ rc = semanage_fcontext_set_con(self.sh, fcontext, con)
++ if rc < 0:
++ raise ValueError(_("Could not set file context for %s") % target)
++ else:
++ rc = semanage_fcontext_set_con(self.sh, fcontext, None)
++ if rc < 0:
++ raise ValueError(_("Could not set file context for %s") % target)
++
++ rc = semanage_begin_transaction(self.sh)
+ if rc < 0:
+ raise ValueError(_("Could not start semanage transaction"))
+
+@@ -1283,9 +1314,12 @@
raise ValueError(_("Could not list booleans"))
for boolean in self.blist:
Index: policycoreutils.spec
===================================================================
RCS file: /cvs/extras/rpms/policycoreutils/devel/policycoreutils.spec,v
retrieving revision 1.431
retrieving revision 1.432
diff -u -r1.431 -r1.432
--- policycoreutils.spec 31 Jul 2007 19:39:20 -0000 1.431
+++ policycoreutils.spec 1 Aug 2007 13:42:41 -0000 1.432
@@ -6,7 +6,7 @@
Summary: SELinux policy core utilities
Name: policycoreutils
Version: 2.0.22
-Release: 11%{?dist}
+Release: 12%{?dist}
License: GPL
Group: System Environment/Base
Source: http://www.nsa.gov/selinux/archives/policycoreutils-%{version}.tgz
@@ -192,6 +192,10 @@
fi
%changelog
+* Wed Aug 1 2007 Dan Walsh <dwalsh at redhat.com> 2.0.22-12
+- Allow semanage fcontext -a -t <<none>> /path to work
+
+
* Fri Jul 27 2007 Dan Walsh <dwalsh at redhat.com> 2.0.22-11
- Fixfiles update required to match new regex
- Previous message (by thread): rpms/xen/devel vnc-client-iterator.patch, NONE, 1.1 vnc-double-cleanup.patch, NONE, 1.1 vnc-invalid-fd.patch, NONE, 1.1 vnc-ref-counting.patch, NONE, 1.1 xen-3.1.0-dev-native-protocol.patch, NONE, 1.1 xen-3.1.0-libxc-native-protocol.patch, NONE, 1.1 xen-keyboard.patch, NONE, 1.1 xen.spec, 1.180, 1.181
- Next message (by thread): rpms/gnome-applets/devel .cvsignore, 1.51, 1.52 gnome-applets.spec, 1.230, 1.231 sources, 1.54, 1.55
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list