changeset 5560:ecfe552000c0 draft

privsep: Allow getsockopt for SO_RCVBUF on Linux For when the link socket overflows
author Roy Marples <roy@marples.name>
date Sat, 12 Dec 2020 17:35:45 +0000
parents 301bcad7c710
children 3853222e97c7
files src/privsep-linux.c
diffstat 1 files changed, 6 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/privsep-linux.c	Sat Dec 12 17:34:31 2020 +0000
+++ b/src/privsep-linux.c	Sat Dec 12 17:35:45 2020 +0000
@@ -28,6 +28,7 @@
 
 #include <sys/ioctl.h>
 #include <sys/prctl.h>
+#include <sys/socket.h>
 #include <sys/syscall.h>
 #include <sys/termios.h>	/* For TCGETS */
 
@@ -252,6 +253,11 @@
 #ifdef __NR_getpid
 	SECCOMP_ALLOW(__NR_getpid),
 #endif
+#ifdef __NR_getsockopt
+	/* For route socket overflow */
+	SECCOMP_ALLOW_ARG(__NR_getsockopt, 1, SOL_SOCKET),
+	SECCOMP_ALLOW_ARG(__NR_getsockopt, 2, SO_RCVBUF),
+#endif
 #ifdef __NR_ioctl
 	SECCOMP_ALLOW_ARG(__NR_ioctl, 1, SIOCGIFFLAGS),
 	SECCOMP_ALLOW_ARG(__NR_ioctl, 1, SIOCGIFHWADDR),