compat_audit.c 709 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // SPDX-License-Identifier: GPL-2.0
  2. #undef __s390x__
  3. #include <asm/unistd.h>
  4. #include "audit.h"
  5. unsigned s390_dir_class[] = {
  6. #include <asm-generic/audit_dir_write.h>
  7. ~0U
  8. };
  9. unsigned s390_chattr_class[] = {
  10. #include <asm-generic/audit_change_attr.h>
  11. ~0U
  12. };
  13. unsigned s390_write_class[] = {
  14. #include <asm-generic/audit_write.h>
  15. ~0U
  16. };
  17. unsigned s390_read_class[] = {
  18. #include <asm-generic/audit_read.h>
  19. ~0U
  20. };
  21. unsigned s390_signal_class[] = {
  22. #include <asm-generic/audit_signal.h>
  23. ~0U
  24. };
  25. int s390_classify_syscall(unsigned syscall)
  26. {
  27. switch(syscall) {
  28. case __NR_open:
  29. return 2;
  30. case __NR_openat:
  31. return 3;
  32. case __NR_socketcall:
  33. return 4;
  34. case __NR_execve:
  35. return 5;
  36. default:
  37. return 1;
  38. }
  39. }