From 7306ae9a02f8e503096502bf8d03c00ced838397 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 21 Feb 2016 20:13:12 +0100 Subject: Replace setuid/setgid with setresuid/setresgid (or setreuid/setregid) The semantics of setuid in SUID processes are not entirely clear on all Unix-like systems. Better use setresuid to drop privileges where available. --- cmake/checks.cmake | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmake') diff --git a/cmake/checks.cmake b/cmake/checks.cmake index 62d52ff..27c073f 100644 --- a/cmake/checks.cmake +++ b/cmake/checks.cmake @@ -37,6 +37,8 @@ int main() { check_prototype_definition("get_current_dir_name" "char *get_current_dir_name(void)" "NULL" "unistd.h" HAVE_GET_CURRENT_DIR_NAME) +check_symbol_exists("setresuid" "unistd.h" HAVE_SETRESUID) +check_symbol_exists("setresgid" "unistd.h" HAVE_SETRESGID) if(NOT DARWIN) set(RT_LIBRARY "") -- cgit v1.2.3