]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
audit: support the "standard" <asm-generic/unistd.h>
authorChris Metcalf <cmetcalf@tilera.com>
Mon, 2 May 2011 20:52:19 +0000 (16:52 -0400)
committerChris Metcalf <cmetcalf@tilera.com>
Wed, 4 May 2011 18:41:28 +0000 (14:41 -0400)
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>
include/asm-generic/audit_change_attr.h
include/asm-generic/audit_dir_write.h
include/asm-generic/audit_read.h
include/asm-generic/audit_write.h
lib/audit.c

index bcbab3e4a3be6c802698fe0d1419f02b54a1eba3..89b73e5d0fd0ca626f7b99e5236f20247553ceaf 100644 (file)
@@ -1,4 +1,6 @@
+#ifdef __NR_chmod
 __NR_chmod,
+#endif
 __NR_fchmod,
 #ifdef __NR_chown
 __NR_chown,
@@ -20,7 +22,9 @@ __NR_chown32,
 __NR_fchown32,
 __NR_lchown32,
 #endif
+#ifdef __NR_link
 __NR_link,
+#endif
 #ifdef __NR_linkat
 __NR_linkat,
 #endif
index 6621bd82cbe82319dc075c42f557bfb3c663555a..7b61db4fe72b1cb610674038d8577c82a9f6224f 100644 (file)
@@ -1,13 +1,27 @@
+#ifdef __NR_rename
 __NR_rename,
+#endif
+#ifdef __NR_mkdir
 __NR_mkdir,
+#endif
+#ifdef __NR_rmdir
 __NR_rmdir,
+#endif
 #ifdef __NR_creat
 __NR_creat,
 #endif
+#ifdef __NR_link
 __NR_link,
+#endif
+#ifdef __NR_unlink
 __NR_unlink,
+#endif
+#ifdef __NR_symlink
 __NR_symlink,
+#endif
+#ifdef __NR_mknod
 __NR_mknod,
+#endif
 #ifdef __NR_mkdirat
 __NR_mkdirat,
 __NR_mknodat,
index 0e87464d98471a95a6823b9e215e83cc17fc169e..3b249cb857dc55dfb33dec433d4617318a7bc1ac 100644 (file)
@@ -1,4 +1,6 @@
+#ifdef __NR_readlink
 __NR_readlink,
+#endif
 __NR_quotactl,
 __NR_listxattr,
 __NR_llistxattr,
@@ -6,3 +8,6 @@ __NR_flistxattr,
 __NR_getxattr,
 __NR_lgetxattr,
 __NR_fgetxattr,
+#ifdef __NR_readlinkat
+__NR_readlinkat,
+#endif
index c5f1c2c920e26c033761d640a81256b0b13c13eb..e7020c57b13b8014ba8c28800e8b66dc9ea37cdb 100644 (file)
@@ -4,7 +4,9 @@ __NR_acct,
 __NR_swapon,
 #endif
 __NR_quotactl,
+#ifdef __NR_truncate
 __NR_truncate,
+#endif
 #ifdef __NR_truncate64
 __NR_truncate64,
 #endif
index 8e7dc1c63aa9b1d5ce1fcdc8fa5796578b93aaed..76bbed4a20e55d85ebdfc32881d436ee98592f4f 100644 (file)
@@ -36,8 +36,10 @@ int audit_classify_arch(int arch)
 int audit_classify_syscall(int abi, unsigned syscall)
 {
        switch(syscall) {
+#ifdef __NR_open
        case __NR_open:
                return 2;
+#endif
 #ifdef __NR_openat
        case __NR_openat:
                return 3;