diff options
Diffstat (limited to 'arch/powerpc/kernel/audit.c')
| -rw-r--r-- | arch/powerpc/kernel/audit.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/audit.c b/arch/powerpc/kernel/audit.c index 24a65e3724e1..7fe5e6300e9a 100644 --- a/arch/powerpc/kernel/audit.c +++ b/arch/powerpc/kernel/audit.c | |||
| @@ -23,6 +23,27 @@ static unsigned chattr_class[] = { | |||
| 23 | ~0U | 23 | ~0U |
| 24 | }; | 24 | }; |
| 25 | 25 | ||
| 26 | int audit_classify_syscall(int abi, unsigned syscall) | ||
| 27 | { | ||
| 28 | #ifdef CONFIG_PPC64 | ||
| 29 | extern int ppc32_classify_syscall(unsigned); | ||
| 30 | if (abi == AUDIT_ARCH_PPC) | ||
| 31 | return ppc32_classify_syscall(syscall); | ||
| 32 | #endif | ||
| 33 | switch(syscall) { | ||
| 34 | case __NR_open: | ||
| 35 | return 2; | ||
| 36 | case __NR_openat: | ||
| 37 | return 3; | ||
| 38 | case __NR_socketcall: | ||
| 39 | return 4; | ||
| 40 | case __NR_execve: | ||
| 41 | return 5; | ||
| 42 | default: | ||
| 43 | return 0; | ||
| 44 | } | ||
| 45 | } | ||
| 46 | |||
| 26 | static int __init audit_classes_init(void) | 47 | static int __init audit_classes_init(void) |
| 27 | { | 48 | { |
| 28 | #ifdef CONFIG_PPC64 | 49 | #ifdef CONFIG_PPC64 |
