compat_audit.c 733 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #define __32bit_syscall_numbers__
  2. #include <asm/unistd.h>
  3. #include "kernel.h"
  4. unsigned int sparc32_dir_class[] = {
  5. #include <asm-generic/audit_dir_write.h>
  6. ~0U
  7. };
  8. unsigned int sparc32_chattr_class[] = {
  9. #include <asm-generic/audit_change_attr.h>
  10. ~0U
  11. };
  12. unsigned int sparc32_write_class[] = {
  13. #include <asm-generic/audit_write.h>
  14. ~0U
  15. };
  16. unsigned int sparc32_read_class[] = {
  17. #include <asm-generic/audit_read.h>
  18. ~0U
  19. };
  20. unsigned int sparc32_signal_class[] = {
  21. #include <asm-generic/audit_signal.h>
  22. ~0U
  23. };
  24. int sparc32_classify_syscall(unsigned int syscall)
  25. {
  26. switch(syscall) {
  27. case __NR_open:
  28. return 2;
  29. case __NR_openat:
  30. return 3;
  31. case __NR_socketcall:
  32. return 4;
  33. case __NR_execve:
  34. return 5;
  35. default:
  36. return 1;
  37. }
  38. }