[Open-scap] [PATCH] New command line option: --custom-stylesheet

Maura Dailey maura at eclipse.ncsc.mil
Tue Apr 3 23:31:02 UTC 2012


I created the attached patch that allows me to specify a custom XSL
stylesheet when using the guide output option. After building the
project with my patch applied, the new option --custom-stylesheet will
either take an absolute path to an XSL file or will look for the file
name inside OSCAP's installed xsl folder.

- I had some trouble with getting relative paths to work without
  significantly rewriting oscap_find_file, so I abandoned the attempt.
- I also haven't solved the problem of sanitizing input (my filename
  gets passed somewhat directly into oscap_find_file, which
  automatically accepts any string that begins with '/' or '\\' as a
  valid absolute path).

I haven't submitted a patch for a public project before, so please
excuse any ignorance on my part. I was hesitant to touch the code too
much, lest I break other functionality.

I also fixed one or two places with mismatched indenting that I came
across while I worked on this patch. I didn't know if anything had been
standardized for the project, so I made them match the surrounding
lines in the function.

Thanks for your consideration,
Maura Dailey
maura at eclipse.ncsc.mil
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Added-new-command-line-option-that-will-allow-users-.patch
Type: text/x-patch
Size: 7045 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/open-scap-list/attachments/20120403/0576be5f/attachment.bin>


More information about the Open-scap-list mailing list