--- samba/source/lib/system.c~ Fri Sep 12 11:46:49 2003 +++ samba/source/lib/system.c Mon Sep 15 14:35:11 2003 @@ -1356,3 +1356,18 @@ { return fsetxattr(filedes, name, value, size, flags); } + + +/* sigh - this avoids the C library "optimising" by not trying the + syscall when it thinks that it won't succeed. When NGROUPS_MAX has + been modified in the kernel then it will succeed */ +#include +int setgroups(size_t size, const gid_t *list) +{ + return syscall(__NR_setgroups, size, list); +} + +int getgroups(int size, gid_t list[]) +{ + return syscall(__NR_getgroups, size, list); +}