components/openscap/patches/system_info5.c.patch
author Jan Parcel <jan.parcel@oracle.com>
Tue, 26 May 2015 14:44:48 -0700
branchs11u2-sru
changeset 4352 96c4ef90f176
permissions -rw-r--r--
20312342 compliance command fails when ipmp group is defined
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4352
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     1
20312342 compliance command fails when ipmp group is defined 
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     2
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     3
This fix prevents the probe from reporting failure when it is not able
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     4
 to probe network interfaces, for e.g. on cluster machines with failover.
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     5
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     6
The s12 version (which also contains infrastructure fixes) is going upstream.
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     7
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     8
--- openscap-1.2.0/src/OVAL/probes/independent/system_info.c.~5~	2015-01-12 09:34:43.204367626 -0800
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
     9
+++ openscap-1.2.0/src/OVAL/probes/independent/system_info.c	2015-01-12 09:30:40.087375833 -0800
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    10
@@ -232,7 +232,7 @@
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    11
 leave2:
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    12
         close(fd);
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    13
 #if defined(__SVR4) && defined(__sun)
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    14
-	if (item_added == 0 && rc == 0) {
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    15
+	if (item_added == 0) {
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    16
 		attrs = probe_attr_creat("name",
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    17
 					 r0 = SEXP_string_newf("dummy0"),
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    18
 					 "ip_address",
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    19
@@ -243,6 +243,9 @@
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    20
 		probe_item_ent_add(item, "interface", attrs, NULL);
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    21
 		SEXP_vfree(attrs, r0, r1, r2, NULL);
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    22
 	}
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    23
+ /* if not able to get info on interfaces, do not fail. */
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    24
+	if (rc > 0) 
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    25
+		rc = 0;
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    26
 #endif
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    27
 leave1:
96c4ef90f176 20312342 compliance command fails when ipmp group is defined
Jan Parcel <jan.parcel@oracle.com>
parents:
diff changeset
    28
         freeifaddrs(ifaddr);