Skip to content

Commit 4fe580b

Browse files
committed
Solve tailoring obtained from a source DS
1 parent d99456e commit 4fe580b

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/DS/rds.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ static int ds_rds_create_from_dom(xmlDocPtr* ret, xmlDocPtr sds_doc, xmlDocPtr t
733733
xmlDOMWrapReconcileNamespaces(sds_wrap_ctxt, sds_res_node, 0);
734734
xmlDOMWrapFreeCtxt(sds_wrap_ctxt);
735735

736-
if (tailoring_doc) {
736+
if (tailoring_doc && strcmp(tailoring_filepath, "NONEXISTENT")) {
737737
char *mangled_tailoring_filepath = ds_sds_mangle_filepath(tailoring_filepath);
738738
char *tailoring_component_id = oscap_sprintf("scap_org.open-scap_comp_%s_tailoring", mangled_tailoring_filepath);
739739
char *tailoring_component_ref_id = oscap_sprintf("scap_org.open-scap_cref_%s_tailoring", mangled_tailoring_filepath);
@@ -849,8 +849,6 @@ struct oscap_source *ds_rds_create_source(struct oscap_source *sds_source, struc
849849
const size_t max_timestamp_len = 32;
850850
tailoring_doc_timestamp = malloc(max_timestamp_len);
851851
strftime(tailoring_doc_timestamp, max_timestamp_len, "%Y-%m-%dT%H:%M:%S", localtime(&file_stat.st_mtime));
852-
} else {
853-
return NULL;
854852
}
855853
}
856854

0 commit comments

Comments
 (0)