Index: src/common.c
--- src/common.c.orig
+++ src/common.c
@@ -119,45 +119,39 @@ fatal(const char* ident, int exitcode, char* format, .
 void
 check_caller(const char* ident, const char* parentgroup)
 {
-        GID_T mygid = getgid();
-        struct group *mygroup = getgrgid(mygid);
-        char* option;
-        char* server;
+	struct passwd *pw;
+	struct group *gr;
+	char **g;
+	int ok = 0;
         char* wrapper;
 
-        if (running_as_cgi) {
-                option = "--with-cgi-gid";
-                server = "web";
-                wrapper = "CGI";
-        }
-        else {
-                option = "--with-mail-gid";
-                server = "mail";
-                wrapper = "mail";
-        }
+	pw = getpwuid(getuid());
+	if (pw == NULL)
+		fatal(ident, USER_NAME_NOT_FOUND,
+		      "Failure to find username");
 
-        if (!mygroup)
-                fatal(ident, GROUP_NAME_NOT_FOUND,
-                      "Failure to find group name for GID %d.  Mailman\n"
-                      "expected the %s wrapper to be executed as group\n"
-                      "\"%s\", but the system's %s server executed the\n"
-                      "wrapper as GID %d for which the name could not be\n"
-                      "found.  Try adding GID %d to your system as \"%s\",\n"
-                      "or tweak your %s server to run the wrapper as group\n"
-                      "\"%s\".",
-                      mygid, wrapper, parentgroup, server, mygid, mygid,
-                      parentgroup, server, parentgroup);
+	gr = getgrnam(parentgroup);
+	if (gr == NULL)
+		fatal(ident, GROUP_NAME_NOT_FOUND,
+		      "Failure to find \"%s\" group", parentgroup);
 
-        if (strcmp(parentgroup, mygroup->gr_name))
-                fatal(ident, GROUP_MISMATCH,
-                      "Group mismatch error.  Mailman expected the %s\n"
-                      "wrapper script to be executed as group \"%s\", but\n"
-                      "the system's %s server executed the %s script as\n"
-                      "group \"%s\".  Try tweaking the %s server to run the\n"
-                      "script as group \"%s\", or re-run configure, \n"
-                      "providing the command line option `%s=%s'.",
-                      wrapper, parentgroup, server, wrapper, mygroup->gr_name,
-                      server, parentgroup, option, mygroup->gr_name);
+	for (g = gr->gr_mem; *g; g++) {
+		if (strcmp(pw->pw_name, *g) == 0) {
+			ok = 1;
+			break;
+		}
+	}
+
+	if (running_as_cgi)
+		wrapper = "CGI";
+	else
+		wrapper = "mail";
+
+	if (ok == 0)
+		fatal(ident, GROUP_MISMATCH,
+		      "Group mismatch error.  Mailman expected the %s\n"
+		      "wrapper script to be executed by a member of\n"
+		      "\"%s\" group.", wrapper, parentgroup);
 }
 
 
@@ -326,3 +320,6 @@ run_script(const char* script, int argc, char** argv, 
  * indent-tabs-mode: nil
  * End:
  */
+#include <sys/stat.h>
+/* OpenBSD: set[ug]id binary MUST say so in this var */
+mode_t _permit_setugid = S_ISGID;
