--- tor-0.2.0.30/src/common/compat.c.setgroups
+++ tor-0.2.0.30/src/common/compat.c
@@ -897,6 +897,11 @@ switch_id(const char *user, const char *
return -1;
}
+ if (getgroups(0,0)!=0 && setgroups(0,0)!=0) {
+ log_warn(LD_GENERAL,"Error setting groups: %s", strerror(errno));
+ return -1;
+ }
+
if (setgid(gr->gr_gid) != 0) {
log_warn(LD_GENERAL,"Error setting to configured GID: %s",
strerror(errno));