author | Jacob Varughese <jacob.varughese@oracle.com> |
Fri, 13 May 2016 18:08:27 -0700 | |
changeset 5985 | 6b195cad32d4 |
permissions | -rw-r--r-- |
5985
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
1 |
This patch implements the package_511 schema probe |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
2 |
for solaris. |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
3 |
This patch has not been submitted upstream but will |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
4 |
be by 2016-Jul-15. |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
5 |
--- openscap-1.2.6/src/OVAL/oval_enumerations.c.~3~ 2016-02-23 12:20:08.398905458 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
6 |
+++ openscap-1.2.6/src/OVAL/oval_enumerations.c 2016-02-23 12:21:52.263496707 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
7 |
@@ -516,6 +516,7 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
8 |
{OVAL_SOLARIS_PACKAGECHECK, "packagecheck"}, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
9 |
{OVAL_SOLARIS_SMFPROPERTY, "smfproperty"}, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
10 |
{OVAL_SOLARIS_VIRTUALIZATIONINFO, "virtualizationinfo"}, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
11 |
+ {OVAL_SOLARIS_PACKAGE511, "package511"}, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
12 |
{OVAL_SUBTYPE_UNKNOWN, NULL} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
13 |
}; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
14 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
15 |
--- openscap-1.2.6/src/OVAL/probes/Makefile.am.~3~ 2016-02-23 12:24:40.391851036 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
16 |
+++ openscap-1.2.6/src/OVAL/probes/Makefile.am 2016-02-23 12:24:03.718455915 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
17 |
@@ -218,6 +218,11 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
18 |
probe_virtualizationinfo_SOURCES= unix/solaris/virtualizationinfo.c |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
19 |
endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
20 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
21 |
+if probe_package511_enabled |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
22 |
+pkglibexec_PROGRAMS += probe_package511 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
23 |
+probe_package511_SOURCES =unix/solaris/package511.c |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
24 |
+endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
25 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
26 |
endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
27 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
28 |
# |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
29 |
--- openscap-1.2.6/src/OVAL/public/oval_types.h.~2~ 2016-02-23 13:06:40.621110617 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
30 |
+++ openscap-1.2.6/src/OVAL/public/oval_types.h 2016-02-23 13:07:12.072800278 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
31 |
@@ -240,7 +240,8 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
32 |
OVAL_SOLARIS_NDD = OVAL_FAMILY_SOLARIS + 6, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
33 |
OVAL_SOLARIS_PACKAGECHECK = OVAL_FAMILY_SOLARIS + 7, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
34 |
OVAL_SOLARIS_SMFPROPERTY = OVAL_FAMILY_SOLARIS + 8, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
35 |
- OVAL_SOLARIS_VIRTUALIZATIONINFO = OVAL_FAMILY_SOLARIS + 9 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
36 |
+ OVAL_SOLARIS_VIRTUALIZATIONINFO = OVAL_FAMILY_SOLARIS + 9, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
37 |
+ OVAL_SOLARIS_PACKAGE511 = OVAL_FAMILY_SOLARIS + 10 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
38 |
} oval_solaris_subtype_t; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
39 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
40 |
/// Unix subtypes |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
41 |
--- openscap-1.2.6/configure.ac.~5~ 2016-02-23 12:45:30.591588060 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
42 |
+++ openscap-1.2.6/configure.ac 2016-02-23 12:47:23.889508750 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
43 |
@@ -269,6 +269,10 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
44 |
probe_virtualizationinfo_req_deps_missing= |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
45 |
probe_virtualizationinfo_opt_deps_ok=yes |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
46 |
probe_virtualizationinfo_opt_deps_missing= |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
47 |
+probe_package511_req_deps_ok=yes |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
48 |
+probe_package511_req_deps_missing= |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
49 |
+probe_package511_opt_deps_ok=yes |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
50 |
+probe_package511_opt_deps_missing= |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
51 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
52 |
# |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
53 |
# env |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
54 |
@@ -1365,6 +1369,8 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
55 |
probe_smfproperty_enabled=$probe_smfproperty_req_deps_ok |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
56 |
AM_CONDITIONAL([probe_virtualizationinfo_enabled], test "$probe_virtualizationinfo_req_deps_ok" = yes) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
57 |
probe_virtualizationinfo_enabled=$probe_virtualizationinfo_req_deps_ok |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
58 |
+AM_CONDITIONAL([probe_package511_enabled], test "$probe_package511_req_deps_ok" = yes) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
59 |
+probe_package511_enabled=$probe_package511_req_deps_ok |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
60 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
61 |
AM_CONDITIONAL([WANT_CCE], test "$cce" = yes) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
62 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
63 |
@@ -1803,6 +1809,12 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
64 |
probe_virtualizationinfo_table_result="NO (missing: $probe_virtualizationinfo_req_deps_missing)" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
65 |
fi |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
66 |
printf " %-28s %s\n" "virtualizationinfo:" "$probe_virtualizationinfo_table_result" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
67 |
+if test "$probe_package511_req_deps_ok" = "yes"; then |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
68 |
+ probe_package511_table_result="yes" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
69 |
+else |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
70 |
+ probe_package511_table_result="NO (missing: $probe_package511_req_deps_missing)" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
71 |
+fi |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
72 |
+printf " %-28s %s\n" "package511:" "$probe_package511_table_result" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
73 |
echo |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
74 |
echo " === configuration ===" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
75 |
echo " probe directory set to: $probe_dir" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
76 |
--- openscap-1.2.6/src/OVAL/oval_probe.c.~2~ 2016-02-25 13:35:49.511778373 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
77 |
+++ openscap-1.2.6/src/OVAL/oval_probe.c 2016-02-25 13:36:30.685802320 -0800 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
78 |
@@ -94,7 +94,8 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
79 |
OVAL_PROBE_EXTERNAL(OVAL_UNIX_SYMLINK, "symlink"), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
80 |
OVAL_PROBE_EXTERNAL(OVAL_SOLARIS_SMF, "smf"), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
81 |
OVAL_PROBE_EXTERNAL(OVAL_SOLARIS_SMFPROPERTY,"smfproperty"), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
82 |
- OVAL_PROBE_EXTERNAL(OVAL_SOLARIS_VIRTUALIZATIONINFO, "virtualizationinfo") |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
83 |
+ OVAL_PROBE_EXTERNAL(OVAL_SOLARIS_VIRTUALIZATIONINFO, "virtualizationinfo"), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
84 |
+ OVAL_PROBE_EXTERNAL(OVAL_SOLARIS_PACKAGE511, "package511") |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
85 |
}; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
86 |
|
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
87 |
#define __PROBE_META_COUNT (sizeof OSCAP_GSYM(__probe_meta)/sizeof OSCAP_GSYM(__probe_meta)[0]) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
88 |
+#endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
89 |
--- openscap-1.2.6/src/OVAL/probes/unix/solaris/package511.c.~1~ 2016-04-19 09:54:58.291212479 -0700 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
90 |
+++ openscap-1.2.6/src/OVAL/probes/unix/solaris/package511.c 2016-04-19 09:58:06.575618974 -0700 |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
91 |
@@ -0,0 +1,344 @@ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
92 |
+/** |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
93 |
+ * @file package511.c |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
94 |
+ * @brief package511 probe |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
95 |
+ * @author "Jacob Varughese" <[email protected]> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
96 |
+ * |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
97 |
+ * This probe retrieves the meta data from packages. |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
98 |
+ */ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
99 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
100 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
101 |
+#include "probe-api.h" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
102 |
+#ifdef HAVE_CONFIG_H |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
103 |
+#include <config.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
104 |
+#endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
105 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
106 |
+#if defined(__SVR4) && defined(__sun) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
107 |
+#include <stdlib.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
108 |
+#include <string.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
109 |
+#include <stdio.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
110 |
+#include <errno.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
111 |
+#include <sys/stat.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
112 |
+#include <ctype.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
113 |
+#include <sys/types.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
114 |
+#include <limits.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
115 |
+#include <unistd.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
116 |
+#include <sys/types.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
117 |
+#include <rad/client/1/ips.h> |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
118 |
+#include "seap.h" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
119 |
+#include "probe/entcmp.h" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
120 |
+#include "alloc.h" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
121 |
+#include "common/debug_priv.h" |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
122 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
123 |
+/* Convenience structure for the results being reported */ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
124 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
125 |
+/* |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
126 |
+ * package511 probe: |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
127 |
+ * |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
128 |
+ * |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
129 |
+ * publisher; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
130 |
+ * pkgname; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
131 |
+ * version; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
132 |
+ * timestamp; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
133 |
+ * fmri; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
134 |
+ * summary; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
135 |
+ * description; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
136 |
+ * category; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
137 |
+ * updates_available; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
138 |
+ */ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
139 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
140 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
141 |
+/* Convenience structure for the results being reported */ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
142 |
+struct result_info { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
143 |
+ char *publisher; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
144 |
+ char *pkgname; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
145 |
+ char *version; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
146 |
+ char *timestamp; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
147 |
+ char *fmri; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
148 |
+ char *summary; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
149 |
+ char *description; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
150 |
+ char *category; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
151 |
+ boolean_t updates_available; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
152 |
+}; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
153 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
154 |
+#define STR(x) ((x == NULL) ? "" : x) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
155 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
156 |
+static void |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
157 |
+report_pkg_metadata(struct result_info *res, probe_ctx *ctx) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
158 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
159 |
+ SEXP_t *item; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
160 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
161 |
+ item = probe_item_create(OVAL_SOLARIS_PACKAGE511, NULL, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
162 |
+ "publisher", OVAL_DATATYPE_STRING, STR(res->publisher), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
163 |
+ "name", OVAL_DATATYPE_STRING, STR(res->pkgname), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
164 |
+ "version", OVAL_DATATYPE_VERSION, STR(res->version), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
165 |
+ "timestamp", OVAL_DATATYPE_STRING, STR(res->timestamp), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
166 |
+ "fmri", OVAL_DATATYPE_STRING, STR(res->fmri), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
167 |
+ "summary", OVAL_DATATYPE_STRING, STR(res->summary), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
168 |
+ "description", OVAL_DATATYPE_STRING, STR(res->description), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
169 |
+ "category", OVAL_DATATYPE_STRING, STR(res->category), |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
170 |
+ "updates_available", OVAL_DATATYPE_BOOLEAN, res->updates_available, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
171 |
+ NULL); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
172 |
+ probe_item_collect(ctx, item); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
173 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
174 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
175 |
+#if !defined(NDEBUG) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
176 |
+void |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
177 |
+print_list(int status, char *interface, int *name_count, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
178 |
+ adr_name_t **name_list) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
179 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
180 |
+ int i; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
181 |
+ if (status == RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
182 |
+ dI("Found %s\n", interface); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
183 |
+ for (i = 0; i < *name_count; i++) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
184 |
+ const char *name = adr_name_tostr(name_list[i]); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
185 |
+ dI("%s\n", name); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
186 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
187 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
188 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
189 |
+#endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
190 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
191 |
+int |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
192 |
+print_pkginfo(rc_instance_t *pkginfo_inst, struct result_info *r) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
193 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
194 |
+ rc_err_t status; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
195 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
196 |
+ status = ips_PkgInfo_get_pkg_name(pkginfo_inst, &(r->pkgname)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
197 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
198 |
+ dI("PkgInfo_get_pkg_name failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
199 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
200 |
+ dI("pkg name=%s\n", r->pkgname); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
201 |
+ status = ips_PkgInfo_get_summary(pkginfo_inst, &(r->summary)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
202 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
203 |
+ dI("PkgInfo_get_summary failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
204 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
205 |
+ dI("summary=%s\n", r->summary); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
206 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
207 |
+ status = ips_PkgInfo_get_description(pkginfo_inst, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
208 |
+ &(r->description)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
209 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
210 |
+ dI("PkgInfo_get_description failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
211 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
212 |
+ dI("description=%s\n", r->description); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
213 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
214 |
+ status = ips_PkgInfo_get_category(pkginfo_inst, &(r->category)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
215 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
216 |
+ dI("PkgInfo_get_category failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
217 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
218 |
+ dI("category=%s\n", r->category); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
219 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
220 |
+ return (0); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
221 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
222 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
223 |
+int |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
224 |
+print_fmriinfo(rc_instance_t *fmri_inst, struct result_info *r) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
225 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
226 |
+ rc_err_t status; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
227 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
228 |
+ status = ips_PkgFmri_get_name(fmri_inst, &(r->pkgname)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
229 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
230 |
+ dI("PkgFmri_get_name failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
231 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
232 |
+ dI("name=%s\n", r->pkgname); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
233 |
+ status = ips_PkgFmri_get_version(fmri_inst, &(r->version)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
234 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
235 |
+ dI("PkgFmri_get_version failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
236 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
237 |
+ dI("version=%s\n", r->version); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
238 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
239 |
+ status = ips_PkgFmri_get_timestamp(fmri_inst, &(r->timestamp)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
240 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
241 |
+ dI("PkgFmri_get_timestamp failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
242 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
243 |
+ dI("timestamp=%s\n", r->timestamp); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
244 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
245 |
+ status = ips_PkgFmri_get_publisher(fmri_inst, &(r->publisher)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
246 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
247 |
+ dI("PkgFmri_get_publisher failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
248 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
249 |
+ dI("publisher=%s\n", r->publisher); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
250 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
251 |
+ status = ips_PkgFmri_get_fmri(fmri_inst, NULL, NULL, NULL, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
252 |
+ NULL, NULL, &(r->fmri)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
253 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
254 |
+ dI("PkgFmri_get_fmri failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
255 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
256 |
+ dI("fmri=%s\n", r->fmri); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
257 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
258 |
+ return (0); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
259 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
260 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
261 |
+static int |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
262 |
+collect_package_info(char *apkgname, char *aversion, char *atimestamp, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
263 |
+ char *publisher, probe_ctx *ctx) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
264 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
265 |
+ struct result_info r; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
266 |
+ rc_conn_t *conn; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
267 |
+ rc_err_t status; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
268 |
+ rc_instance_t *pkgimg_inst; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
269 |
+ rc_instance_t *ipsmgr_inst; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
270 |
+ int inst_count; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
271 |
+ ips_PkgError_t* pkg_error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
272 |
+ adr_name_t **name_list; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
273 |
+ adr_name_t *image_name; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
274 |
+ int name_count, rc = 0; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
275 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
276 |
+ dI("In collect_package_info"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
277 |
+ memset(&r, 0, sizeof(r)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
278 |
+ /* Connect to rad */ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
279 |
+ conn = rc_connect_unix(NULL, NULL); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
280 |
+ if (conn == NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
281 |
+ dI("Unable to connect to rad.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
282 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
283 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
284 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
285 |
+ status = ips_IPSManager__rad_lookup(conn, _B_TRUE, &ipsmgr_inst, 0); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
286 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
287 |
+ dI("IPSManager lookup failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
288 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
289 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
290 |
+ status = ips_IPSManager__rad_list(conn, _B_TRUE, NS_GLOB, &name_list, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
291 |
+ &name_count, 0); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
292 |
+#if !defined(NDEBUG) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
293 |
+ print_list(status, "IPSManager", &name_count, name_list); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
294 |
+#endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
295 |
+ name_array_free(name_list, name_count); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
296 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
297 |
+ status = ips_PkgImage__rad_list(conn, _B_TRUE, NS_GLOB, &name_list, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
298 |
+ &name_count, 0); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
299 |
+ image_name = name_list[0]; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
300 |
+#if !defined(NDEBUG) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
301 |
+ print_list(status, "PkgImage", &name_count, name_list); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
302 |
+#endif |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
303 |
+ status = rc_lookup(conn, image_name, NULL, _B_TRUE, &pkgimg_inst); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
304 |
+ name_array_free(name_list, name_count); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
305 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
306 |
+ dI("PkgImage instance lookup failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
307 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
308 |
+ } else { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
309 |
+ boolean_t installed = _B_TRUE; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
310 |
+ boolean_t upgradable = _B_FALSE; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
311 |
+ const char *fmris[1]= {apkgname}; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
312 |
+ rc_instance_t **pkginfo_inst; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
313 |
+ rc_instance_t *pkgfmri_inst; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
314 |
+ rc_instance_t **pkgfmris_inst; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
315 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
316 |
+ status = ips_PkgImage_list_packages(pkgimg_inst, fmris, 1, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
317 |
+ NULL, NULL, 0, &installed, NULL, NULL, &upgradable, NULL, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
318 |
+ &pkgfmris_inst, &inst_count, &pkg_error); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
319 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
320 |
+ if (pkg_error != NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
321 |
+ dI("rc = %d\n", pkg_error->ipe_error_code); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
322 |
+ dI("error = %s\n", |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
323 |
+ pkg_error->ipe_error_message); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
324 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
325 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
326 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
327 |
+ dI("Latest revision of %s\n", fmris[0]); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
328 |
+ if (print_fmriinfo(pkgfmris_inst[0], &r) > 0) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
329 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
330 |
+ status = ips_PkgImage_info(pkgimg_inst, fmris, 1, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
331 |
+ NULL, NULL, NULL, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
332 |
+ NULL, 0, NULL, &pkginfo_inst, &inst_count, &pkg_error); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
333 |
+ if (status != RCE_OK) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
334 |
+ if (pkg_error != NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
335 |
+ dI("rc = %d\n", pkg_error->ipe_error_code); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
336 |
+ dI("error = %s\n", |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
337 |
+ pkg_error->ipe_error_message); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
338 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
339 |
+ dI("PkgImage info failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
340 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
341 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
342 |
+ dI("Got package count=%d\n", inst_count); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
343 |
+ if (print_pkginfo(pkginfo_inst[0], &r) > 0) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
344 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
345 |
+ r.updates_available = upgradable; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
346 |
+ dI("upgradable=%s\n", upgradable ? "true":"false"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
347 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
348 |
+ report_pkg_metadata(&r, ctx); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
349 |
+error: |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
350 |
+ rc_disconnect(conn); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
351 |
+ return rc; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
352 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
353 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
354 |
+int |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
355 |
+probe_main(probe_ctx *ctx, void *arg) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
356 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
357 |
+ SEXP_t *probe_in, *publisher = NULL, *pkgname = NULL, *version = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
358 |
+ SEXP_t *timestamp = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
359 |
+ SEXP_t *publisher_val = NULL, *pkgname_val = NULL, *version_val = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
360 |
+ SEXP_t *timestamp_val = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
361 |
+ char *pkgname_str = NULL, *version_str = NULL, *timestamp_str = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
362 |
+ char *publisher_str = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
363 |
+ int rc; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
364 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
365 |
+ probe_in = probe_ctx_getobject(ctx); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
366 |
+ if (probe_in == NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
367 |
+ return PROBE_ENOOBJ; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
368 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
369 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
370 |
+ publisher = probe_obj_getent(probe_in, "publisher", 1); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
371 |
+ if (publisher != NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
372 |
+ publisher_val = probe_ent_getval(publisher); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
373 |
+ publisher_str = SEXP_string_cstr(publisher_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
374 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
375 |
+ if (publisher_str != NULL && strcmp(publisher_str, "") == 0) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
376 |
+ publisher_str = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
377 |
+ dI("publisher in context: %s.\n", (publisher_str==NULL ? "":publisher_str)); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
378 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
379 |
+ pkgname = probe_obj_getent(probe_in, "name", 1); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
380 |
+ if (pkgname == NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
381 |
+ dE("No pkg name in context.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
382 |
+ return PROBE_ENOENT; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
383 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
384 |
+ pkgname_val = probe_ent_getval(pkgname); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
385 |
+ if (pkgname_val == NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
386 |
+ dE("Get service value failed.\n"); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
387 |
+ rc = PROBE_ENOVAL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
388 |
+ goto error; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
389 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
390 |
+ pkgname_str = SEXP_string_cstr(pkgname_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
391 |
+ dI("pkgname in context: %s.\n", pkgname_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
392 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
393 |
+ version = probe_obj_getent(probe_in, "version", 1); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
394 |
+ if (version != NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
395 |
+ version_val = probe_ent_getval(version); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
396 |
+ version_str = SEXP_string_cstr(version_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
397 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
398 |
+ if (version_str != NULL && strcmp(version_str, "") == 0) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
399 |
+ version_str = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
400 |
+ dI("version in context: %s.\n", version_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
401 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
402 |
+ timestamp = probe_obj_getent(probe_in, "timestamp", 1); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
403 |
+ if (timestamp != NULL) { |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
404 |
+ timestamp_val = probe_ent_getval(timestamp); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
405 |
+ timestamp_str = SEXP_string_cstr(timestamp_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
406 |
+ } |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
407 |
+ if (timestamp_str != NULL && strcmp(timestamp_str, "") == 0) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
408 |
+ timestamp_str = NULL; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
409 |
+ dI("timestamp in context: %s.\n", timestamp_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
410 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
411 |
+ rc = collect_package_info(pkgname_str, version_str, timestamp_str, |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
412 |
+ publisher_str, ctx); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
413 |
+error: |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
414 |
+ free(pkgname_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
415 |
+ free(version_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
416 |
+ free(timestamp_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
417 |
+ free(publisher_str); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
418 |
+ SEXP_free(pkgname); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
419 |
+ SEXP_free(version); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
420 |
+ SEXP_free(timestamp); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
421 |
+ SEXP_free(publisher); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
422 |
+ SEXP_free(pkgname_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
423 |
+ SEXP_free(version_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
424 |
+ SEXP_free(timestamp_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
425 |
+ SEXP_free(publisher_val); |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
426 |
+ return rc; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
427 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
428 |
+#else |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
429 |
+ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
430 |
+int |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
431 |
+probe_main(probe_ctx *ctx, void *probe_arg) |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
432 |
+{ |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
433 |
+ return PROBE_EOPNOTSUPP; |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
434 |
+} |
6b195cad32d4
22353495 setting the XCCDF rule's role to unscored, has no effect on the scoring
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
435 |
+#endif |