summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2017-04-26 12:56:06 -0400
committerNick Mathewson <nickm@torproject.org>2017-04-26 12:56:06 -0400
commit99e943998dcfd1263301224104ef98596325f9f2 (patch)
treefedefe589b028c5451c84e48204f722cad254fda
parent4a9f6894300781b998b0753dd0f5a388bb61cc91 (diff)
downloadtor-99e943998dcfd1263301224104ef98596325f9f2.tar.gz
tor-99e943998dcfd1263301224104ef98596325f9f2.zip
Add getpid() to the seccomp2 sandbox.
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.
-rw-r--r--src/common/sandbox.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index ebc843e130..95c9f83b8d 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -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