Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

audit: support the "standard" <asm-generic/unistd.h>

Many of the syscalls mentioned in the audit code are not present
for architectures that implement only the "standard" set of
Linux syscalls (e.g. openat, but not open, etc.). This change
adds proper #ifdefs for all those syscalls.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>

+27
+4
include/asm-generic/audit_change_attr.h
··· 1 + #ifdef __NR_chmod 1 2 __NR_chmod, 3 + #endif 2 4 __NR_fchmod, 3 5 #ifdef __NR_chown 4 6 __NR_chown, ··· 22 20 __NR_fchown32, 23 21 __NR_lchown32, 24 22 #endif 23 + #ifdef __NR_link 25 24 __NR_link, 25 + #endif 26 26 #ifdef __NR_linkat 27 27 __NR_linkat, 28 28 #endif
+14
include/asm-generic/audit_dir_write.h
··· 1 + #ifdef __NR_rename 1 2 __NR_rename, 3 + #endif 4 + #ifdef __NR_mkdir 2 5 __NR_mkdir, 6 + #endif 7 + #ifdef __NR_rmdir 3 8 __NR_rmdir, 9 + #endif 4 10 #ifdef __NR_creat 5 11 __NR_creat, 6 12 #endif 13 + #ifdef __NR_link 7 14 __NR_link, 15 + #endif 16 + #ifdef __NR_unlink 8 17 __NR_unlink, 18 + #endif 19 + #ifdef __NR_symlink 9 20 __NR_symlink, 21 + #endif 22 + #ifdef __NR_mknod 10 23 __NR_mknod, 24 + #endif 11 25 #ifdef __NR_mkdirat 12 26 __NR_mkdirat, 13 27 __NR_mknodat,
+5
include/asm-generic/audit_read.h
··· 1 + #ifdef __NR_readlink 1 2 __NR_readlink, 3 + #endif 2 4 __NR_quotactl, 3 5 __NR_listxattr, 4 6 __NR_llistxattr, ··· 8 6 __NR_getxattr, 9 7 __NR_lgetxattr, 10 8 __NR_fgetxattr, 9 + #ifdef __NR_readlinkat 10 + __NR_readlinkat, 11 + #endif
+2
include/asm-generic/audit_write.h
··· 4 4 __NR_swapon, 5 5 #endif 6 6 __NR_quotactl, 7 + #ifdef __NR_truncate 7 8 __NR_truncate, 9 + #endif 8 10 #ifdef __NR_truncate64 9 11 __NR_truncate64, 10 12 #endif
+2
lib/audit.c
··· 36 36 int audit_classify_syscall(int abi, unsigned syscall) 37 37 { 38 38 switch(syscall) { 39 + #ifdef __NR_open 39 40 case __NR_open: 40 41 return 2; 42 + #endif 41 43 #ifdef __NR_openat 42 44 case __NR_openat: 43 45 return 3;