[beast/temp-rc1] mkrelease.sh: remove inherently insecure shellvar command
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/temp-rc1] mkrelease.sh: remove inherently insecure shellvar command
- Date: Tue, 28 Oct 2014 12:56:53 +0000 (UTC)
commit a446d77f4fc1d325e4a280d21bcc62aa68650b9b
Author: Tim Janik <timj gnu org>
Date: Mon Jul 29 21:01:30 2013 +0200
mkrelease.sh: remove inherently insecure shellvar command
mkrelease.sh | 26 +-------------------------
1 files changed, 1 insertions(+), 25 deletions(-)
---
diff --git a/mkrelease.sh b/mkrelease.sh
index eb84d3e..47a527c 100755
--- a/mkrelease.sh
+++ b/mkrelease.sh
@@ -35,7 +35,6 @@ usage() {
ChangeLog generate ChangeLog from git history
news list commits since last release tag
upload check and upload release tarball
- shellvar <FILE:VAR> shell-eval VAR variable assignment in FILE
Options:
-h, --help usage help
-v, --version issue version
@@ -84,11 +83,7 @@ while test $# -ne 0 -a $parse_options = 1; do
--) parse_options=0 ;;
*) [ -z "$COMMAND" ] || usage 1
COMMAND="$1"
- [ "$COMMAND" = shellvar ] && {
- shift
- [ $# -ge 1 ] || usage 1
- SHELLVAR="$1"
- } ;;
+ ;;
esac
shift
done
@@ -374,24 +369,5 @@ done
exit
}
-# === shellvar ===
-[ "$COMMAND" = "shellvar" ] && {
- ECHO_N=echo\ -n
- test -t 1 && ECHO_N=echo # include trailing newline on terminals
- # extract file from SHELLVAR
- SHELLVAR_FILE=`printf "%s" "$SHELLVAR" | sed -e 's/:.*//'`
- SHELLVAR_NAME=`printf "%s" "$SHELLVAR" | sed -ne '/:/ { s/[^:]*:// ; p ; q }'`
- [ -z "$SHELLVAR_FILE" ] && die 3 "Failed to extract file from: $SHELLVAR"
- [ -z "$SHELLVAR_NAME" ] && die 3 "Failed to extract variable from: $SHELLVAR"
- [ -r "$SHELLVAR_FILE" ] || die 3 "Failed to read file: $SHELLVAR_FILE"
- sed -n "/^\s*$SHELLVAR_NAME=/{p;q}" "$SHELLVAR_FILE" | grep -q . \
- || die 3 "$SHELLVAR_FILE: Failed to detect variable assignment: $SHELLVAR_NAME="
- ( echo "set -e"
- sed -n "/^\s*[A-Za-z][A-Za-z0-9_]\+=/p; /^\s*$SHELLVAR_NAME=/q" "$SHELLVAR_FILE" \
- && echo $ECHO_N \"\$"$SHELLVAR_NAME"\" ) | "$SHELL" \
- || die 3 "$SHELLVAR_FILE: Error while evaluating variable assignments for: $SHELLVAR_NAME="
- exit
-}
-
# === missing command ===
usage 1
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]