Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Thomas Gleixner | 96a388d | 2007-10-11 11:20:03 +0200 | [diff] [blame] | 2 | #include <asm/unistd_32.h> |
Al Viro | b915543 | 2006-07-01 03:56:16 -0400 | [diff] [blame] | 3 | |
| 4 | unsigned ia32_dir_class[] = { |
| 5 | #include <asm-generic/audit_dir_write.h> |
| 6 | ~0U |
| 7 | }; |
| 8 | |
| 9 | unsigned ia32_chattr_class[] = { |
| 10 | #include <asm-generic/audit_change_attr.h> |
| 11 | ~0U |
| 12 | }; |
Al Viro | dc104fb | 2006-08-31 19:05:56 -0400 | [diff] [blame] | 13 | |
| 14 | unsigned ia32_write_class[] = { |
| 15 | #include <asm-generic/audit_write.h> |
| 16 | ~0U |
| 17 | }; |
| 18 | |
| 19 | unsigned ia32_read_class[] = { |
| 20 | #include <asm-generic/audit_read.h> |
| 21 | ~0U |
| 22 | }; |
Al Viro | 55669bf | 2006-08-31 19:26:40 -0400 | [diff] [blame] | 23 | |
Amy Griffis | 7f13da4 | 2007-03-29 18:00:37 -0400 | [diff] [blame] | 24 | unsigned ia32_signal_class[] = { |
| 25 | #include <asm-generic/audit_signal.h> |
| 26 | ~0U |
| 27 | }; |
| 28 | |
Al Viro | 55669bf | 2006-08-31 19:26:40 -0400 | [diff] [blame] | 29 | int ia32_classify_syscall(unsigned syscall) |
| 30 | { |
Paolo Ciarrocchi | 7375931 | 2008-01-30 13:32:54 +0100 | [diff] [blame] | 31 | switch (syscall) { |
Al Viro | 55669bf | 2006-08-31 19:26:40 -0400 | [diff] [blame] | 32 | case __NR_open: |
| 33 | return 2; |
| 34 | case __NR_openat: |
| 35 | return 3; |
| 36 | case __NR_socketcall: |
| 37 | return 4; |
| 38 | case __NR_execve: |
David Drysdale | 27d6ec7 | 2014-12-12 16:57:33 -0800 | [diff] [blame] | 39 | case __NR_execveat: |
Al Viro | 55669bf | 2006-08-31 19:26:40 -0400 | [diff] [blame] | 40 | return 5; |
| 41 | default: |
| 42 | return 1; |
| 43 | } |
| 44 | } |