Commit aaeb012f authored by Chris Metcalf's avatar Chris Metcalf

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
parent d07bd86d
#ifdef __NR_chmod
__NR_chmod, __NR_chmod,
#endif
__NR_fchmod, __NR_fchmod,
#ifdef __NR_chown #ifdef __NR_chown
__NR_chown, __NR_chown,
...@@ -20,7 +22,9 @@ __NR_chown32, ...@@ -20,7 +22,9 @@ __NR_chown32,
__NR_fchown32, __NR_fchown32,
__NR_lchown32, __NR_lchown32,
#endif #endif
#ifdef __NR_link
__NR_link, __NR_link,
#endif
#ifdef __NR_linkat #ifdef __NR_linkat
__NR_linkat, __NR_linkat,
#endif #endif
#ifdef __NR_rename
__NR_rename, __NR_rename,
#endif
#ifdef __NR_mkdir
__NR_mkdir, __NR_mkdir,
#endif
#ifdef __NR_rmdir
__NR_rmdir, __NR_rmdir,
#endif
#ifdef __NR_creat #ifdef __NR_creat
__NR_creat, __NR_creat,
#endif #endif
#ifdef __NR_link
__NR_link, __NR_link,
#endif
#ifdef __NR_unlink
__NR_unlink, __NR_unlink,
#endif
#ifdef __NR_symlink
__NR_symlink, __NR_symlink,
#endif
#ifdef __NR_mknod
__NR_mknod, __NR_mknod,
#endif
#ifdef __NR_mkdirat #ifdef __NR_mkdirat
__NR_mkdirat, __NR_mkdirat,
__NR_mknodat, __NR_mknodat,
......
#ifdef __NR_readlink
__NR_readlink, __NR_readlink,
#endif
__NR_quotactl, __NR_quotactl,
__NR_listxattr, __NR_listxattr,
__NR_llistxattr, __NR_llistxattr,
...@@ -6,3 +8,6 @@ __NR_flistxattr, ...@@ -6,3 +8,6 @@ __NR_flistxattr,
__NR_getxattr, __NR_getxattr,
__NR_lgetxattr, __NR_lgetxattr,
__NR_fgetxattr, __NR_fgetxattr,
#ifdef __NR_readlinkat
__NR_readlinkat,
#endif
...@@ -4,7 +4,9 @@ __NR_acct, ...@@ -4,7 +4,9 @@ __NR_acct,
__NR_swapon, __NR_swapon,
#endif #endif
__NR_quotactl, __NR_quotactl,
#ifdef __NR_truncate
__NR_truncate, __NR_truncate,
#endif
#ifdef __NR_truncate64 #ifdef __NR_truncate64
__NR_truncate64, __NR_truncate64,
#endif #endif
......
...@@ -36,8 +36,10 @@ int audit_classify_arch(int arch) ...@@ -36,8 +36,10 @@ int audit_classify_arch(int arch)
int audit_classify_syscall(int abi, unsigned syscall) int audit_classify_syscall(int abi, unsigned syscall)
{ {
switch(syscall) { switch(syscall) {
#ifdef __NR_open
case __NR_open: case __NR_open:
return 2; return 2;
#endif
#ifdef __NR_openat #ifdef __NR_openat
case __NR_openat: case __NR_openat:
return 3; return 3;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment