| From c6cdf0aee71ab4126d36b045f02428ee3c6ec50b Mon Sep 17 00:00:00 2001 |
| From: Roy Marples <roy@marples.name> |
| Date: Fri, 26 Aug 2022 09:08:36 +0100 |
| Subject: [PATCH 1/2] privsep: Allow getrandom sysctl for newer glibc |
| |
| Fixes #120 |
| |
| Upstream-Status: Backport [c6cdf0aee71ab4126d36b045f02428ee3c6ec50b] |
| Signed-off-by: Chen Qi <Qi.Chen@windriver.com> |
| --- |
| src/privsep-linux.c | 3 +++ |
| 1 file changed, 3 insertions(+) |
| |
| diff --git a/src/privsep-linux.c b/src/privsep-linux.c |
| index b238644b..479a1d82 100644 |
| --- a/src/privsep-linux.c |
| +++ b/src/privsep-linux.c |
| @@ -300,6 +300,9 @@ static struct sock_filter ps_seccomp_filter[] = { |
| #ifdef __NR_getpid |
| SECCOMP_ALLOW(__NR_getpid), |
| #endif |
| +#ifdef __NR_getrandom |
| + SECCOMP_ALLOW(__NR_getrandom), |
| +#endif |
| #ifdef __NR_getsockopt |
| /* For route socket overflow */ |
| SECCOMP_ALLOW_ARG(__NR_getsockopt, 1, SOL_SOCKET), |
| -- |
| 2.17.1 |
| |