diff options
author | Han Chao <chan@windriver.com> | 2014-04-24 16:34:37 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2014-04-24 19:52:39 -0400 |
commit | 002a8bef46b03e339dd1212b4070d9979773bef1 (patch) | |
tree | db4ef7af79d54d650cd34d5ebcc4b1625dd71fad | |
parent | 65675f02e33f5da31ec5dbac7a45849f4952569b (diff) | |
download | meta-selinux-002a8bef46b03e339dd1212b4070d9979773bef1.tar.gz |
audit: Enable ARM System Call Audit in user space.
Audit System Call needs kernel and user space support.
In user space it needs system call table for ARM. It also needs a
configure option --with-armeb for build audit. Audit system call also
needs enable kernel config CONFIG_AUDITSYSCALL.
Signed-off-by: Han Chao <chan@windriver.com>
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
-rw-r--r-- | recipes-security/audit/audit/add-system-call-table-for-ARM.patch | 46 | ||||
-rw-r--r-- | recipes-security/audit/audit_2.3.2.bb | 2 |
2 files changed, 48 insertions, 0 deletions
diff --git a/recipes-security/audit/audit/add-system-call-table-for-ARM.patch b/recipes-security/audit/audit/add-system-call-table-for-ARM.patch new file mode 100644 index 0000000..ad94d11 --- /dev/null +++ b/recipes-security/audit/audit/add-system-call-table-for-ARM.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From 52ff74be2f01182ed9d4fcc3da059512fad63d72 Mon Sep 17 00:00:00 2001 | ||
2 | From: Han Chao <chan@windriver.com> | ||
3 | Date: Thu, 27 Feb 2014 14:58:57 +0800 | ||
4 | Subject: [PATCH] add system call table for ARM. | ||
5 | |||
6 | This change enable audit system call on ARM. | ||
7 | Add arm System call table on machinetabs.h. | ||
8 | Audit system call need enable kernel config CONFIG_AUDITSYSCALL. | ||
9 | |||
10 | Signed-off-by: Han Chao <chan@windriver.com> | ||
11 | --- | ||
12 | lib/machinetabs.h | 11 ++++++----- | ||
13 | 1 file changed, 6 insertions(+), 5 deletions(-) | ||
14 | |||
15 | diff --git a/lib/machinetabs.h b/lib/machinetabs.h | ||
16 | index ec2d033..1c2e284 100644 | ||
17 | --- a/lib/machinetabs.h | ||
18 | +++ b/lib/machinetabs.h | ||
19 | @@ -1,10 +1,11 @@ | ||
20 | -/* This is a generated file, see Makefile.am for its inputs. */ | ||
21 | -static const char machine_strings[] = "i386\0i486\0i586\0i686\0ia64\0ppc\0ppc64\0s390\0s390x\0x86_64"; | ||
22 | +/* Such is aways generated file, see Makefile.am for its inputs. | ||
23 | + * But this version is not generated file, which is for ARM. */ | ||
24 | +static const char machine_strings[] = "armeb\0armv5tejl\0armv5tel\0armv6l\0armv7l"; | ||
25 | static const unsigned machine_s2i_s[] = { | ||
26 | - 0,5,10,15,20,25,29,35,40,46, | ||
27 | + 0,6,16,25,32, | ||
28 | }; | ||
29 | static const int machine_s2i_i[] = { | ||
30 | - 0,0,0,0,2,4,3,6,5,1, | ||
31 | + 8,8,8,8,8, | ||
32 | }; | ||
33 | static int machine_s2i(const char *s, int *value) { | ||
34 | size_t len, i; | ||
35 | @@ -19,7 +20,7 @@ static int machine_s2i(const char *s, int *value) { | ||
36 | } | ||
37 | } | ||
38 | static const unsigned machine_i2s_direct[] = { | ||
39 | - 0,46,20,29,25,40,35, | ||
40 | + 39,85,59,68,64, | ||
41 | }; | ||
42 | static const char *machine_i2s(int v) { | ||
43 | return i2s_direct__(machine_strings, machine_i2s_direct, 0, 6, v); | ||
44 | -- | ||
45 | 1.7.9.5 | ||
46 | |||
diff --git a/recipes-security/audit/audit_2.3.2.bb b/recipes-security/audit/audit_2.3.2.bb index ae6556f..4baf7a0 100644 --- a/recipes-security/audit/audit_2.3.2.bb +++ b/recipes-security/audit/audit_2.3.2.bb | |||
@@ -18,6 +18,7 @@ SRC_URI = "http://people.redhat.com/sgrubb/audit/audit-${PV}.tar.gz \ | |||
18 | file://auditd.service \ | 18 | file://auditd.service \ |
19 | file://audit-volatile.conf \ | 19 | file://audit-volatile.conf \ |
20 | " | 20 | " |
21 | SRC_URI_append_arm = "file://add-system-call-table-for-ARM.patch" | ||
21 | 22 | ||
22 | inherit autotools pythonnative update-rc.d systemd | 23 | inherit autotools pythonnative update-rc.d systemd |
23 | 24 | ||
@@ -41,6 +42,7 @@ EXTRA_OECONF += "--without-prelude \ | |||
41 | --libdir=${base_libdir} \ | 42 | --libdir=${base_libdir} \ |
42 | --sbindir=${base_sbindir} \ | 43 | --sbindir=${base_sbindir} \ |
43 | " | 44 | " |
45 | EXTRA_OECONF_append_arm = " --with-armeb=yes" | ||
44 | 46 | ||
45 | EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \ | 47 | EXTRA_OEMAKE += "PYLIBVER='python${PYTHON_BASEVERSION}' \ |
46 | PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ | 48 | PYINC='${STAGING_INCDIR}/$(PYLIBVER)' \ |