components/openscap/patches/system_info5.c.patch
author Jan Parcel <jan.parcel@oracle.com>
Thu, 21 May 2015 15:02:14 -0700
branchs11-update
changeset 4340 729452029ab0
permissions -rw-r--r--
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);