From aa0c632103908167cc42c57e6b91c05992088232 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mar 17 2006 20:25:31 +0000 Subject: - Make work on RHEL4 - Upgrade to latest from NSA Merged abort early on merge errors patch from Ivan Gyurdiev. Cleaned up error handling in semanage_split_fc based on a patch by Serge Hallyn (IBM) and suggestions by Ivan Gyurdiev. Merged MLS handling fixes from Ivan Gyurdiev. --- diff --git a/.cvsignore b/.cvsignore index 608a029..6b94fc4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -57,3 +57,6 @@ libsemanage-1.5.21.tgz libsemanage-1.5.23.tgz libsemanage-1.5.26.tgz libsemanage-1.5.28.tgz +libsemanage-1.5.29.tgz +libsemanage-1.5.31.tgz +libsemanage-1.6.tgz diff --git a/libsemanage-rhat.patch b/libsemanage-rhat.patch index a72d1f4..6722ca9 100644 --- a/libsemanage-rhat.patch +++ b/libsemanage-rhat.patch @@ -1,57 +1,11 @@ -diff -Naurp --exclude-from excludes old/libsemanage/src/direct_api.c new/libsemanage/src/direct_api.c ---- old/libsemanage/src/direct_api.c 2006-02-08 03:20:08.000000000 -0500 -+++ new/libsemanage/src/direct_api.c 2006-02-09 19:14:15.000000000 -0500 -@@ -475,7 +475,7 @@ static int semanage_direct_commit(semana - - /* ==================== File-backed ================== */ - -- /* write the linked file contexts template */ -+ /* File Contexts */ - if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_FC_TMPL)) == NULL || - write_file(sh, ofilename, sepol_module_package_get_file_contexts(base), - sepol_module_package_get_file_contexts_len(base)) == -1) { -@@ -484,29 +484,36 @@ static int semanage_direct_commit(semana - - if (semanage_split_fc(sh)) - goto cleanup; -- -+ -+ pfcontexts->dtable->drop_cache(pfcontexts->dbase); -+ -+ /* Seusers */ - if (sepol_module_package_get_seusers_len(base)) { - if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_SEUSERS)) == NULL || - write_file(sh, ofilename, sepol_module_package_get_seusers(base), - sepol_module_package_get_seusers_len(base)) == -1) { - goto cleanup; - } -+ pseusers->dtable->drop_cache(pseusers->dbase); -+ -+ } else { -+ if (pseusers->dtable->clear(sh, pseusers->dbase) < 0) -+ goto cleanup; - } - -+ /* Users_extra */ - if (sepol_module_package_get_user_extra_len(base)) { - if ((ofilename = semanage_path(SEMANAGE_TMP, SEMANAGE_USER_EXTRA)) == NULL || - write_file(sh, ofilename, sepol_module_package_get_user_extra(base), - sepol_module_package_get_user_extra_len(base)) == -1) { - goto cleanup; - } -- } -+ pusers_extra->dtable->drop_cache(pusers_extra->dbase); - -- /* Drop any cached content for file_contexts, seusers, or users_extra, -- * since it is now superceded by the files just written, and needs to be -- * re-cached */ -- pfcontexts->dtable->drop_cache(pfcontexts->dbase); -- pseusers->dtable->drop_cache(pseusers->dbase); -- pusers_extra->dtable->drop_cache(pusers_extra->dbase); -+ } else { -+ if (pusers_extra->dtable->clear(sh, pusers_extra->dbase) < 0) -+ goto cleanup; -+ } - - /* ==================== Policydb-backed ================ */ +--- libsemanage-1.5.28/src/Makefile~ 2006-02-17 14:45:52.000000000 -0500 ++++ libsemanage-1.5.28/src/Makefile 2006-03-17 08:44:29.000000000 -0500 +@@ -3,7 +3,7 @@ + LIBDIR ?= $(PREFIX)/lib + SHLIBDIR ?= $(DESTDIR)/lib + INCLUDEDIR ?= $(PREFIX)/include +-PYLIBVER ?= python2.4 ++PYLIBVER ?= $(shell python -c 'import sys;print "python%d.%d" % sys.version_info[0:2]') + PYINC ?= /usr/include/${PYLIBVER} + PYLIBDIR ?= $(LIBDIR)/${PYLIBVER} diff --git a/libsemanage.spec b/libsemanage.spec index cdd2cc6..4bb5a81 100644 --- a/libsemanage.spec +++ b/libsemanage.spec @@ -1,12 +1,13 @@ -%define libsepolver 1.11.18-1 -%define libselinuxver 1.29.6-1 +%define libsepolver 1.12-1 +%define libselinuxver 1.30-1 Summary: SELinux binary policy manipulation library Name: libsemanage -Version: 1.5.28 +Version: 1.6 Release: 1 License: GPL Group: System Environment/Libraries Source: http://www.nsa.gov/selinux/archives/libsemanage-%{version}.tgz +Patch: libsemanage-rhat.patch BuildRoot: %{_tmppath}/%{name}-buildroot BuildRequires: libselinux-devel >= %{libselinuxver} @@ -39,6 +40,7 @@ needed for developing applications that manipulate binary policies. %prep %setup -q +%patch -p1 -b .rhat %build make clean @@ -59,10 +61,7 @@ rm -rf ${RPM_BUILD_ROOT} %config(noreplace) /etc/selinux/semanage.conf /%{_lib}/libsemanage.so.1 %{_libdir}/libsemanage.so -%{_libdir}/python2.4/site-packages/_semanage.so -%{_libdir}/python2.4/site-packages/semanage.py -%{_libdir}/python2.4/site-packages/semanage.pyc -%{_libdir}/python2.4/site-packages/semanage.pyo +%{_libdir}/python*/site-packages/* %post -p /sbin/ldconfig @@ -75,6 +74,14 @@ rm -rf ${RPM_BUILD_ROOT} %{_mandir}/man3/* %changelog +* Fri Mar 17 2006 Dan Walsh - 1.6 +- Make work on RHEL4 +- Upgrade to latest from NSA + * Merged abort early on merge errors patch from Ivan Gyurdiev. + * Cleaned up error handling in semanage_split_fc based on a patch + by Serge Hallyn (IBM) and suggestions by Ivan Gyurdiev. + * Merged MLS handling fixes from Ivan Gyurdiev. + * Fri Feb 17 2006 Dan Walsh - 1.5.28-1 - Upgrade to latest from NSA * Merged bug fix for fcontext validate handler from Ivan Gyurdiev. diff --git a/sources b/sources index 5158f02..504617c 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -42110b5a329e91eb8aff0c2cad7e2b72 libsemanage-1.5.28.tgz +3f547c9b5ca5d300957a2b36230dbb30 libsemanage-1.6.tgz