file-5.38-seccomp-tcgets.patch 850 B

1234567891011121314151617181920212223242526272829
  1. From 78573ec1c43346064661169c5c8df32e7c3bd6d6 Mon Sep 17 00:00:00 2001
  2. From: Christos Zoulas <christos@zoulas.com>
  3. Date: Fri, 17 Jan 2020 17:12:58 +0000
  4. Subject: [PATCH] PR/130: tobias: adjust seccomp for ioctl on hardwired
  5. terminal
  6. ---
  7. src/seccomp.c | 8 ++++++--
  8. 1 file changed, 6 insertions(+), 2 deletions(-)
  9. diff --git a/src/seccomp.c b/src/seccomp.c
  10. index ebf3ea1cb..0ba17233b 100644
  11. --- a/src/seccomp.c
  12. +++ b/src/seccomp.c
  13. @@ -186,8 +186,12 @@ enable_sandbox_full(void)
  14. ALLOW_IOCTL_RULE(FIONREAD);
  15. #endif
  16. #ifdef TIOCGWINSZ
  17. - // musl libc may call ioctl TIOCGWINSZ when calling stdout
  18. + // musl libc may call ioctl TIOCGWINSZ on stdout
  19. ALLOW_IOCTL_RULE(TIOCGWINSZ);
  20. +#endif
  21. +#ifdef TCGETS
  22. + // glibc may call ioctl TCGETS on stdout on physical terminal
  23. + ALLOW_IOCTL_RULE(TCGETS);
  24. #endif
  25. ALLOW_RULE(lseek);
  26. ALLOW_RULE(_llseek);