Commit e3bdb763 authored by David Dykstra's avatar David Dykstra

Cygwin doesn't have setgroups() so probe for the function in configure

and don't try to call it if it doesn't exist.
parent 93695764
......@@ -287,6 +287,7 @@ static int rsync_module(int fd, int i)
}
if (am_root) {
#ifdef HAVE_SETGROUPS
/* Get rid of any supplementary groups this process
* might have inheristed. */
if (setgroups(0, NULL)) {
......@@ -294,6 +295,7 @@ static int rsync_module(int fd, int i)
io_printf(fd, "@ERROR: setgroups failed\n");
return -1;
}
#endif
/* XXXX: You could argue that if the daemon is started
* by a non-root user and they explicitly specify a
......
......@@ -351,7 +351,7 @@ AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod)
AC_CHECK_FUNCS(fchmod fstat strchr readlink link utime utimes strftime)
AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk)
AC_CHECK_FUNCS(strlcat strlcpy mtrace mallinfo)
AC_CHECK_FUNCS(strlcat strlcpy mtrace mallinfo setgroups)
AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[
AC_TRY_RUN([
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment