From 67a0e8d1086eb271df7e12fc67f1db482be8cb46 Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Wed, 17 Oct 2018 22:27:06 +0300 Subject: [PATCH] limit config visibility to /etc and /var/lib --- bin/v-open-fs-config | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/v-open-fs-config b/bin/v-open-fs-config index 6a4f54fd8..720df86a7 100755 --- a/bin/v-open-fs-config +++ b/bin/v-open-fs-config @@ -35,6 +35,11 @@ if [ ! -z "$src_file" ]; then echo "Error: invalid source path $src_file" exit 2 fi + spath=$(echo "$rpath" |egrep "/etc|/var/lib") + if [ -z "$spath" ]; then + echo "Error: invalid source path $src_file" + exit 2 + fi fi # Reading conf