diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-11 14:43:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-11 14:43:17 -0400 |
commit | 05ff0e291af086f4325bac76abad250690bbbd63 (patch) | |
tree | 3ea47e8ef5bebc1261302e3d0775414fb78037c4 /arch/i386/kernel | |
parent | 5eea7ee2075b245d505285bb422e2fa8d686e5c8 (diff) | |
parent | 55669bfa141b488be865341ed12e188967d11308 (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.c | 28 |
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 | ||
11 | static unsigned read_class[] = { | ||
12 | #include <asm-generic/audit_read.h> | ||
13 | ~0U | ||
14 | }; | ||
15 | |||
16 | static unsigned write_class[] = { | ||
17 | #include <asm-generic/audit_write.h> | ||
18 | ~0U | ||
19 | }; | ||
20 | |||
11 | static unsigned chattr_class[] = { | 21 | static 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 | ||
26 | int 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 | |||
16 | static int __init audit_classes_init(void) | 42 | static 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; |