components/openscap/patches/uname.c.patch
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Fri, 21 Mar 2014 00:13:55 -0700
branchs11-update
changeset 2996 9d8e1fd67549
parent 2821 8add1494802c
permissions -rw-r--r--
15818459 SUNBT7200992 gcc45 needs a 'link path=usr/gcc/4.5/share/info/dir ...' action
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2821
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     1
--- openscap-0.9.7/src/OVAL/probes/unix/uname.c.~1~	2013-04-23 06:21:51.480000001 -0700
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     2
+++ openscap-0.9.7/src/OVAL/probes/unix/uname.c	2013-08-27 10:06:34.813681695 -0700
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     3
@@ -50,6 +50,9 @@
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     4
 #endif
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     5
 #include <string.h>
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     6
 #include <sys/utsname.h>
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     7
+#if defined (__SVR4) && defined (__sun)
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     8
+#include <sys/systeminfo.h>
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
     9
+#endif
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    10
 
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    11
 #include "seap.h"
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    12
 #include "probe-api.h"
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    13
@@ -59,17 +62,28 @@
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    14
 {
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    15
 	struct utsname buf;
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    16
         SEXP_t *item;
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    17
+#if defined (__SVR4) && defined (__sun)
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    18
+	char procbuf[SYS_NMLN];
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    19
+#endif
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    20
 
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    21
 	// Collect the info
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    22
 	uname(&buf);
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    23
 
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    24
+#if defined (__SVR4) && defined (__sun)
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    25
+	if (sysinfo(SI_ARCHITECTURE, procbuf, sizeof(procbuf)) == -1)
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    26
+		return(PROBE_EFATAL);
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    27
+#endif
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    28
         item = probe_item_create(OVAL_UNIX_UNAME, NULL,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    29
                                  "machine_class",  OVAL_DATATYPE_STRING, buf.machine,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    30
                                  "node_name",      OVAL_DATATYPE_STRING, buf.nodename,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    31
                                  "os_name",        OVAL_DATATYPE_STRING, buf.sysname,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    32
                                  "os_release",     OVAL_DATATYPE_STRING, buf.release,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    33
                                  "os_version",     OVAL_DATATYPE_STRING, buf.version,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    34
+#if defined (__SVR4) && defined (__sun)
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    35
+                                 "processor_type", OVAL_DATATYPE_STRING, procbuf,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    36
+#else
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    37
                                  "processor_type", OVAL_DATATYPE_STRING, buf.machine,
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    38
+#endif
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    39
                                  NULL);
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    40
 
8add1494802c 17270625 textfilecontent54 probe fails to match patterns in file XScreensaver
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff changeset
    41
         probe_item_collect(ctx, item);