New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
get_html_guide returns NULL since 1.2.11 #744
Comments
Could you please include
? Let's see if openscap tells us what's wrong. EDIT: call oscap_set_verbose after oscap_init(). |
There seems to be no additional output after calling that. |
reading |
So with the error code in place, I get the following output on bad versions:
and now really bisecting, says that the following is the first bad commit:
|
Confirmed, reverting b8defed on top of current maint-1.2 makes my code work again. |
@jan-cerny Could you provide any insight into this? It's probably because components are no longer registered using a hardcoded ID but using their checklist id. |
This seems like a real bug. See https://github.com/OpenSCAP/openscap/blob/maint-1.2/src/DS/ds_sds_session.c#L355 It still uses the hardcoded ID even though we no longer register under it. b8defed causes a regression. |
Indeed, the following patch fixes it for me: diff --git a/src/DS/ds_sds_session.c b/src/DS/ds_sds_session.c
index db7692a..9f57ae2 100644
--- a/src/DS/ds_sds_session.c
+++ b/src/DS/ds_sds_session.c
@@ -352,7 +352,7 @@ 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.");
return NULL; |
Ohai,
given the following code, all releases until 1.2.10 would print me some HTML guide:
However, starting with 1.2.11, I just get NULL.
The file I am using is this one: https://github.com/theforeman/smart_proxy_openscap/blob/master/test/data/ssg-rhel7-ds.xml
Now I wonder, is the code wrong, or is that a bug in OpenSCAP?
The text was updated successfully, but these errors were encountered: