compat_audit.c 575 B

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