Back to home page

LXR

 
 

    


0001 #include <linux/init.h>
0002 #include <linux/types.h>
0003 #include <asm/unistd32.h>
0004 
0005 unsigned compat_dir_class[] = {
0006 #include <asm-generic/audit_dir_write.h>
0007 ~0U
0008 };
0009 
0010 unsigned compat_read_class[] = {
0011 #include <asm-generic/audit_read.h>
0012 ~0U
0013 };
0014 
0015 unsigned compat_write_class[] = {
0016 #include <asm-generic/audit_write.h>
0017 ~0U
0018 };
0019 
0020 unsigned compat_chattr_class[] = {
0021 #include <asm-generic/audit_change_attr.h>
0022 ~0U
0023 };
0024 
0025 unsigned compat_signal_class[] = {
0026 #include <asm-generic/audit_signal.h>
0027 ~0U
0028 };
0029 
0030 int audit_classify_compat_syscall(int abi, unsigned syscall)
0031 {
0032     switch (syscall) {
0033 #ifdef __NR_open
0034     case __NR_open:
0035         return 2;
0036 #endif
0037 #ifdef __NR_openat
0038     case __NR_openat:
0039         return 3;
0040 #endif
0041 #ifdef __NR_socketcall
0042     case __NR_socketcall:
0043         return 4;
0044 #endif
0045     case __NR_execve:
0046         return 5;
0047     default:
0048         return 1;
0049     }
0050 }