summaryrefslogtreecommitdiffstats
path: root/mkarchroot.in
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2013-07-30 21:24:48 +0200
committerPierre Schmitz <pierre@archlinux.de>2013-08-08 21:28:10 +0200
commitbe3c71fa81e6d35a1fae0612a8b7b4b613d7d2f6 (patch)
treea5907bf32ccf54914ede5a355ea91137c760570e /mkarchroot.in
parentfb30cabe61862f640f0e99f214dc2777a8ec1b35 (diff)
downloaddevtools-be3c71fa81e6d35a1fae0612a8b7b4b613d7d2f6.tar.gz
devtools-be3c71fa81e6d35a1fae0612a8b7b4b613d7d2f6.tar.xz
avoid injecting code into the format string
Now that die() properly forwards arguments to error(), we can expect that the first arg is a format string and not the entirety of the output. Signed-off-by: Dave Reisner <dreisner@archlinux.org> Signed-off-by: Pierre Schmitz <pierre@archlinux.de>
Diffstat (limited to 'mkarchroot.in')
-rw-r--r--mkarchroot.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkarchroot.in b/mkarchroot.in
index 970bbb9..7cdb274 100644
--- a/mkarchroot.in
+++ b/mkarchroot.in
@@ -51,7 +51,7 @@ fi
umask 0022
-[[ -e $working_dir ]] && die "Working directory '$working_dir' already exists"
+[[ -e $working_dir ]] && die "Working directory '%s' already exists" "$working_dir"
mkdir -p "$working_dir"
@@ -60,7 +60,7 @@ lock 9 "${working_dir}.lock" "Locking chroot"
if [[ $(stat -f -c %T "$working_dir") == btrfs ]]; then
rmdir "$working_dir"
if ! btrfs subvolume create "$working_dir"; then
- die "Couldn't create subvolume for '$working_dir'"
+ die "Couldn't create subvolume for '%s'" "$working_dir"
fi
chmod 0755 "$working_dir"
fi