/* Define to 1 if you have the `getdomainname' function. */
#undef HAVE_GETDOMAINNAME
+/* Define to 1 if you have the `getgroups' function. */
+#undef HAVE_GETGROUPS
+
/* Define to 1 if you have the `getifaddrs' function. */
#undef HAVE_GETIFADDRS
+
for ac_func in strchr strrchr memchr memcpy memset sysconf tzset \
- strftime setrlimit initgroups fstat
+ strftime setrlimit initgroups getgroups fstat
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $ac_func" >&5
dnl Function checks
dnl
AC_CHECK_FUNCS(strchr strrchr memchr memcpy memset sysconf tzset \
- strftime setrlimit initgroups fstat)
+ strftime setrlimit initgroups getgroups fstat)
if test -z "$SKIP_SETRESUID"; then
AC_CHECK_FUNCS(setresuid, [SKIP_SETREUID=yes])
fi
/* It is now safe to use log_error() and set_perms() */
+#ifdef HAVE_GETGROUPS
if ((user_ngroups = getgroups(0, NULL)) > 0) {
user_groups = emalloc2(user_ngroups, sizeof(gid_t));
if (getgroups(user_ngroups, user_groups) < 0)
log_error(USE_ERRNO|MSG_ONLY, "can't get group vector");
}
+#endif
if (def_fqdn)
set_fqdn(); /* may call log_error() */