From bfe8ac3f9a13b51a5ac46615f2d3bdeb520ca062 Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Fri, 3 Oct 2014 17:18:34 -0700 Subject: [PATCH] lib: uid_wrapper: Fix setgroups and syscall detection on a system without native uid_wrapper library. Originally from youzhong@gmail.com. https://bugzilla.samba.org/show_bug.cgi?id=10851 Signed-off-by: Jeremy Allison --- lib/uid_wrapper/wscript | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/uid_wrapper/wscript b/lib/uid_wrapper/wscript index 3e73e83..6b58595 100644 --- a/lib/uid_wrapper/wscript +++ b/lib/uid_wrapper/wscript @@ -49,6 +49,13 @@ def configure(conf): 'HAVE_FUNCTION_ATTRIBUTE_FORMAT', addmain=False, msg='Checking for printf format validation support') + # Prototype checks + conf.CHECK_C_PROTOTYPE('setgroups', + 'int setgroups(int ngroups, const gid_t *grouplist)', + define='HAVE_SETGROUPS_INT', headers='unistd.h sys/types.h') + conf.CHECK_C_PROTOTYPE('syscall', + 'int syscall(int number, ...)', + define='HAVE_SYSCALL_INT', headers='unistd.h sys/syscall.h') # Create full path to uid_wrapper srcdir = os.path.realpath(conf.srcdir) -- 1.9.1