Module: OpenSCAP
- Extended by:
- FFI::Library
- Defined in:
- lib/openscap/text.rb,
lib/openscap.rb,
lib/openscap/libc.rb,
lib/openscap/xccdf.rb,
lib/openscap/ds/arf.rb,
lib/openscap/ds/sds.rb,
lib/openscap/source.rb,
lib/openscap/version.rb,
lib/openscap/openscap.rb,
lib/openscap/xccdf/fix.rb,
lib/openscap/exceptions.rb,
lib/openscap/xccdf/item.rb,
lib/openscap/xccdf/rule.rb,
lib/openscap/xccdf/group.rb,
lib/openscap/xccdf/value.rb,
lib/openscap/xccdf/policy.rb,
lib/openscap/xccdf/profile.rb,
lib/openscap/xccdf/session.rb,
lib/openscap/xccdf/benchmark.rb,
lib/openscap/xccdf/reference.rb,
lib/openscap/xccdf/tailoring.rb,
lib/openscap/xccdf/ruleresult.rb,
lib/openscap/xccdf/testresult.rb,
lib/openscap/xccdf/policy_model.rb
Overview
Copyright © 2015–2016 Red Hat Inc.
This software is licensed to you under the GNU General Public License, version 2 (GPLv2). There is NO WARRANTY for this software, express or implied, including the implied warranties of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2 along with this software; if not, see www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
Defined Under Namespace
Modules: DS, LibC, Xccdf Classes: OpenSCAPError, Source, Text, TextList
Constant Summary collapse
- XmlReporterCallback =
proc do |filename, line_number, , e| offset = e.get_string(0).length msg = "#{filename}:#{line_number}: #{}" if msg.length + offset + 1 < e.size e.put_string(offset, msg) 0 else 1 end end
- VERSION =
'0.4.7'.freeze
- XccdfItemType =
enum(:benchmark, 0x0100, :profile, 0x0200, :result, 0x0400, :rule, 0x1000, :group, 0x2000, :value, 0x4000)
- XccdfSeverity =
enum( :xccdf_level_not_defined, 0, :xccdf_unknown, 1, :xccdf_info, :xccdf_low, :xccdf_medium, :xccdf_high )
- XccdfResult =
enum(:pass, 1, :fail, :error, :unknown, :notapplicable, :notchecked, :notselected, :informational, :fixed)
Class Method Summary collapse
Class Method Details
.error? ⇒ Boolean
18 19 20 |
# File 'lib/openscap/openscap.rb', line 18 def self.error? oscap_err end |
.full_error ⇒ Object
22 23 24 25 |
# File 'lib/openscap/openscap.rb', line 22 def self.full_error err = oscap_err_get_full_error err.null? ? nil : err.read_string end |
.raise!(msg = nil) ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/openscap/openscap.rb', line 27 def self.raise!(msg = nil) err = full_error if err.nil? err = msg.nil? ? '(unknown error)' : msg else err += "\n#{msg}" end raise OpenSCAPError, err end |