From db984892b12f9c65c648ce4365c77e4211cf5453 Mon Sep 17 00:00:00 2001 From: Dan Walsh Date: Thu, 29 Sep 2011 09:30:56 -0400 Subject: [PATCH] Fix output to match input in policy --- 0008-Fix-output-to-match-policy-lines.patch | 34 +++++++++++++++++++++ setools.spec | 7 ++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 0008-Fix-output-to-match-policy-lines.patch diff --git a/0008-Fix-output-to-match-policy-lines.patch b/0008-Fix-output-to-match-policy-lines.patch new file mode 100644 index 0000000..47c258e --- /dev/null +++ b/0008-Fix-output-to-match-policy-lines.patch @@ -0,0 +1,34 @@ +From 2f89d9acc12c0a7b50a94e4247b015242ce712c9 Mon Sep 17 00:00:00 2001 +From: Dan Walsh +Date: Wed, 21 Sep 2011 15:15:02 -0400 +Subject: [PATCH 8/8] Fix output to match policy lines + +--- + libapol/src/ftrule-query.c | 4 ++-- + 1 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/libapol/src/ftrule-query.c b/libapol/src/ftrule-query.c +index 9c7a23b..1d5f5c8 100644 +--- a/libapol/src/ftrule-query.c ++++ b/libapol/src/ftrule-query.c +@@ -282,7 +282,7 @@ char *apol_filename_trans_render(const apol_policy_t * policy, const qpol_filena + error = errno; + goto err; + } +- if (apol_str_appendf(&tmp, &tmp_sz, "transition_type %s ", tmp_name)) { ++ if (apol_str_appendf(&tmp, &tmp_sz, "type_transition %s ", tmp_name)) { + error = errno; + ERR(policy, "%s", strerror(error)); + goto err; +@@ -338,7 +338,7 @@ char *apol_filename_trans_render(const apol_policy_t * policy, const qpol_filena + goto err; + } + +- if (apol_str_appendf(&tmp, &tmp_sz, " %s", tmp_name)) { ++ if (apol_str_appendf(&tmp, &tmp_sz, " \"%s\"", tmp_name)) { + error = errno; + ERR(policy, "%s", strerror(error)); + goto err; +-- +1.7.6.2 + diff --git a/setools.spec b/setools.spec index 9e4f55b..0813201 100644 --- a/setools.spec +++ b/setools.spec @@ -5,7 +5,7 @@ Name: setools Version: %{setools_maj_ver}.%{setools_min_ver} -Release: 17%{?dist} +Release: 18%{?dist} License: GPLv2 URL: http://oss.tresys.com/projects/setools BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root @@ -21,6 +21,7 @@ Patch4: 0004-Fix-man-pages-and-getoptions.patch Patch5: 0005-Fix-sepol-calls-to-work-with-latest-libsepol.patch Patch6: 0006-Changes-to-support-named-file_trans-rules.patch Patch7: 0007-Remove-unused-variables.patch +Patch8: 0008-Fix-output-to-match-policy-lines.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} @@ -199,6 +200,7 @@ This package includes the following graphical tools: %patch5 -p 1 -b .libsepol %patch6 -p 1 -b .filenametrans %patch7 -p 1 -b .unused +%patch8 -p 1 -b .fixoutput %ifarch sparc sparcv9 sparc64 s390 s390x for file in `find . -name Makefile.am`; do @@ -365,6 +367,9 @@ rm -rf ${RPM_BUILD_ROOT} %postun libs-tcl -p /sbin/ldconfig %changelog +* Wed Sep 21 2011 Dan Walsh - 3.3.7-18 +- Fix output to match input in policy + * Tue Sep 20 2011 Dan Walsh - 3.3.7-17 - Fix to build with latest libsepol - Show filename transition files