tagged ezmlm-web release v3.3.1
This commit is contained in:
parent
e8f0fc7832
commit
b78397f773
147 changed files with 32182 additions and 0 deletions
15
ezmlm-web-3.3.1/suid-wrapper/Makefile
Normal file
15
ezmlm-web-3.3.1/suid-wrapper/Makefile
Normal file
|
@ -0,0 +1,15 @@
|
|||
# Makefile to compile the binary suid-wrapper for ezmlm-web
|
||||
#
|
||||
# REALINSTALLBIN should be defined in the higher level Makefile
|
||||
|
||||
.PHONY: build clean
|
||||
|
||||
build:
|
||||
$(NOECHO) echo "#define EZMLM_WEB_CGI \"$(REALINSTALLBIN)/ezmlm-web.cgi\"" >index.h
|
||||
$(CC) -o index.cgi index.c
|
||||
sed 's#^EZMLM_WEB_SUID_WRAPPER=.*$$#EZMLM_WEB_SUID_WRAPPER=$(REALINSTALLBIN)/ezmlm-web.wrapper#' ezmlm-web-make-suid >ezmlm-web-make-suid.configured
|
||||
|
||||
clean:
|
||||
-rm index.cgi ezmlm-web-make-suid.configured
|
||||
$(NOECHO) echo "#define EZMLM_WEB_CGI \"/usr/bin/ezmlm-web.cgi\"" >index.h
|
||||
|
38
ezmlm-web-3.3.1/suid-wrapper/ezmlm-web-make-suid
Executable file
38
ezmlm-web-3.3.1/suid-wrapper/ezmlm-web-make-suid
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# This file is part of ezmlm-web.
|
||||
#
|
||||
# it creates user-specific suid binaries for calling ezmlm-web.cgi
|
||||
#
|
||||
# parameters: [USERNAME] DESTINATION_FILE
|
||||
# e.g.: john ~john/public_html/cgi-bin/ezmlm-web
|
||||
# only root may choose a USERNAME
|
||||
#
|
||||
# Copyright (C) 2006-2007, Lars Kruse, All Rights Reserved.
|
||||
#
|
||||
# ezmlm-web is distributed under a BSD-style license. Please refer to
|
||||
# the copyright file included with the release for details.
|
||||
#
|
||||
|
||||
set -eu
|
||||
|
||||
EZMLM_WEB_SUID_WRAPPER=/usr/local/bin/ezmlm-web.wrapper
|
||||
|
||||
[ $(id -u) -ne 0 ] && [ $# -ne 1 ] && echo "Syntax (for non-root): $(basename $0) DESTINATION_FILE" >&2 && exit 1
|
||||
[ $(id -u) -eq 0 ] && [ $# -gt 2 -o $# -lt 1 ] && echo "Syntax (for root): $(basename $0) [USERNAME] DESTINATION_FILE" >&2 && exit 1
|
||||
|
||||
if [ $# -eq 1 ]
|
||||
then EZ_USER=$(id -un)
|
||||
EZ_FILE=$1
|
||||
else EZ_USER=$1
|
||||
EZ_FILE=$2
|
||||
fi
|
||||
|
||||
cp "$EZMLM_WEB_SUID_WRAPPER" "$EZ_FILE"
|
||||
if [ $(id -u) -eq 0 ]
|
||||
then chown "$EZ_USER". "$EZ_FILE" || { echo "the user '$EZ_USER' does not exist" >&2; rm "$EZ_FILE"; exit 1; }
|
||||
fi
|
||||
chmod u+s "$EZ_FILE"
|
||||
|
||||
echo "Successfully created '$EZ_FILE' for user '$EZ_USER'."
|
||||
|
38
ezmlm-web-3.3.1/suid-wrapper/index.c
Normal file
38
ezmlm-web-3.3.1/suid-wrapper/index.c
Normal file
|
@ -0,0 +1,38 @@
|
|||
/* $Id$ */
|
||||
|
||||
// define the location of your ezmlm-web.cgi file in this header file
|
||||
#include "index.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* C wrapper to allow ezmlm-web.cgi to run suid */
|
||||
/* Copyright (C) 1999/2000, Guy Antony Halse, All Rights Reserved */
|
||||
/* Copyright (C) 02005/02006, Lars Kruse, All Rights Reserved */
|
||||
/* See the README file in this distribution for copyright information */
|
||||
|
||||
int main(void) {
|
||||
|
||||
execv(EZMLM_WEB_CGI, NULL);
|
||||
|
||||
/* Note that you could also use the following to allow a specific user
|
||||
to store their mailing lists and configuration file in a different
|
||||
location. This overrides the default.
|
||||
|
||||
ezmlm-web.cgi understands the following parameters:
|
||||
-C /path/to/config.file
|
||||
-d /path/to/list/directory
|
||||
|
||||
See README for the default values. */
|
||||
|
||||
|
||||
/* Look at the exec(3) man page if you don't understand how the arguments
|
||||
list below works */
|
||||
|
||||
/*
|
||||
char *switches[] = { "ezmlm-web.cgi", "-d", "/tmp/ezmlm-web-demo", NULL };
|
||||
execv(EZMLM_WEB_CGI, switches);
|
||||
*/
|
||||
|
||||
|
||||
}
|
1
ezmlm-web-3.3.1/suid-wrapper/index.h
Normal file
1
ezmlm-web-3.3.1/suid-wrapper/index.h
Normal file
|
@ -0,0 +1 @@
|
|||
#define EZMLM_WEB_CGI "/usr/bin/ezmlm-web.cgi"
|
Loading…
Add table
Add a link
Reference in a new issue