removed previous change from 3.0.1-tag
added 3.0.2 release
This commit is contained in:
parent
078e99fc1d
commit
ab64c6117d
58 changed files with 4420 additions and 2 deletions
33
ezmlm-web-3.0.2/debian-related/ezmlm-web-make-suid
Executable file
33
ezmlm-web-3.0.2/debian-related/ezmlm-web-make-suid
Executable file
|
@ -0,0 +1,33 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# create user-specific suid binaries to call ezmlm-web.cgi
|
||||
#
|
||||
# parameters: [USERNAME] DESTINATION_FILE
|
||||
# e.g.: john ~john/public_html/cgi-bin/ezmlm-web
|
||||
# only root may choose a USERNAME
|
||||
#
|
||||
|
||||
set -eu
|
||||
|
||||
C_SOURCE=/usr/share/ezmlm-web/index.c
|
||||
|
||||
which cc >/dev/null || { echo "no compiler (cc) installed - sorry" >&2; exit 1; }
|
||||
|
||||
[ $(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
|
||||
|
||||
cc -o "$EZ_FILE" "$C_SOURCE"
|
||||
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'."
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue