[misc] 02/02: prebuilder: Enforce the apparent requirement that $1 may not contain slashes.

Daniel Shahaf danielsh at apache.org
Mon May 22 10:35:57 UTC 2017


This is an automated email from the git hooks/post-receive script.

danielsh-guest pushed a commit to branch master
in repository misc.

commit c485377fb5cfbd8337ed019430019dbd25d4bd83
Author: Daniel Shahaf <danielsh at apache.org>
Date:   Mon May 22 10:35:17 2017 +0000

    prebuilder: Enforce the apparent requirement that $1 may not contain slashes.
---
 prebuilder/rebuild.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/prebuilder/rebuild.sh b/prebuilder/rebuild.sh
index a85cc6a..fc6f2fa 100755
--- a/prebuilder/rebuild.sh
+++ b/prebuilder/rebuild.sh
@@ -22,6 +22,7 @@ usage() {
     echo "  -c            Use cowbuilder."
     echo "  -h            Show this usage message."
     echo "  PACKAGENAME   Name of a *.dsc source package file, up to the underscore."
+    echo "                The file must exist in the current directory."
 }
 
 while getopts b:ch o; do
@@ -49,6 +50,9 @@ if [ $# -eq 0 ]; then
 fi
 
 PACKAGE="$1"
+case ${PACKAGE#./} in
+  */*) echo >&2 "$MYNAME: error: Package file must be in the current directory."; exit 1;;
+esac
 
 rm -rf b1 b2
 mkdir -p b1 b2 logs

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/misc.git



More information about the Reproducible-commits mailing list