--- dbus-sysdeps-unix.c.orig	Tue Jan  2 02:45:11 2007
+++ dbus-sysdeps-unix.c	Tue Jan  2 02:45:58 2007
@@ -1293,6 +1293,9 @@
                       info->primary_gid,
                       buf, &buf_count) < 0)
       {
+#ifdef HAVE_GETGROUPS
+	buf_count = getgroups(0,NULL)+1;
+#endif
         gid_t *new = dbus_realloc (buf, buf_count * sizeof (buf[0]));
         if (new == NULL)
           {
