sandbox.c 562 B

123456789101112131415161718192021222324252627
  1. #include <errno.h>
  2. #include <sysdep-cancel.h>
  3. #include <sys/syscall.h>
  4. #include <kernel-features.h>
  5. #include <sysdep.h>
  6. #include <shim_unistd.h>
  7. #ifdef __NR_sandbox_create
  8. long sandbox_create(int flags, const char *fs_sb, struct net_sb *net_sb)
  9. {
  10. return INLINE_SYSCALL (sandbox_create, 3, flags, fs_sb, net_sb);
  11. }
  12. #endif
  13. #ifdef __NR_sandbox_attach
  14. int sandbox_attach(unsigned int sbid)
  15. {
  16. return INLINE_SYSCALL (sandbox_attach, 1, sbid);
  17. }
  18. #endif
  19. #ifdef __NR_sandbox_current
  20. long sandbox_current(void)
  21. {
  22. return INLINE_SYSCALL (sandbox_current, 0);
  23. }
  24. #endif