summaryrefslogtreecommitdiff
path: root/src/common/sandbox.c
diff options
context:
space:
mode:
authorYawning Angel <yawning@schwanenlied.me>2015-11-26 15:21:50 +0000
committerNick Mathewson <nickm@torproject.org>2015-12-08 12:34:53 -0500
commit353c71516e80f41dbb97da00ddfc528ec5ce3c40 (patch)
treebe04524d28cff34d201b5b8a208a618e7d956fc4 /src/common/sandbox.c
parentfe46fffd980cb97661b6bf0f16c66522d7e58e61 (diff)
downloadtor-353c71516e80f41dbb97da00ddfc528ec5ce3c40.tar.gz
tor-353c71516e80f41dbb97da00ddfc528ec5ce3c40.zip
Add support for getrandom() and getentropy() when available
Implements feature #13696.
Diffstat (limited to 'src/common/sandbox.c')
-rw-r--r--src/common/sandbox.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/sandbox.c b/src/common/sandbox.c
index b995762738..8198858ba5 100644
--- a/src/common/sandbox.c
+++ b/src/common/sandbox.c
@@ -199,6 +199,10 @@ static int filter_nopar_gen[] = {
SCMP_SYS(stat64),
#endif
+#ifdef __NR_getrandom
+ SCMP_SYS(getrandom),
+#endif
+
/*
* These socket syscalls are not required on x86_64 and not supported with
* some libseccomp versions (eg: 1.0.1)