ezmlm-web release:
* released source and debian file
This commit is contained in:
parent
b93f629a9c
commit
db6538cda5
161 changed files with 32232 additions and 0 deletions
38
ezmlm-web-3.3/suid-wrapper/ezmlm-web-make-suid
Executable file
38
ezmlm-web-3.3/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'."
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue