diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2006-09-22 19:10:18 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-09-22 20:48:56 -0400 |
commit | a83fbf635992442edf6aa3252e4008d4a08edf12 (patch) | |
tree | dd31c01247cea278a77dcb88732d19c92b9bca77 | |
parent | db392219c5f572610645696e3672f6ea38783a65 (diff) |
[PATCH] fix missing ifdefs in syscall classes hookup for generic targets
several targets have no ....at() family and m32r calls its only chown variant
chown32(), with __NR_chown being undefined. creat(2) is also absent in some
targets.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | include/asm-generic/audit_change_attr.h | 4 | ||||
-rw-r--r-- | include/asm-generic/audit_dir_write.h | 4 | ||||
-rw-r--r-- | lib/audit.c | 2 |
3 files changed, 10 insertions, 0 deletions
diff --git a/include/asm-generic/audit_change_attr.h b/include/asm-generic/audit_change_attr.h index cb05bf69745a..50764550a60c 100644 --- a/include/asm-generic/audit_change_attr.h +++ b/include/asm-generic/audit_change_attr.h | |||
@@ -1,16 +1,20 @@ | |||
1 | __NR_chmod, | 1 | __NR_chmod, |
2 | __NR_fchmod, | 2 | __NR_fchmod, |
3 | #ifdef __NR_chown | ||
3 | __NR_chown, | 4 | __NR_chown, |
4 | __NR_fchown, | 5 | __NR_fchown, |
5 | __NR_lchown, | 6 | __NR_lchown, |
7 | #endif | ||
6 | __NR_setxattr, | 8 | __NR_setxattr, |
7 | __NR_lsetxattr, | 9 | __NR_lsetxattr, |
8 | __NR_fsetxattr, | 10 | __NR_fsetxattr, |
9 | __NR_removexattr, | 11 | __NR_removexattr, |
10 | __NR_lremovexattr, | 12 | __NR_lremovexattr, |
11 | __NR_fremovexattr, | 13 | __NR_fremovexattr, |
14 | #ifdef __NR_fchownat | ||
12 | __NR_fchownat, | 15 | __NR_fchownat, |
13 | __NR_fchmodat, | 16 | __NR_fchmodat, |
17 | #endif | ||
14 | #ifdef __NR_chown32 | 18 | #ifdef __NR_chown32 |
15 | __NR_chown32, | 19 | __NR_chown32, |
16 | __NR_fchown32, | 20 | __NR_fchown32, |
diff --git a/include/asm-generic/audit_dir_write.h b/include/asm-generic/audit_dir_write.h index 161a7a58fbab..6621bd82cbe8 100644 --- a/include/asm-generic/audit_dir_write.h +++ b/include/asm-generic/audit_dir_write.h | |||
@@ -1,14 +1,18 @@ | |||
1 | __NR_rename, | 1 | __NR_rename, |
2 | __NR_mkdir, | 2 | __NR_mkdir, |
3 | __NR_rmdir, | 3 | __NR_rmdir, |
4 | #ifdef __NR_creat | ||
4 | __NR_creat, | 5 | __NR_creat, |
6 | #endif | ||
5 | __NR_link, | 7 | __NR_link, |
6 | __NR_unlink, | 8 | __NR_unlink, |
7 | __NR_symlink, | 9 | __NR_symlink, |
8 | __NR_mknod, | 10 | __NR_mknod, |
11 | #ifdef __NR_mkdirat | ||
9 | __NR_mkdirat, | 12 | __NR_mkdirat, |
10 | __NR_mknodat, | 13 | __NR_mknodat, |
11 | __NR_unlinkat, | 14 | __NR_unlinkat, |
12 | __NR_renameat, | 15 | __NR_renameat, |
13 | __NR_linkat, | 16 | __NR_linkat, |
14 | __NR_symlinkat, | 17 | __NR_symlinkat, |
18 | #endif | ||
diff --git a/lib/audit.c b/lib/audit.c index 8c21625ef938..3b1289fadf06 100644 --- a/lib/audit.c +++ b/lib/audit.c | |||
@@ -28,8 +28,10 @@ int audit_classify_syscall(int abi, unsigned syscall) | |||
28 | switch(syscall) { | 28 | switch(syscall) { |
29 | case __NR_open: | 29 | case __NR_open: |
30 | return 2; | 30 | return 2; |
31 | #ifdef __NR_openat | ||
31 | case __NR_openat: | 32 | case __NR_openat: |
32 | return 3; | 33 | return 3; |
34 | #endif | ||
33 | #ifdef __NR_socketcall | 35 | #ifdef __NR_socketcall |
34 | case __NR_socketcall: | 36 | case __NR_socketcall: |
35 | return 4; | 37 | return 4; |