20312342 compliance command fails when ipmp group is defined s11u2-sru
authorJan Parcel <jan.parcel@oracle.com>
Tue, 26 May 2015 14:44:48 -0700
branchs11u2-sru
changeset 4352 96c4ef90f176
parent 4338 5df7ab8973f7
child 4360 21641ececd40
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	Tue May 26 14:44:48 2015 -0700
@@ -0,0 +1,28 @@
+20312342 compliance command fails when ipmp group is defined 
+
+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
+@@ -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",
+@@ -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);