Commit a83fbf635992442edf6aa3252e4008d4a08edf12

Authored by Al Viro
Committed by Linus Torvalds
1 parent db392219c5

[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>

Showing 3 changed files with 10 additions and 0 deletions Side-by-side Diff

include/asm-generic/audit_change_attr.h
1 1 __NR_chmod,
2 2 __NR_fchmod,
  3 +#ifdef __NR_chown
3 4 __NR_chown,
4 5 __NR_fchown,
5 6 __NR_lchown,
  7 +#endif
6 8 __NR_setxattr,
7 9 __NR_lsetxattr,
8 10 __NR_fsetxattr,
9 11 __NR_removexattr,
10 12 __NR_lremovexattr,
11 13 __NR_fremovexattr,
  14 +#ifdef __NR_fchownat
12 15 __NR_fchownat,
13 16 __NR_fchmodat,
  17 +#endif
14 18 #ifdef __NR_chown32
15 19 __NR_chown32,
16 20 __NR_fchown32,
include/asm-generic/audit_dir_write.h
1 1 __NR_rename,
2 2 __NR_mkdir,
3 3 __NR_rmdir,
  4 +#ifdef __NR_creat
4 5 __NR_creat,
  6 +#endif
5 7 __NR_link,
6 8 __NR_unlink,
7 9 __NR_symlink,
8 10 __NR_mknod,
  11 +#ifdef __NR_mkdirat
9 12 __NR_mkdirat,
10 13 __NR_mknodat,
11 14 __NR_unlinkat,
12 15 __NR_renameat,
13 16 __NR_linkat,
14 17 __NR_symlinkat,
  18 +#endif
... ... @@ -28,8 +28,10 @@
28 28 switch(syscall) {
29 29 case __NR_open:
30 30 return 2;
  31 +#ifdef __NR_openat
31 32 case __NR_openat:
32 33 return 3;
  34 +#endif
33 35 #ifdef __NR_socketcall
34 36 case __NR_socketcall:
35 37 return 4;