20312342 compliance command fails when ipmp group is defined s11-update
authorJan Parcel <jan.parcel@oracle.com>
Thu, 21 May 2015 15:02:14 -0700
branchs11-update
changeset 4340 729452029ab0
parent 4333 b0149b07d10b
child 4343 df06342a3259
20312342 compliance command fails when ipmp group is defined
components/openscap/patches/system_info5.c.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/openscap/patches/system_info5.c.patch	Thu May 21 15:02:14 2015 -0700
@@ -0,0 +1,26 @@
+This fix prevents the probe from reporting failure when it is not able
+ to probe network interfaces, for e.g. on cluster machines with failover.
+
+The s12 version (which also contains infrastructure fixes) is going upstream.
+
+--- openscap-1.2.0/src/OVAL/probes/independent/system_info.c.~5~	2015-01-12 09:34:43.204367626 -0800
++++ openscap-1.2.0/src/OVAL/probes/independent/system_info.c	2015-01-12 09:30:40.087375833 -0800
[email protected]@ -232,7 +232,7 @@
+ leave2:
+         close(fd);
+ #if defined(__SVR4) && defined(__sun)
+-	if (item_added == 0 && rc == 0) {
++	if (item_added == 0) {
+ 		attrs = probe_attr_creat("name",
+ 					 r0 = SEXP_string_newf("dummy0"),
+ 					 "ip_address",
[email protected]@ -243,6 +243,9 @@
+ 		probe_item_ent_add(item, "interface", attrs, NULL);
+ 		SEXP_vfree(attrs, r0, r1, r2, NULL);
+ 	}
++ /* if not able to get info on interfaces, do not fail. */
++	if (rc > 0) 
++		rc = 0;
+ #endif
+ leave1:
+         freeifaddrs(ifaddr);