audit.c 641 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #include <asm/unistd_32.h>
  2. unsigned ia32_dir_class[] = {
  3. #include <asm-generic/audit_dir_write.h>
  4. ~0U
  5. };
  6. unsigned ia32_chattr_class[] = {
  7. #include <asm-generic/audit_change_attr.h>
  8. ~0U
  9. };
  10. unsigned ia32_write_class[] = {
  11. #include <asm-generic/audit_write.h>
  12. ~0U
  13. };
  14. unsigned ia32_read_class[] = {
  15. #include <asm-generic/audit_read.h>
  16. ~0U
  17. };
  18. unsigned ia32_signal_class[] = {
  19. #include <asm-generic/audit_signal.h>
  20. ~0U
  21. };
  22. int ia32_classify_syscall(unsigned syscall)
  23. {
  24. switch (syscall) {
  25. case __NR_open:
  26. return 2;
  27. case __NR_openat:
  28. return 3;
  29. case __NR_socketcall:
  30. return 4;
  31. case __NR_execve:
  32. return 5;
  33. default:
  34. return 1;
  35. }
  36. }