Commit 7583ded8 authored by Martin Pool's avatar Martin Pool

Make setgroups(0,0) unconditional -- accidentally thinking we have

don't it on a machine that does have supplementary groups would be a
security hole.  If this breaks anything we'll fix it later.
parent 78818f44
...@@ -285,7 +285,6 @@ static int rsync_module(int fd, int i) ...@@ -285,7 +285,6 @@ static int rsync_module(int fd, int i)
} }
if (am_root) { if (am_root) {
#ifdef HAVE_SETGROUPS
/* Get rid of any supplementary groups this process /* Get rid of any supplementary groups this process
* might have inheristed. */ * might have inheristed. */
if (setgroups(0, NULL)) { if (setgroups(0, NULL)) {
...@@ -293,7 +292,6 @@ static int rsync_module(int fd, int i) ...@@ -293,7 +292,6 @@ static int rsync_module(int fd, int i)
io_printf(fd, "@ERROR: setgroups failed\n"); io_printf(fd, "@ERROR: setgroups failed\n");
return -1; return -1;
} }
#endif
/* XXXX: You could argue that if the daemon is started /* XXXX: You could argue that if the daemon is started
* by a non-root user and they explicitly specify a * by a non-root user and they explicitly specify a
......
...@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h]) ...@@ -5,7 +5,7 @@ AC_CONFIG_SRCDIR([byteorder.h])
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)
AC_PREREQ(2.52) AC_PREREQ(2.52)
RSYNC_VERSION=2.5.3pre1 RSYNC_VERSION=2.5.3pre2
AC_SUBST(RSYNC_VERSION) AC_SUBST(RSYNC_VERSION)
AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION]) AC_MSG_NOTICE([Configuring rsync $RSYNC_VERSION])
...@@ -362,7 +362,7 @@ AC_FUNC_UTIME_NULL ...@@ -362,7 +362,7 @@ AC_FUNC_UTIME_NULL
AC_CHECK_FUNCS(waitpid wait4 getcwd strdup strerror chown chmod mknod) 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(fchmod fstat strchr readlink link utime utimes strftime)
AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk) AC_CHECK_FUNCS(memmove lchown vsnprintf snprintf asprintf setsid glob strpbrk)
AC_CHECK_FUNCS(strlcat strlcpy mtrace mallinfo setgroups) AC_CHECK_FUNCS(strlcat strlcpy mtrace mallinfo)
AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[ AC_CACHE_CHECK([for working socketpair],rsync_cv_HAVE_SOCKETPAIR,[
AC_TRY_RUN([ 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