Use direct Linux setresuid/setresgid syscalls for thread-local privilege switching

This commit is contained in:
Andrea Mazzoleni 2026-08-12 11:20:34 +02:00
parent ccc7d55286
commit 0032d2b6eb
2 changed files with 114 additions and 30 deletions

View file

@ -7,6 +7,7 @@
#ifdef __linux__
#define HAVE_LINUX_DEVICE 1 /**< In Linux enables special device support. */
#define HAVE_DIRECT_IO 1 /**< Support O_DIRECT in open(). */
#include <sys/syscall.h>
#endif
#define SYSLOG "syslog"
@ -19,7 +20,6 @@
/* implement close_range for glibc 2.33 or earlier */
#if defined(__linux__) && !defined(HAVE_CLOSE_RANGE)
#include <sys/syscall.h>
#ifndef __NR_close_range
#define __NR_close_range 436
#endif