aboutsummaryrefslogtreecommitdiff
path: root/pbuilder-checkparams
diff options
context:
space:
mode:
authordancer <dancer>2003-10-04 15:14:43 +0000
committerdancer <dancer>2003-10-04 15:14:43 +0000
commit59c5f227360208ab1e162d5e6ff239cb3ba95ff8 (patch)
tree7085946710daddd3940a42578c2936f220adaf66 /pbuilder-checkparams
parent63c62cc39a66c5e7adc6f5dcc7f6e91572ecd5fe (diff)
downloadpbuilder-59c5f227360208ab1e162d5e6ff239cb3ba95ff8.tar
pbuilder-59c5f227360208ab1e162d5e6ff239cb3ba95ff8.tar.gz
+
+ * auditing of readlink occurrences + * Bug fix: "pbuilder: Please deal with nonexistent --buildplace + directory", reported from Artur R. Czechowski (Closes: #213890). +
Diffstat (limited to 'pbuilder-checkparams')
-rwxr-xr-xpbuilder-checkparams15
1 files changed, 14 insertions, 1 deletions
diff --git a/pbuilder-checkparams b/pbuilder-checkparams
index f29d958..4f0c1ef 100755
--- a/pbuilder-checkparams
+++ b/pbuilder-checkparams
@@ -38,10 +38,18 @@ while [ -n "$1" ]; do
if [ "${PBCURRENTCOMMANDLINEOPERATION}" = 'create' ]; then
touch "$2";
fi
+ if [ ! -f "$2" ]; then
+ echo "E: File $2 does not exist" >&2
+ exit 1
+ fi
BASETGZ=$(readlink -f "$2");
shift; shift;
;;
--buildplace)
+ if [ ! -d "$2" ] ; then
+ echo "E: Directory $2 does not exist" >&2
+ exit 1
+ fi
BUILDPLACE=$(readlink -f "$2");
shift; shift;
;;
@@ -67,7 +75,12 @@ while [ -n "$1" ]; do
;;
--buildresult)
if [ -n "$2" ]; then
- BUILDRESULT=$(readlink -f "$2");
+ if [ -d "$2" ]; then
+ BUILDRESULT=$(readlink -f "$2");
+ else
+ echo "E: Directory $2 does not exist" >&2
+ exit 1
+ fi
else
BUILDRESULT=
fi