From 682f24bafda95106271d434bb71258cdd89cc1f8 Mon Sep 17 00:00:00 2001 From: "Ruben S. Montero" Date: Sat, 23 Nov 2013 18:39:48 +0100 Subject: [PATCH] bug #2481: Check read permissions in downloader.sh --- src/datastore_mad/remotes/downloader.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/datastore_mad/remotes/downloader.sh b/src/datastore_mad/remotes/downloader.sh index 1c876b275f..56460579a7 100755 --- a/src/datastore_mad/remotes/downloader.sh +++ b/src/datastore_mad/remotes/downloader.sh @@ -177,6 +177,10 @@ http://*|https://*) command="curl $curl_args" ;; *) + if [ ! -r $FROM ]; then + echo "Cannot read from $FROM" >&2 + exit -1 + fi command="cat $FROM" ;; esac