Andrew Geissler | 517393d | 2023-01-13 08:55:19 -0600 | [diff] [blame] | 1 | From c6cdf0aee71ab4126d36b045f02428ee3c6ec50b Mon Sep 17 00:00:00 2001 |
| 2 | From: Roy Marples <roy@marples.name> |
| 3 | Date: Fri, 26 Aug 2022 09:08:36 +0100 |
| 4 | Subject: [PATCH 1/2] privsep: Allow getrandom sysctl for newer glibc |
| 5 | |
| 6 | Fixes #120 |
| 7 | |
| 8 | Upstream-Status: Backport [c6cdf0aee71ab4126d36b045f02428ee3c6ec50b] |
| 9 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| 10 | --- |
| 11 | src/privsep-linux.c | 3 +++ |
| 12 | 1 file changed, 3 insertions(+) |
| 13 | |
| 14 | diff --git a/src/privsep-linux.c b/src/privsep-linux.c |
| 15 | index b238644b..479a1d82 100644 |
| 16 | --- a/src/privsep-linux.c |
| 17 | +++ b/src/privsep-linux.c |
| 18 | @@ -300,6 +300,9 @@ static struct sock_filter ps_seccomp_filter[] = { |
| 19 | #ifdef __NR_getpid |
| 20 | SECCOMP_ALLOW(__NR_getpid), |
| 21 | #endif |
| 22 | +#ifdef __NR_getrandom |
| 23 | + SECCOMP_ALLOW(__NR_getrandom), |
| 24 | +#endif |
| 25 | #ifdef __NR_getsockopt |
| 26 | /* For route socket overflow */ |
| 27 | SECCOMP_ALLOW_ARG(__NR_getsockopt, 1, SOL_SOCKET), |
| 28 | -- |
| 29 | 2.17.1 |
| 30 | |