aboutsummaryrefslogtreecommitdiffstats
path: root/arch/i386/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-11 14:43:17 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-11 14:43:17 -0400
commit05ff0e291af086f4325bac76abad250690bbbd63 (patch)
tree3ea47e8ef5bebc1261302e3d0775414fb78037c4 /arch/i386/kernel
parent5eea7ee2075b245d505285bb422e2fa8d686e5c8 (diff)
parent55669bfa141b488be865341ed12e188967d11308 (diff)
Merge branch 'audit.b28' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current
* 'audit.b28' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit-current: [PATCH] audit: AUDIT_PERM support [PATCH] audit: more syscall classes added [PATCH] syscall classes hookup for ppc and s390 [PATCH] update audit rule change messages [PATCH] sanity check audit_buffer [PATCH] fix ppid bug in 2.6.18 kernel
Diffstat (limited to 'arch/i386/kernel')
-rw-r--r--arch/i386/kernel/audit.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/i386/kernel/audit.c b/arch/i386/kernel/audit.c
index 5a53c6f371ff..3b97cff41549 100644
--- a/arch/i386/kernel/audit.c
+++ b/arch/i386/kernel/audit.c
@@ -8,13 +8,41 @@ static unsigned dir_class[] = {
8~0U 8~0U
9}; 9};
10 10
11static unsigned read_class[] = {
12#include <asm-generic/audit_read.h>
13~0U
14};
15
16static unsigned write_class[] = {
17#include <asm-generic/audit_write.h>
18~0U
19};
20
11static unsigned chattr_class[] = { 21static unsigned chattr_class[] = {
12#include <asm-generic/audit_change_attr.h> 22#include <asm-generic/audit_change_attr.h>
13~0U 23~0U
14}; 24};
15 25
26int audit_classify_syscall(int abi, unsigned syscall)
27{
28 switch(syscall) {
29 case __NR_open:
30 return 2;
31 case __NR_openat:
32 return 3;
33 case __NR_socketcall:
34 return 4;
35 case __NR_execve:
36 return 5;
37 default:
38 return 0;
39 }
40}
41
16static int __init audit_classes_init(void) 42static int __init audit_classes_init(void)
17{ 43{
44 audit_register_class(AUDIT_CLASS_WRITE, write_class);
45 audit_register_class(AUDIT_CLASS_READ, read_class);
18 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class); 46 audit_register_class(AUDIT_CLASS_DIR_WRITE, dir_class);
19 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class); 47 audit_register_class(AUDIT_CLASS_CHATTR, chattr_class);
20 return 0; 48 return 0;