lib: uid_wrapper: Fix setgroups and syscall detection on a system without native...
authorJeremy Allison <jra@samba.org>
Sat, 4 Oct 2014 00:18:34 +0000 (17:18 -0700)
committerAndreas Schneider <asn@cryptomilk.org>
Mon, 6 Oct 2014 08:12:06 +0000 (10:12 +0200)
Originally from youzhong@gmail.com.

https://bugzilla.samba.org/show_bug.cgi?id=10851

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/uid_wrapper/wscript

index 3e73e83..6b58595 100644 (file)
@@ -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)