Fix output to match input in policy

This commit is contained in:
Dan Walsh 2011-09-29 09:30:56 -04:00
parent 0fd1802836
commit db984892b1
2 changed files with 40 additions and 1 deletions

View File

@ -0,0 +1,34 @@
From 2f89d9acc12c0a7b50a94e4247b015242ce712c9 Mon Sep 17 00:00:00 2001
From: Dan Walsh <dwalsh@redhat.com>
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

View File

@ -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 <dwalsh@redhat.com> - 3.3.7-18
- Fix output to match input in policy
* Tue Sep 20 2011 Dan Walsh <dwalsh@redhat.com> - 3.3.7-17
- Fix to build with latest libsepol
- Show filename transition files