author | Jacob Varughese <jacob.varughese@oracle.com> |
Thu, 29 Jan 2015 11:15:54 -0800 | |
changeset 3703 | 71b5204c547a |
child 5111 | e68e059c3456 |
permissions | -rw-r--r-- |
3703
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
1 |
This patch is required to build 64-bit versions of openscap on solaris. |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
2 |
It has not been submitted to upstream, but will be 2015-Feb-15. |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
3 |
|
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
4 |
--- openscap-1.2.0/configure.ac.~3~ 2014-08-08 10:58:39.160398757 -0700 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
5 |
+++ openscap-1.2.0/configure.ac 2014-08-08 10:58:15.703200526 -0700 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
6 |
@@ -877,7 +877,7 @@ |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
7 |
#check for atomic functions |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
8 |
case $host_cpu in |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
9 |
i386 | i486 | i586 | i686) |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
10 |
- CFLAGS="$CFLAGS -march=i686" |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
11 |
+# CFLAGS="$CFLAGS -march=i686" |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
12 |
;; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
13 |
esac |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
14 |
|
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
15 |
--- openscap-1.2.0/src/SCE/sce_engine.c.~1~ 2014-12-12 10:59:03.676427726 -0800 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
16 |
+++ openscap-1.2.0/src/SCE/sce_engine.c 2014-12-12 11:01:28.358061794 -0800 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
17 |
@@ -48,6 +48,9 @@ |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
18 |
#include <sys/prctl.h> |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
19 |
#include <limits.h> |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
20 |
#include <unistd.h> |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
21 |
+#if defined(__SVR4) && defined(__sun) |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
22 |
+#include <libgen.h> |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
23 |
+#endif |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
24 |
|
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
25 |
struct sce_check_result |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
26 |
{ |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
27 |
--- openscap-1.2.0/src/OVAL/probes/SEAP/_sexp-value.h.~1~ 2014-12-19 09:53:15.178129356 -0800 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
28 |
+++ openscap-1.2.0/src/OVAL/probes/SEAP/_sexp-value.h 2014-12-19 09:55:26.268851025 -0800 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
29 |
@@ -95,6 +95,9 @@ |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
30 |
uintptr_t nxsz; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
31 |
uint16_t real; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
32 |
uint16_t refs; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
33 |
+#if defined(__sparc) && defined(_LP64) |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
34 |
+ uint32_t pad_gcc_align_hack; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
35 |
+#endif |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
36 |
SEXP_t memb[]; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
37 |
} __attribute__ ((packed)); |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
38 |
|
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
39 |
--- openscap-1.2.0/src/OVAL/probes/independent/system_info.c.~5~ 2014-12-19 11:20:58.972279544 -0800 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
40 |
+++ openscap-1.2.0/src/OVAL/probes/independent/system_info.c 2014-12-19 11:23:46.471735971 -0800 |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
41 |
@@ -114,7 +114,7 @@ |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
42 |
static char *get_mac(const struct ifaddrs *ifa) |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
43 |
{ |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
44 |
struct lifreq lifr; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
45 |
- uint_t physaddrlen = DLPI_PHYSADDR_MAX; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
46 |
+ size_t physaddrlen = DLPI_PHYSADDR_MAX; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
47 |
uchar_t physaddr[DLPI_PHYSADDR_MAX]; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
48 |
static char mac_buf[DLPI_PHYSADDR_MAX]; |
71b5204c547a
16873524 Need to convert openscap to 64-bit and enable ASLR.
Jacob Varughese <jacob.varughese@oracle.com>
parents:
diff
changeset
|
49 |
char *str; |