]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Add getpid() to the seccomp2 sandbox.
authorNick Mathewson <nickm@torproject.org>
Wed, 26 Apr 2017 16:56:06 +0000 (12:56 -0400)
committerNick Mathewson <nickm@torproject.org>
Wed, 26 Apr 2017 16:56:06 +0000 (12:56 -0400)
We hadn't needed this before, because most getpid() callers on Linux
were looking at the vDSO version of getpid().  I don't know why at
least one version of OpenSSL seems to be ignoring the vDSO, but this
change should fix it.

Fixes bug 21943; bugfix on 0.2.5.1-alpha when the sandbox was
introduced.

src/common/sandbox.c

index ebc843e130e5ccdd569366d444d72cd5f1194e50..95c9f83b8da4c01128b5b5f870d2d2df45fb2a4d 100644 (file)
@@ -155,6 +155,7 @@ static int filter_nopar_gen[] = {
 #ifdef __NR_getgid32
     SCMP_SYS(getgid32),
 #endif
+    SCMP_SYS(getpid),
 #ifdef __NR_getrlimit
     SCMP_SYS(getrlimit),
 #endif