]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
privsep: allow __NR_clock_gettime32 syscall (#254)
authorOleg Lyovin <ovlevin@sberdevices.ru>
Mon, 16 Oct 2023 16:59:00 +0000 (19:59 +0300)
committerGitHub <noreply@github.com>
Mon, 16 Oct 2023 16:59:00 +0000 (17:59 +0100)
musl libc doesn't have __NR_clock_gettime definition,
but has __NR_clock_gettime32. clock_gettime implementation
fallbacks to 32-bit version if 64-bit is not supported by the kernel.

Signed-off-by: Oleg Lyovin <ovlevin@sberdevices.ru>
src/privsep-linux.c

index 6201b207f6bcbe5e747bf04958fe2561c806dc4b..b748abcdd5f96fb0ec563f96d09bcb33eb895741 100644 (file)
@@ -301,6 +301,9 @@ static struct sock_filter ps_seccomp_filter[] = {
 #if defined(__x86_64__) && defined(__ILP32__) && defined(__X32_SYSCALL_BIT)
        SECCOMP_ALLOW(__NR_clock_gettime & ~__X32_SYSCALL_BIT),
 #endif
+#ifdef __NR_clock_gettime32
+       SECCOMP_ALLOW(__NR_clock_gettime32),
+#endif
 #ifdef __NR_clock_gettime64
        SECCOMP_ALLOW(__NR_clock_gettime64),
 #endif