summaryrefslogtreecommitdiff
path: root/src/cgi-wrapper.c
diff options
context:
space:
mode:
authorbwarsaw2002-08-23 20:40:27 +0000
committerbwarsaw2002-08-23 20:40:27 +0000
commit66f7d6350e70589f43341b3d25e091bfad56db4f (patch)
tree404269c59e06088061bc81d77cf2f8d786cc7424 /src/cgi-wrapper.c
parent589b3bc54504c0126e226c8dac19e288dea51ae8 (diff)
downloadmailman-66f7d6350e70589f43341b3d25e091bfad56db4f.tar.gz
mailman-66f7d6350e70589f43341b3d25e091bfad56db4f.tar.zst
mailman-66f7d6350e70589f43341b3d25e091bfad56db4f.zip
Diffstat (limited to 'src/cgi-wrapper.c')
-rw-r--r--src/cgi-wrapper.c48
1 files changed, 25 insertions, 23 deletions
diff --git a/src/cgi-wrapper.c b/src/cgi-wrapper.c
index 8b00f9f13..351d4e1ed 100644
--- a/src/cgi-wrapper.c
+++ b/src/cgi-wrapper.c
@@ -7,14 +7,14 @@
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
*/
@@ -25,36 +25,38 @@
#define SCRIPTNAME SCRIPT
#define LOG_IDENT "Mailman cgi-wrapper (" SCRIPT ")"
-/* GID that CGI scripts run as. See your Web server's documentation. */
-#define LEGAL_PARENT_GID CGI_GID
+/* Group name that CGI scripts run as. See your web server's documentation
+ * for details.
+ */
+#define LEGAL_PARENT_GROUP CGI_GROUP
const char* logident = LOG_IDENT;
char* script = SCRIPTNAME;
-const GID_T parentgid = LEGAL_PARENT_GID;
+const char* parentgroup = LEGAL_PARENT_GROUP;
int
-main(int argc, char** argv, char** env)
+main(int argc, char** argv, char** env)
{
- int status;
- char* fake_argv[3];
+ int status;
+ char* fake_argv[3];
- running_as_cgi = 1;
- check_caller(logident, parentgid);
+ running_as_cgi = 1;
+ check_caller(logident, parentgroup);
- /* for these CGI programs, we can ignore argc and argv since they
- * don't contain anything useful. `script' will always be the driver
- * program and argv will always just contain the name of the real
- * script for the driver to import and execute (padded with two dummy
- * values in argv[0] and argv[1] that are ignored by run_script().
- */
- fake_argv[0] = NULL;
- fake_argv[1] = NULL;
- fake_argv[2] = script;
+ /* For these CGI programs, we can ignore argc and argv since they
+ * don't contain anything useful. `script' will always be the driver
+ * program and argv will always just contain the name of the real
+ * script for the driver to import and execute (padded with two dummy
+ * values in argv[0] and argv[1] that are ignored by run_script().
+ */
+ fake_argv[0] = NULL;
+ fake_argv[1] = NULL;
+ fake_argv[2] = script;
- status = run_script("driver", 3, fake_argv, env);
- fatal(logident, status, "%s", strerror(errno));
- return status;
+ status = run_script("driver", 3, fake_argv, env);
+ fatal(logident, status, "%s", strerror(errno));
+ return status;
}