From c4d0d7f2078df8d480cd5bd4ee9e003ff44e3426 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Thu, 6 Jan 2011 15:29:52 -0500 Subject: [PATCH] - Exit seinfo and sesearch with proper status --- setools-neverallow.patch | 15 +++++++++++++++ setools.spec | 11 +++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 setools-neverallow.patch diff --git a/setools-neverallow.patch b/setools-neverallow.patch new file mode 100644 index 0000000..e84cc3b --- /dev/null +++ b/setools-neverallow.patch @@ -0,0 +1,15 @@ +diff -up setools-3.3.7/libqpol/src/avrule_query.c~ setools-3.3.7/libqpol/src/avrule_query.c +--- setools-3.3.7/libqpol/src/avrule_query.c~ 2010-04-23 12:22:08.000000000 -0400 ++++ setools-3.3.7/libqpol/src/avrule_query.c 2011-01-06 10:42:50.000000000 -0500 +@@ -57,8 +57,9 @@ int qpol_policy_get_avrule_iter(const qp + + if ((rule_type_mask & QPOL_RULE_NEVERALLOW) && !qpol_policy_has_capability(policy, QPOL_CAP_NEVERALLOW)) { + ERR(policy, "%s", "Cannot get avrules: Neverallow rules requested but not available"); +- errno = ENOTSUP; +- return STATUS_ERR; ++/* errno = ENOTSUP; ++ return STATUS_ERR; */ ++ return STATUS_SUCCESS; + } + + db = &policy->p->p; diff --git a/setools.spec b/setools.spec index af7c705..7a74be8 100644 --- a/setools.spec +++ b/setools.spec @@ -5,7 +5,7 @@ Name: setools Version: %{setools_maj_ver}.%{setools_min_ver} -Release: 9%{?dist} +Release: 11%{?dist} License: GPLv2 URL: http://oss.tresys.com/projects/setools BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -15,6 +15,8 @@ Source2: apol.desktop Source3: seaudit.desktop Source4: sediffx.desktop Patch1: setools-python.patch +Patch2: setools-exitstatus.patch +Patch3: setools-neverallow.patch Summary: Policy analysis tools for SELinux Group: System Environment/Base Requires: setools-libs = %{version}-%{release} setools-libs-tcl = %{version}-%{release} setools-gui = %{version}-%{release} setools-console = %{version}-%{release} @@ -187,6 +189,8 @@ This package includes the following graphical tools: %prep %setup -q %patch1 -p 1 -b .python +%patch2 -p 1 -b .exitstatus +%patch3 -p 1 -b .neverallow # Fixup expected version of SWIG: sed -i -e "s|AC_PROG_SWIG(1.3.28)|AC_PROG_SWIG(2.0.0)|g" configure.ac @@ -353,7 +357,10 @@ rm -rf ${RPM_BUILD_ROOT} %postun libs-tcl -p /sbin/ldconfig %changelog -* Thu Nov 5 2010 Dan Walsh 3.3.6-9 +* Fri Nov 5 2010 Dan Walsh 3.3.6-10 +- Exit seinfo and sesearch with proper status + +* Fri Nov 5 2010 Dan Walsh 3.3.6-9 - Rebuild for new libxml2 * Thu Oct 14 2010 Dan Walsh 3.3.6-8