From 0dbe4c6ab233351e4f8c5b145b95eaabfa07a7a4 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 06 2018 18:39:49 +0000 Subject: import openscap-1.2.14-3.el7_4 --- diff --git a/SOURCES/openscap-1.2.15-use-checklist-id-to-get-html-guide-PR-745.patch b/SOURCES/openscap-1.2.15-use-checklist-id-to-get-html-guide-PR-745.patch new file mode 100644 index 0000000..be8157a --- /dev/null +++ b/SOURCES/openscap-1.2.15-use-checklist-id-to-get-html-guide-PR-745.patch @@ -0,0 +1,37 @@ +From e8f6f67552b196b9d65fa40719e2ea00c87a9579 Mon Sep 17 00:00:00 2001 +From: Evgeni Golov +Date: Fri, 19 May 2017 17:34:59 +0200 +Subject: [PATCH] pass session->checklist_id to oscap_htable_get in + get_html_guide + +In b8defed we moved to using s->checklist_id instead of hard coding +xccdf.xml. However, this change was forgotten in +ds_sds_session_get_html_guide which leads to the following error when +trying to get the HTML guide: + + Internal error: Could not acquire handle to xccdf.xml source. + +This change migrates ds_sds_session_get_html_guide to also use +s->checklist_id and thus fixes the issue. + +Fixes: #744 +--- + src/DS/ds_sds_session.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/DS/ds_sds_session.c b/src/DS/ds_sds_session.c +index db7692a65..f14588e09 100644 +--- a/src/DS/ds_sds_session.c ++++ b/src/DS/ds_sds_session.c +@@ -352,9 +352,9 @@ char *ds_sds_session_get_html_guide(struct ds_sds_session *session, const char * + "profile_id", profile_id, + NULL + }; +- struct oscap_source *xccdf = oscap_htable_get(session->component_sources, "xccdf.xml"); ++ struct oscap_source *xccdf = oscap_htable_get(session->component_sources, session->checklist_id); + if (xccdf == NULL) { +- oscap_seterr(OSCAP_EFAMILY_OSCAP, "Internal error: Could not acquire handle to xccdf.xml source."); ++ oscap_seterr(OSCAP_EFAMILY_OSCAP, "Internal error: Could not acquire handle to '%s' source.", session->checklist_id); + return NULL; + } + return oscap_source_apply_xslt_path_mem(xccdf, "xccdf-guide.xsl", params, oscap_path_to_xslt()); diff --git a/SPECS/openscap.spec b/SPECS/openscap.spec index 11ce8ca..26a2e03 100644 --- a/SPECS/openscap.spec +++ b/SPECS/openscap.spec @@ -6,7 +6,7 @@ restorecon -R /usr/bin/oscap /usr/libexec/openscap; \ Name: openscap Version: 1.2.14 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Set of open source libraries enabling integration of the SCAP line of standards Group: System Environment/Libraries License: LGPLv2+ @@ -16,6 +16,7 @@ Patch0: openscap-1.2.14-rpm-probes-not-applicable-PR-733.patch Patch1: openscap-1.2.14-sysctl-test-s390x-PR-726.patch # We are reverting the patch below, not applying it! The patch has been modified to remove line count changes, we got rid of line count checking in 1.2.14 Patch2: openscap-1.2.14-warning-by-default-PR-630.patch +Patch3: openscap-1.2.15-use-checklist-id-to-get-html-guide-PR-745.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: swig libxml2-devel libxslt-devel perl-XML-Parser BuildRequires: rpm-devel @@ -122,6 +123,7 @@ for developing applications that use %{name}-engine-sce. %patch0 -p1 %patch1 -p1 %patch2 -p1 -R +%patch3 -p1 %build %ifarch sparc64 @@ -261,6 +263,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libopenscap_sce.so.* %changelog +* Wed Feb 21 2018 Watson Yuuma Sato - 1.2.14-3 +- Use checklist ID instead of hardcoded value to get HTML guide (#1545584) + * Fri May 19 2017 Martin Preisler - 1.2.14-2 - RPM probes to return not applicable on non-rpm systems (#1447629) - fixed sysctl tests on s390x architecture (#1447649)